{"id":20770435,"url":"https://github.com/dannyvankooten/gozer","last_synced_at":"2025-04-30T13:42:54.995Z","repository":{"id":208691993,"uuid":"722249974","full_name":"dannyvankooten/gozer","owner":"dannyvankooten","description":"Fast, opinionated and simple static site generator in a single static binary. Mirrored from https://git.sr.ht/~dvko/gozer.","archived":false,"fork":false,"pushed_at":"2025-01-16T08:20:28.000Z","size":63,"stargazers_count":58,"open_issues_count":1,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-30T13:42:46.103Z","etag":null,"topics":["blog-engine","cms","content-management-system","golang","markdown","markdown-to-html","site-generator","static-site-generator","website"],"latest_commit_sha":null,"homepage":"https://git.sr.ht/~dvko/gozer","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dannyvankooten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-11-22T18:58:40.000Z","updated_at":"2025-04-27T15:56:33.000Z","dependencies_parsed_at":"2024-06-21T19:23:51.104Z","dependency_job_id":"592c5032-e573-4a23-beb5-8690a733cef7","html_url":"https://github.com/dannyvankooten/gozer","commit_stats":null,"previous_names":["dannyvankooten/gozer"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyvankooten%2Fgozer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyvankooten%2Fgozer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyvankooten%2Fgozer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyvankooten%2Fgozer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dannyvankooten","download_url":"https://codeload.github.com/dannyvankooten/gozer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251713813,"owners_count":21631605,"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":["blog-engine","cms","content-management-system","golang","markdown","markdown-to-html","site-generator","static-site-generator","website"],"created_at":"2024-11-17T12:09:28.401Z","updated_at":"2025-04-30T13:42:54.983Z","avatar_url":"https://github.com/dannyvankooten.png","language":"Go","funding_links":[],"categories":["Uncategorized","Static Site Generators"],"sub_categories":["Uncategorized","Djot → HTML → Djot"],"readme":"# Gozer! [![builds.sr.ht status](https://builds.sr.ht/~dvko/gozer.svg)](https://builds.sr.ht/~dvko/gozer?)\n\nGozer is a fast \u0026 simple static site generator written in Golang.\n\n- Converts Markdown to HTML.\n- Allows you to use page-specific templates.\n- Creates an XML sitemap for search engines.\n- Creates an RSS feed for feed readers.\n\nSample websites using Gozer:\n\n- [Simplest possible example](example/)\n- My personal website: [site](https://www.dannyvankooten.com/) - [source](https://git.sr.ht/~dvko/dannyvankooten.com)\n\n\n## Installation\n\nYou can install Gozer by first installing a Go compiler and then running:\n\n```sh\ngo install git.sr.ht/~dvko/gozer@latest\n```\n\n## Usage\n\nRun `gozer new` to quickly generate an empty directory structure.\n\n```txt\n├── config.toml                # Configuration file\n├── content                    # Posts and pages\n│   └── index.md\n├── public                     # Static files\n└── templates                  # Template files\n    └── default.html\n```\n\nThen, run `gozer build` to generate your site.\n\nAny Markdown files placed in your `content/` directory will result in an HTML page in your build directory after running `gozer build`.\n\nFor example:\n\n- `content/index.md` creates a file `build/index.html` so it is accessible over HTTP at `/`\n- `content/about.md` creates a file `build/about/index.html` so it is accessible over HTTP at `/about/`.\n\n\n## Commands\n\nRun `gozer` without any arguments to view the help text.\n\n```\nGozer - a fast \u0026 simple static site generator\n\nUsage: gozer [OPTIONS] \u003cCOMMAND\u003e\n\nCommands:\n    build   Deletes the output directory if there is one and builds the site\n    serve   Builds the site and starts an HTTP server on http://localhost:8080\n    new     Creates a new site structure in the given directory\n\nOptions:\n    -r, --root \u003cROOT\u003e Directory to use as root of project (default: .)\n    -c, --config \u003cCONFIG\u003e Path to configuration file (default: config.toml)\n```\n\n## Content files\n\nEach file in your `content/` directory should end in `.md` and have TOML front matter specifying the page title:\n\n```md\n+++\ntitle = \"My page title\"\n+++\n\nPage content here.\n```\n\n### Templates\nThe default template for every page is `default.html`. You can override it by setting the `template` variable in your front matter.\n\n```md\n+++\ntitle = \"My page title\"\ntemplate = \"special-page.html\"\n+++\n\nPage content here.\n```\n\nTemplates are powered by Go's standard `html/template` package, so you can use all the [actions described here](https://pkg.go.dev/text/template#hdr-Actions).\n\nEvery template receives the following set of variables:\n\n```\nPages       # Slice of all pages in the site\nPosts       # Slice of all posts in the site (any page with a date in the filename)\nSite        # Global site properties: Url, Title\nPage        # The current page: Title, Permalink, UrlPath, DatePublished, DateModified\nTitle       # The current page title, shorthand for Page.Title\nContent     # The current page's HTML content.\nNow         # Timestamp of build, instance of time.Time\n```\n\nThe `Page` variable is an instance of the object below:\n\n```\ntype Page struct {\n    // Title of this page\n    Title         string\n\n    // Template this page uses for rendering. Defaults to \"default.html\".\n    Template      string\n\n    // Time this page was published (parsed from file name).\n    DatePublished time.Time\n\n    // Time this page was last modified on the filesystem.\n    DateModified  time.Time\n\n    // The full URL to this page, including the site URL.\n    Permalink     string\n\n    // URL path for this page, relative to site URL\n    UrlPath       string\n\n    // Path to source file for this page, relative to content root\n    Filepath      string\n}\n```\n\nTo show a list of the 5 most recent posts:\n\n```gotemplate\n{{ range (slice .Posts 0 5) }}\n    \u003ca href=\"{{ .Permalink }}\"\u003e{{ .Title }}\u003c/a\u003e \u003csmall\u003e{{ .DatePublished.Format \"Jan 02, 2006\" }}\u003c/small\u003e\u003cbr /\u003e\n{{ end }}\n```\n\n## Contributing\n\nGozer development happens on [Sourcehut](https://sr.ht/). Patches are accepted over email.\n\n- [Code repository](https://git.sr.ht/~dvko/gozer)\n- [Mailing list](https://lists.sr.ht/~dvko/gozer-devel)\n- [Issue tracker](https://todo.sr.ht/~dvko/gozer-issues)\n\n## License\n\nGozer is open-sourced under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyvankooten%2Fgozer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannyvankooten%2Fgozer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyvankooten%2Fgozer/lists"}