Skip to content

Commit

Permalink
More updates
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Maddaus <[email protected]>
  • Loading branch information
IanMadd committed Mar 26, 2024
1 parent edfe2e9 commit 58ada2c
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 25 deletions.
17 changes: 3 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
# so we have to override the default shell here
SHELL=bash -eou pipefail

npm:
# bundle is also executed from other repositories when people run local previews
bundle:
npm install

bundle: npm netlify_dart_sass

clean_hugo_mod:
hugo mod clean
hugo mod clean --all

clean:
rm -rf node_modules
Expand All @@ -33,16 +32,6 @@ production: bundle
deploy_preview: bundle
hugo --gc --minify --enableGitInfo --buildFuture

netlify_dart_sass:
# Hugo requires dart-sass to transpile CSS, but Netlify doesn't support it.
# See https://gohugo.io/functions/resources/tocss/#netlify
@DART_SASS_VERSION="1.72.0"; \
echo $${DART_SASS_VERSION}; \
curl -LJO https://github.com/sass/dart-sass/releases/download/$${DART_SASS_VERSION}/dart-sass-$${DART_SASS_VERSION}-linux-x64.tar.gz; \
tar -xf dart-sass-$${DART_SASS_VERSION}-linux-x64.tar.gz; \
rm dart-sass-$${DART_SASS_VERSION}-linux-x64.tar.gz; \
export PATH=/opt/build/repo/dart-sass:$$PATH; \

serve_ignore_vendor: bundle
hugo server --buildDrafts --noHTTPCache --buildFuture --ignoreVendorPaths github.com/**

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# github.com/chef/compliance-profiles/docs-chef-io v0.0.0-20240306070238-713aa7a8dd8e
# github.com/chef/compliance-remediation-2022/docs-chef-io v0.0.0-20240313054833-ebbc45209efa
# github.com/chef/license-service/docs-chef-io v0.0.0-20231117105514-d3f3d53ba2dd
# github.com/chef/chef-docs-theme v0.0.0-20240320201714-1313815d104f
# github.com/chef/chef-docs-theme v0.0.0-20240325200949-00fdecaf8c51
# github.com/FortAwesome/Font-Awesome v0.0.0-20240108205627-a1232e345536
# github.com/cowboy/jquery-hashchange v0.0.0-20100902193700-0310f3847f90
# github.com/twitter/hogan.js v3.0.2+incompatible
Expand Down
15 changes: 12 additions & 3 deletions cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,25 @@ flagWords:
- hte
ignorePaths:
- ".expeditor/**/*"
- "**/*.yml"
- "**/*.sh"
- "**/*.svg"
- "**/*.toml"
- "**/*.yml"
- archetypes/*.md
- /package*.json
- _vendor/**/*
- cspell.yaml
- public/**
- node_modules/**
- resources/**
- generated/**
- '*.work'
- '*.work.sum'
- dart-sass/**/*
- tools/**/*
- go.mod
- go.sum
- Makefile

# Ignore patterns list
# https://cspell.org/configuration/patterns/
Expand All @@ -45,5 +56,3 @@ ignoreRegExpList:
- "/'d\\b/"
- "/^\\s*```[\\s\\S]*?^\\s*```/gm"
- "{{(.+)(?=}})"
words:
- Grammarly
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22.0

