{"id":13490232,"url":"https://github.com/nuex/zodiac","last_synced_at":"2026-03-14T12:02:10.480Z","repository":{"id":66648970,"uuid":"2438025","full_name":"nuex/zodiac","owner":"nuex","description":"A static website generator written in awk and sh.","archived":false,"fork":false,"pushed_at":"2019-09-07T14:23:00.000Z","size":42,"stargazers_count":240,"open_issues_count":7,"forks_count":22,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-31T03:35:34.802Z","etag":null,"topics":["awk","static-site-generator"],"latest_commit_sha":null,"homepage":"","language":"Awk","has_issues":true,"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/nuex.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":"2011-09-22T15:33:53.000Z","updated_at":"2024-10-09T06:31:42.000Z","dependencies_parsed_at":"2023-02-23T06:15:44.728Z","dependency_job_id":null,"html_url":"https://github.com/nuex/zodiac","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuex%2Fzodiac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuex%2Fzodiac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuex%2Fzodiac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuex%2Fzodiac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuex","download_url":"https://codeload.github.com/nuex/zodiac/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978201,"owners_count":20703675,"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":["awk","static-site-generator"],"created_at":"2024-07-31T19:00:43.240Z","updated_at":"2025-12-17T23:05:38.506Z","avatar_url":"https://github.com/nuex.png","language":"Awk","funding_links":[],"categories":["Awk"],"sub_categories":[],"readme":"# zodiac\n\nZODIAC is a static website generator powered by sh and awk. The core features of zodiac are:\n\n* utilization of existing tools (i.e. awk, sh, find, etc.)\n* supports using plain html\n* built-in support for markdown\n* a simple, easy to use templating system\n* supports custom helpers written in awk\n* configuration, meta, helpers, etc. can be added as you need them\n* convert your markup using any external command that accepts a UNIX-style pipe (smu, asciidoc, discount, rst2html, etc)\n\n## SYNOPSIS\n\n    zod projectdir targetdir\n\n## INSTALL\n\n    git clone git://github.com/nuex/zodiac.git\n    \nEdit the config.mk file to customize the install paths. `/usr/local` is the default install prefix.\n\nRun the following (as root if necessary):\n\n    make install\n\n## DESCRIPTION\n\nA typical Zodiac project will look something like this:\n\n    site/\n      index.md\n      index.meta\n      main.layout\n      global.meta\n      projects/\n        project-1.md\n        project-1.meta\n        project-2.md\n        project-2.meta\n      cv.md\n      cv.meta\n      stylesheets/\n        style.css\n\nAnd it's output could look like this:\n\n    site/\n      index.html\n      projects/\n        project-1.html\n        project-2.html\n      cv.html\n      stylesheets/\n        style.css\n\n### Meta\n\n`.meta` files contain a key / value pair per line. A key and its value must be separated by a \": \". A metafile looks like this:\n\n    this: that\n    title: Contact\n    author: Me\n\nEach page can have its own meta file. The only requirement is that the meta file is in the same directory as the page, has the same name as the page and has the `.meta` file extension.\n\nThe optional `global.meta` file contains data that is available to all of your site's pages, like a site title.\n\nPage metadata will always override global metadata of the same key.\n\n### Templates\n\nTemplates come in two forms, page templates and layout templates. Metadata can be bound to templates by using the `{{key}}` notation in your pages and layout files.\n\nPage templates can have any extension that zodiac can convert. Out of the box, page templates can have an `md`, `htm`, or `html` extension. Other extensions and markup types can be supported if they are configured in the `.zod/config` file in the project directory.\n\nThe `main.layout` file wraps HTML content around a page template.  A `main.layout` file could look something like this:\n\n    \u003c!DOCTYPE html\u003e\n    \u003chtml lang=\"en\"\u003e\n      \u003chead\u003e\n        \u003cmeta charset=\"utf-8\" /\u003e\n        \u003clink rel=\"stylesheet\" href=\"/stylesheets/style.css\" /\u003e\n        \u003ctitle\u003e{{page_title}}\u003c/title\u003e\n      \u003c/head\u003e\n      \u003cbody\u003e\n        \u003cheader\u003e\n          \u003ch1\u003e\u003ca href=\"/\"\u003e{{site_title}}\u003c/a\u003e\u003c/h1\u003e\n        \u003c/header\u003e\n        \u003carticle\u003e\n          {{{yield}}}\n        \u003c/article\u003e\n        \u003cfooter\u003e\n          \u003cp\u003epowered by static files, compiled by \u003ca href=\"http://nu-ex.com/projects/zodiac\"\u003ezodiac\u003c/a\u003e.\u003c/p\u003e\n        \u003c/footer\u003e\n      \u003c/body\u003e\n    \u003c/html\u003e\n\n`{{{yield}}}` is a special tag that renders the page content within the layout. `{{{yield}}}` can only be used in the `main.layout` file.\n\n### Partials\n\nPartials are reusable snippets that can be included in different areas of your site. Partials must have the `.partial` extension and must be in the root of your project directory. Partials are called using two curly brackets and a greater than sign.\n\n    \u003cbody\u003e\n      \u003ch1\u003eWelcome!\u003c/h1\u003e\n\n      {{\u003e nav}}\n\n      \u003cp\u003eThanks for checking out my site!\u003c/p\u003e\n    \u003c/body\u003e\n\nThe `nav.partial` file could have the following contents:\n\n    \u003cnav\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"/\"\u003eHome\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"/blog\"\u003eBlog\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"/about\"\u003eAbout\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/nav\u003e\n\nThis would make the above template expand to:\n\n    \u003cbody\u003e\n      \u003ch1\u003eWelcome!\u003c/h1\u003e\n\n      \u003cnav\u003e\n        \u003cul\u003e\n          \u003cli\u003e\u003ca href=\"/\"\u003eHome\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"/blog\"\u003eBlog\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"/about\"\u003eAbout\u003c/a\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/nav\u003e\n\n      \u003cp\u003eThanks for checking out my site!\u003c/p\u003e\n    \u003c/body\u003e\n\n\n### Helpers\n\nThe `helpers.awk` file is an awk script that can make custom data available to your templates. You also have access to the page and global data. Here is a peek at the script included in the examples folder:\n\n    { helpers = \"yes\" }\n\n    function load_helpers() {\n      # your custom data settings\n      data[\"page_title\"] = page_title()\n    }\n\n    # your custom functions\n    function page_title(  title) {\n      if (data[\"title\"]) {\n        title = data[\"title\"] \" - \" data[\"site_title\"]\n      } else {\n        title = data[\"site_title\"]\n      }\n      return title\n    }\n\nJust be sure to set the data array in the `load_helpers()` function at the top of the script to make your custom data available to the template.\n\n### Config\n\nFor more control over the parsing and conversion process, a `.zod/config` file can be created within your project directory. Here is a sample config:\n\n    [parse]\n    htm,html\n\n    [parse_convert]\n    md      smu\n    txt     asciidoc -s -\n\n    [ignore]\n    Makefile\n\nHere we're only parsing (not converting to a different format) files matching `*.htm` and `*.html`.\n\nFiles matching `*.md` are going to be parsed and converted using the `smu` markdown parsing program.\n\nFiles matching `*.txt` are going to be parsed and converted using `asciidoc`.\n\nFiles matching `Makefile` will be ignored and not copied.\n\nConversion programs must accept a UNIX-style pipe and send converted data to stdout.\n\n## CREDITS\n\n* zsw: for the introduction to parameter expansion and other shell scripting techniques\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuex%2Fzodiac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuex%2Fzodiac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuex%2Fzodiac/lists"}