Skip to content

Commit

Permalink
Temporarily remove Hugo Pipes Sass conversion (kubernetes#10373)
Browse files Browse the repository at this point in the history
* Add new Sass generation system

* Remove resources folder

* Add develop Sass command and sourcemaps

* Add Hugo version shortcode for use in docs

* Add OWNERS file to ./sass folder
  • Loading branch information
lucperkins authored and k8s-ci-robot committed Oct 1, 2018
1 parent 32014f9 commit 4c2b566
Show file tree
Hide file tree
Showing 25 changed files with 2,728 additions and 975 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ production-build: build check-headers-file ## Build the production site and ensu
non-production-build: ## Build the non-production site, which adds noindex headers to prevent indexing
hugo --enableGitInfo

sass-build:
scripts/sass.sh build

sass-develop:
scripts/sass.sh develop

serve: ## Boot the development server.
hugo server --ignoreCache --disableFastRender

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/contribute/intermediate.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ Slack channel or the
If you aren't ready to create a pull request but you want to see what your
changes look like, you can use the `hugo` command to stage the changes locally.
1. Install Hugo version `0.40.3` or later.
1. Install Hugo version {{< hugoVersion >}} or later.
2. In a terminal, go to the root directory of your clone of the Kubernetes
docs, and enter this command:
Expand Down
19 changes: 4 additions & 15 deletions layouts/partials/css.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
{{- $mainSass := "sass/styles.sass" }}
{{- $caseStudySass := "sass/case_study_styles.sass" }}
<link rel="stylesheet" href="/css/base_fonts.css">
{{- if .Site.IsServer }}
{{- $mainCssOpts := (dict "targetPath" "css/styles.css") }}
{{- $mainCss := resources.Get $mainSass | toCSS $mainCssOpts }}
<link rel="stylesheet" media="screen" href="{{ $mainCss.RelPermalink }}"><!-- default styles.css on -->
{{- else }}
{{- $mainCssOpts := (dict "targetPath" "css/styles.css") }}
{{- $mainCss := resources.Get $mainSass | toCSS $mainCssOpts | minify | fingerprint }}
<link rel="stylesheet" media="screen" href="{{ $mainCss.RelPermalink }}" integrity="{{ $mainCss.Data.Integrity }}"><!-- default styles.css on -->
{{- end }}
<link rel="stylesheet" href="/css/styles.css">
{{- if .Params.case_study_styles }}
{{- $caseStudyCssOpts := (dict "targetPath" "css/styles.css") }}
{{- $caseStudyCss := resources.Get $caseStudySass | toCSS $caseStudyCssOpts | minify | fingerprint }}
<link rel="stylesheet" media="screen" href="{{ $caseStudyCss.Permalink }}" integrity="{{ $caseStudyCss.Data.Integrity }}"><!-- custom case_study_styles on -->
<link rel="stylsheet" href="/css/case-study-styles.css">
{{- end }}
<link rel="stylesheet" href="{{ "css/jquery-ui.min.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/sweetalert.min.css" | relURL }}">
Expand All @@ -26,7 +14,8 @@
<link rel="stylesheet" href="{{ "css/gridpage.css" | relURL }}">
{{- end }}
{{- with .Params.css }}
{{- range (split . ",") }}
{{- $extraCss := split . "," }}
{{- range $extraCss }}
{{- $url := trim . " " | relURL }}
<link rel="stylesheet" href="{{ $url }}"><!-- custom css added -->
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/hugoVersion.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ getenv "HUGO_VERSION" }}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 8 additions & 0 deletions sass/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Allow CSS/SASS updates from blog and case studies owners
options:
no_parent_owners: false
reviewers:
- alexcontini
approvers:
- alexcontini

Loading

0 comments on commit 4c2b566

Please sign in to comment.