require (
github.com/chef/automate/components/docs-chef-io v0.0.0-20240306133449-4e982f867599 // indirect
github.com/chef/chef-docs-theme v0.0.0-20240315155053-d3478940b224 // indirect
github.com/chef/chef-docs-theme v0.0.0-20240325200949-00fdecaf8c51 // indirect
github.com/chef/chef-server/docs-chef-io v0.0.0-20240320162132-10d96e306f90 // indirect
github.com/chef/chef-workstation/docs-chef-io v0.0.0-20240220152040-faf51299a28a // indirect
github.com/chef/compliance-profiles/docs-chef-io v0.0.0-20240306070238-713aa7a8dd8e // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chef/automate/components/docs-chef-io v0.0.0-20240306133449-4e982f867599 h1:vya+2EqafWQi5osINw4CRrmoDNfZ3LJjrAplqpMc7eA=
github.com/chef/automate/components/docs-chef-io v0.0.0-20240306133449-4e982f867599/go.mod h1:juvLC7Rt33YOCgJ5nnfl4rWZRAbSwqjTbWmcAoA0LtU=
github.com/chef/chef-docs-theme v0.0.0-20240320201714-1313815d104f h1:LXr5PIB1h2zDGt+rFl7kNgha4NBkRKsVr3PB6kjhKPo=
github.com/chef/chef-docs-theme v0.0.0-20240320201714-1313815d104f/go.mod h1:+Jpnv+LXE6dXu2xDcMzMc0RxRGuCPAoFxq5tJ/X6QpQ=
github.com/chef/chef-docs-theme v0.0.0-20240325200949-00fdecaf8c51 h1:GTMxt5u3hnje3qoELAyGtE4V8iL34rZVZ0bqtjCE64I=
github.com/chef/chef-docs-theme v0.0.0-20240325200949-00fdecaf8c51/go.mod h1:+Jpnv+LXE6dXu2xDcMzMc0RxRGuCPAoFxq5tJ/X6QpQ=
github.com/chef/chef-server/docs-chef-io v0.0.0-20240320162132-10d96e306f90 h1:zXtajiExlaLQc9d0KVJb5PLNBwcr2GyKixpKeYe2v4M=
github.com/chef/chef-server/docs-chef-io v0.0.0-20240320162132-10d96e306f90/go.mod h1:gMSa25GUHmLimA0gjvRd3hs1buOBqkKPrdHzHvaJauY=
github.com/chef/chef-workstation/docs-chef-io v0.0.0-20240220152040-faf51299a28a h1:76ZYfDXaaPCMi4YQ4uuhKSUALF488ZNfAcJx9/p+7/I=
Expand Down
2 changes: 1 addition & 1 deletion scripts/local-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ set -eou pipefail
# Run 'netlify dev'
###

pushd themes/docs-new && npm install && popd
npm install
hugo server -b localhost:1313
12 changes: 11 additions & 1 deletion scripts/netlify-branch-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,18 @@ set -eou pipefail
# https://docs.netlify.com/site-deploys/overview/#branches-and-deploys
###

DART_SASS_VERSION="1.72.0"

echo Branch: $HEAD
echo Branch deploy URL: $DEPLOY_PRIME_URL

pushd themes/docs-new && npm install && popd
# Hugo requires dart-sass
# https://gohugo.io/functions/resources/tocss/#netlify

curl -LJO https://github.com/sass/dart-sass/releases/download/$DART_SASS_VERSION/dart-sass-$DART_SASS_VERSION-linux-x64.tar.gz
tar -xf dart-sass-$DART_SASS_VERSION-linux-x64.tar.gz
rm dart-sass-$DART_SASS_VERSION-linux-x64.tar.gz
export PATH=/opt/build/repo/dart-sass:$PATH

npm install
hugo --gc --minify --enableGitInfo
14 changes: 13 additions & 1 deletion scripts/netlify-deploy-preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,22 @@ set -eou pipefail
###
# Generate Netlify build previews for a pull request
# https://docs.netlify.com/site-deploys/overview/#branches-and-deploys
#
# This script is also executed by Netlify from other repositories.
###

DART_SASS_VERSION="1.72.0"

echo Branch: $HEAD
echo Branch deploy URL: $DEPLOY_PRIME_URL

pushd themes/docs-new && npm install && popd
# Hugo requires dart-sass
# https://gohugo.io/functions/resources/tocss/#netlify

curl -LJO https://github.com/sass/dart-sass/releases/download/$DART_SASS_VERSION/dart-sass-$DART_SASS_VERSION-linux-x64.tar.gz
tar -xf dart-sass-$DART_SASS_VERSION-linux-x64.tar.gz
rm dart-sass-$DART_SASS_VERSION-linux-x64.tar.gz
export PATH=/opt/build/repo/dart-sass:$PATH

npm install
hugo --gc --minify --enableGitInfo --buildFuture
12 changes: 11 additions & 1 deletion scripts/netlify-deploy-production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,18 @@ set -eou pipefail
# https://docs.netlify.com/site-deploys/overview/#branches-and-deploys
###

DART_SASS_VERSION="1.72.0"

echo Branch: $HEAD
echo Branch deploy URL: $DEPLOY_PRIME_URL

pushd themes/docs-new && npm install && popd
# Hugo requires dart-sass
# https://gohugo.io/functions/resources/tocss/#netlify

curl -LJO https://github.com/sass/dart-sass/releases/download/$DART_SASS_VERSION/dart-sass-$DART_SASS_VERSION-linux-x64.tar.gz
tar -xf dart-sass-$DART_SASS_VERSION-linux-x64.tar.gz
rm dart-sass-$DART_SASS_VERSION-linux-x64.tar.gz
export PATH=/opt/build/repo/dart-sass:$PATH

npm install
hugo --gc --minify --enableGitInfo

0 comments on commit 58ada2c

Please sign in to comment.