From 019f5e233c1e3e953a42bd6aff38790b9d08556a Mon Sep 17 00:00:00 2001 From: Nick Bradley Date: Thu, 29 Aug 2024 11:50:31 -0700 Subject: [PATCH] adds cookbook as a separate site --- .github/workflows/hugo.yaml | 17 +++++++++++++++-- .gitignore | 3 ++- .gitmodules | 3 +++ cookbook/archetypes/default.md | 5 +++++ cookbook/content/_index.md | 6 ++++++ cookbook/hugo.toml | 6 ++++++ cookbook/themes/hugo-theme-relearn | 1 + 7 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 cookbook/archetypes/default.md create mode 100644 cookbook/content/_index.md create mode 100644 cookbook/hugo.toml create mode 160000 cookbook/themes/hugo-theme-relearn diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml index d1c5872..c2d6e34 100644 --- a/.github/workflows/hugo.yaml +++ b/.github/workflows/hugo.yaml @@ -50,7 +50,7 @@ jobs: uses: actions/configure-pages@v5 - name: Install Node.js dependencies run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" - - name: Build with Hugo + - name: Build reader with Hugo env: HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache HUGO_ENVIRONMENT: production @@ -61,10 +61,23 @@ jobs: --gc \ --minify \ --baseURL "${{ steps.pages.outputs.base_url }}/" + - name: Build cookbook with Hugo + env: + HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache + HUGO_ENVIORNMENT: production + TZ: America/Vancouver + run: | + cd cookbook \ + && hugo \ + --gc \ + --minify \ + --baseURL "${{ steps.pages.outputs.base_url }}/" - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: ./reader/public + path: | + ./reader/public + ./cookbook/public # Deployment job deploy: diff --git a/.gitignore b/.gitignore index d9cb0b4..4adc6c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ # Hugo .hugo_build.lock -reader/public \ No newline at end of file +reader/public +cookbook/public \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 8a4d034..f041249 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "reader/themes/hugo-theme-relearn"] path = reader/themes/hugo-theme-relearn url = https://github.com/McShelby/hugo-theme-relearn.git +[submodule "cookbook/themes/hugo-theme-relearn"] + path = cookbook/themes/hugo-theme-relearn + url = https://github.com/McShelby/hugo-theme-relearn.git diff --git a/cookbook/archetypes/default.md b/cookbook/archetypes/default.md new file mode 100644 index 0000000..c6f3fce --- /dev/null +++ b/cookbook/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +title = '{{ replace .File.ContentBaseName "-" " " | title }}' +date = {{ .Date }} +draft = true ++++ diff --git a/cookbook/content/_index.md b/cookbook/content/_index.md new file mode 100644 index 0000000..a517375 --- /dev/null +++ b/cookbook/content/_index.md @@ -0,0 +1,6 @@ ++++ +archetype = "home" +title = "" ++++ + +This is a new home page. diff --git a/cookbook/hugo.toml b/cookbook/hugo.toml new file mode 100644 index 0000000..4f20955 --- /dev/null +++ b/cookbook/hugo.toml @@ -0,0 +1,6 @@ +baseURL = 'https://example.org/' +languageCode = 'en-us' +title = 'My New Hugo Site' + +theme = 'hugo-theme-relearn' + diff --git a/cookbook/themes/hugo-theme-relearn b/cookbook/themes/hugo-theme-relearn new file mode 160000 index 0000000..28975d0 --- /dev/null +++ b/cookbook/themes/hugo-theme-relearn @@ -0,0 +1 @@ +Subproject commit 28975d0dbff051f7cb952e4e03854940e3422c5d