{"id":20128214,"url":"https://github.com/thenewdynamic/hugo-netlify","last_synced_at":"2026-02-27T15:03:13.679Z","repository":{"id":75047730,"uuid":"146339297","full_name":"theNewDynamic/hugo-netlify","owner":"theNewDynamic","description":null,"archived":false,"fork":false,"pushed_at":"2018-08-27T19:39:08.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-13T08:28:34.154Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/theNewDynamic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-08-27T18:42:50.000Z","updated_at":"2018-08-27T19:39:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ea0c3c8-316d-4d57-adea-04d6a00391b5","html_url":"https://github.com/theNewDynamic/hugo-netlify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theNewDynamic%2Fhugo-netlify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theNewDynamic%2Fhugo-netlify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theNewDynamic%2Fhugo-netlify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theNewDynamic%2Fhugo-netlify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theNewDynamic","download_url":"https://codeload.github.com/theNewDynamic/hugo-netlify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241572383,"owners_count":19984263,"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-13T20:26:13.262Z","updated_at":"2026-02-27T15:03:08.634Z","avatar_url":"https://github.com/theNewDynamic.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hugo + Netlify\n\nThis repo demonstrates basic ways to incorporate Netlify functionality into a Hugo-built website.\n\n## tools\n\n - [Hugo](http://gohugo.io/), to generate HTML\n - [Netlify](https://www.netlify.com/), Deployment and hosting platform\n\n\nThis example combines several features of each (you will find additional annotations in layout files):\n\n### Output Headers\n\n[Pipes](https://gohugo.io/hugo-pipes/) + [Scratch*](https://gohugo.io/functions/scratch/) + [Custom Output Formats](https://gohugo.io/templates/output-formats) + [Headers](https://www.netlify.com/docs/headers-and-basic-auth/)\n\nUsing Hugo Pipes to output our [CSS file](/layouts/partials/head.html), we will also set a (Scratch) variable to expose the file to outputs beside our HTML page.\n\nUsing Custom Output Formats, we will create a [_header](/layouts/index.headers) file, which Netlify uses to set headers for our site.\n\n\n### Redirects\n\n[Aliases](https://gohugo.io/content-management/urls/) + [Custom Output Formats](https://gohugo.io/templates/output-formats) + [Redirects](https://www.netlify.com/docs/redirects/)\n\nHugo allows you to set aliases for any page in your site, but this features generates HTML pages with redirects in the page. Here, we use the `.Alias` functionality, but disable the page creation in our [config](/config.toml#L5). \n\nSee how the alias is set in front matter in [content/page-1.md](/content/page-1.md).\n\nWe will, instead, use Custom Output [Formats](/config.toml#L21) to output a [Redirects file](/layouts/index.redir) setting rewrite rules for your site. \n\n\n### CI configuration\n\n[ENV](https://gohugo.io/commands/hugo_env/) + [Netlify.toml](https://www.netlify.com/docs/netlify-toml-reference/)\n\nWhile you can set build commands through Netlify's control panel. The [netlify.toml](/netlify.toml) file is a handy and portable way to set variables for you all your branches and set up build commands. We'll use Hugo's ENV settings to distinguish between production (master) and other branches.\n\n---\n\n\\* _n.b. `Scratch` may be superceded in a future version of Hugo by improvements to its existing variables functionality, in which case, it can be replaced by merely setting a variable._\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenewdynamic%2Fhugo-netlify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthenewdynamic%2Fhugo-netlify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenewdynamic%2Fhugo-netlify/lists"}