diff --git a/components/docs-chef-io/.gitignore b/components/docs-chef-io/.gitignore index 985c770a3f..0a3fc4a933 100644 --- a/components/docs-chef-io/.gitignore +++ b/components/docs-chef-io/.gitignore @@ -2,4 +2,10 @@ *.*~ *~ +resources/ +public/ + chef-web-docs/ +.hugo_build.lock +*.work +*.work.sum diff --git a/components/docs-chef-io/Makefile b/components/docs-chef-io/Makefile index 98215ebeb8..ff821b95c6 100644 --- a/components/docs-chef-io/Makefile +++ b/components/docs-chef-io/Makefile @@ -3,14 +3,15 @@ SHELL=bash preview_netlify: chef_web_docs - cp -R content/* chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io/content - cp -R static/* chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io/static - cp -R config.toml chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io/ - pushd chef-web-docs && make bundle; hugo --gc --minify --buildFuture && popd + rm -rf chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io/* + cp -R content chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io + cp -R static chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io + cp -R config.toml chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io + pushd chef-web-docs && bash ./scripts/netlify-deploy-preview.sh && popd serve: chef_web_docs - echo "replace github.com/habitat-sh/habitat/components/docs-chef-io => ../" >> chef-web-docs/go.mod - pushd chef-web-docs && make bundle; hugo server --buildDrafts --buildFuture --noHTTPCache --ignoreVendorPaths "github.com/habitat-sh/habitat/**" && popd + printf "go 1.22\n\nuse .\nuse ../" > chef-web-docs/hugo.work + pushd chef-web-docs && make bundle && HUGO_MODULE_WORKSPACE=hugo.work hugo server --buildDrafts --buildFuture --noHTTPCache --ignoreVendorPaths "github.com/habitat-sh/habitat/components/docs-chef-io" && popd chef_web_docs: if [ -d "chef-web-docs/" ]; then \ @@ -20,7 +21,8 @@ chef_web_docs: fi clean_all: - pushd chef-web-docs && make clean_all && popd + rm -rf chef-web-docs + hugo mod clean lint: assets hugo -D diff --git a/components/docs-chef-io/cspell.json b/components/docs-chef-io/cspell.json new file mode 100644 index 0000000000..39fc23e3fa --- /dev/null +++ b/components/docs-chef-io/cspell.json @@ -0,0 +1,50 @@ +{ + // Version of the setting file. Always 0.1 + "version": "0.2", + // language - current active spelling language + "language": "en_US", + "dictionaries": [ + "chef", + "docs" + ], + "dictionaryDefinitions": [ + { + "name": "chef", + "path": "https://raw.githubusercontent.com/chef/chef_dictionary/main/chef.txt", + "description": "Custom Chef Dictionary" + }, + { + "name": "docs", + "path": "https://raw.githubusercontent.com/chef/chef_dictionary/main/docs.txt", + "description": "Custom Docs Dictionary" + } + ], + // words - list of words to be always considered correct + // "words": [ + // ], + // flagWords - list of words to be always considered incorrect + // This is useful for offensive words and common spelling errors. + // For example "hte" should be "the" + "flagWords": [ + "hte" + ], + "ignorePaths": [ + "**/*.yml", + "**/*.toml", + "**/*.svg", + "archetypes/*.md", + "_vendor/**/*", + "cspell.json", + "public/**", + "chef-web-docs", + "resources/**" + ], + "ignoreRegExpList": [ + "/'s\\b/", + "/'d\\b/", + "/^\\s*```[\\s\\S]*?^\\s*```/gm", + "{{(.+)(?=}})" + ], + "words": [ + ] +} diff --git a/components/docs-chef-io/go.mod b/components/docs-chef-io/go.mod index 7f6d2fa0ea..8d0fbd6d2c 100644 --- a/components/docs-chef-io/go.mod +++ b/components/docs-chef-io/go.mod @@ -1,3 +1,3 @@ module github.com/habitat-sh/habitat/components/docs-chef-io -go 1.14 +go 1.22