{"id":20499053,"url":"https://github.com/jjbel/hugo_testing","last_synced_at":"2026-03-08T19:34:51.721Z","repository":{"id":258761795,"uuid":"875355979","full_name":"jjbel/hugo_testing","owner":"jjbel","description":"A tutorial to use the Hugo static site generator and Github Pages","archived":false,"fork":false,"pushed_at":"2024-10-20T16:00:53.000Z","size":413,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T06:57:55.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jjbel.github.io/hugo_testing/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jjbel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-19T18:51:27.000Z","updated_at":"2024-10-20T16:00:56.000Z","dependencies_parsed_at":"2024-10-20T21:11:09.517Z","dependency_job_id":null,"html_url":"https://github.com/jjbel/hugo_testing","commit_stats":null,"previous_names":["jjbel/hugo_testing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjbel%2Fhugo_testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjbel%2Fhugo_testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjbel%2Fhugo_testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjbel%2Fhugo_testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjbel","download_url":"https://codeload.github.com/jjbel/hugo_testing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242088809,"owners_count":20069858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T18:16:26.084Z","updated_at":"2026-03-08T19:34:46.701Z","avatar_url":"https://github.com/jjbel.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hugo and Github Pages Tutorial\n\nUseful links:\n\nhttps://gohugo.io/hosting-and-deployment/hosting-on-github/\n\nhttps://pages.github.com/\n\n## Prerequisites\n\n### vscode\n\nCode editor\n\nhttps://code.visualstudio.com/download#\n\n### Powershell\n\ncommand-line shell\n\nhttps://github.com/PowerShell/PowerShell/releases/download/v7.4.5/PowerShell-7.4.5-win-x64.msi\n\n### Git\n\nVersion control\n\nhttps://github.com/git-for-windows/git/releases/download/v2.47.0.windows.1/Git-2.47.0-64-bit.exe\n\n### NodeJS\n\nJavascript runtime for building sites\n\nhttps://nodejs.org/dist/v20.18.0/node-v20.18.0-x64.msi\n\n\u003c!-- ### Chocolatey\n\npackage manager for windows\n\n```ps\nSet-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))\n``` --\u003e\n\n### Hugo\n\nstatic site generator\n\n```ps\nwinget install Hugo.Hugo.Extended\n```\n\n## Create the site with Hugo\n\n```ps\nhugo new site . --force\ngit submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke\necho \"theme = 'ananke'\" \u003e\u003e hugo.toml\n```\n\n---\n\n### NOTE\n\nAt any point, to view the website locally, run `hugo server`\n\n```\n\n\"Commit the changes\" means run with a descriptive message:\n\n```\n\ngit add .\ngit commit -m \"my creative descriptive message\"\n\n```\n\nand \"push\" means run `git push`\n\n---\n\nCreate a file `.gitignore` at the root of the repo, and add:\n\n```\n\n.DS_Store\nThumbs.db\npublic/\n.bin/node_modules/\n/node_modules/\nsrc/node_modules/\n/dist/\n.hugo_build.lock\nresources/\\_gen/\n\n````\n\nCommit the changes.\n\n## Customize the Homepage\n\nadd this to `hugo.toml`\n```toml\n[languages.en]\ntitle = \"Breathe Easy\"\nweight = 1\ncontentDir = \"content/en\"\n\n```\n\nAdd the following to `content/en/_index.md`\n\n```md\n---\ntitle: \"BreatheEasy\"\n\ndescription: \"Tomorrow should be breathable.\"\ncascade:\n  featured_image: \"/images/bg.jpg\"\n---\n\nWelcome to the website of BreatheEasy. Read more below.\n````\n\nWhere `/images/bg.jpg` is the background image, add one.\n\nCommit the changes.\n\n## Deploy to Github Pages\n\nIn the browser, to your repo \u003e Settings \u003e Pages.\nIn source choose \"Github Actions\"\n\nCreate a file `.github/workflows/hugo.yaml`\nCopy-paste this in it:\n\n```yml\n# Sample workflow for building and deploying a Hugo site to GitHub Pages\nname: Deploy Hugo site to Pages\n\non:\n  # Runs on pushes targeting the default branch\n  push:\n    branches:\n      - main\n\n  # Allows you to run this workflow manually from the Actions tab\n  workflow_dispatch:\n\n# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages\npermissions:\n  contents: read\n  pages: write\n  id-token: write\n\n# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.\n# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.\nconcurrency:\n  group: \"pages\"\n  cancel-in-progress: false\n\n# Default to bash\ndefaults:\n  run:\n    shell: bash\n\njobs:\n  # Build job\n  build:\n    runs-on: ubuntu-latest\n    env:\n      HUGO_VERSION: 0.134.2\n    steps:\n      - name: Install Hugo CLI\n        run: |\n          wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \\\n          \u0026\u0026 sudo dpkg -i ${{ runner.temp }}/hugo.deb\n\n    # not using Sass. this step is slow\n    #   - name: Install Dart Sass\n        # run: sudo snap install dart-sass\n\n    - name: Checkout\n        uses: actions/checkout@v4\n        with:\n          submodules: recursive\n          fetch-depth: 0\n      - name: Setup Pages\n        id: pages\n        uses: actions/configure-pages@v5\n      - name: Install Node.js dependencies\n        run: \"[[ -f package-lock.json || -f npm-shrinkwrap.json ]] \u0026\u0026 npm ci || true\"\n      - name: Build with Hugo\n        env:\n          HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache\n          HUGO_ENVIRONMENT: production\n          TZ: America/Los_Angeles\n        run: |\n          hugo \\\n            --gc \\\n            --minify \\\n            --baseURL \"${{ steps.pages.outputs.base_url }}/\"\n      - name: Upload artifact\n        uses: actions/upload-pages-artifact@v3\n        with:\n          path: ./public\n\n  # Deployment job\n  deploy:\n    environment:\n      name: github-pages\n      url: ${{ steps.deployment.outputs.page_url }}\n    runs-on: ubuntu-latest\n    needs: build\n    steps:\n      - name: Deploy to GitHub Pages\n        id: deployment\n        uses: actions/deploy-pages@v4\n```\n\n**Now commit and push.**\n\nWait for a few seconds for the site to build.\nThen you can view the site at https://username.github.io/reponame\n\nTo check the status of the build, go to the Actions tab of your repo's github.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjbel%2Fhugo_testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjbel%2Fhugo_testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjbel%2Fhugo_testing/lists"}