{"id":16395400,"url":"https://github.com/williamd1k0/sake","last_synced_at":"2025-04-04T14:24:07.524Z","repository":{"id":49355261,"uuid":"517456619","full_name":"williamd1k0/sake","owner":"williamd1k0","description":"A simple static site generator built with make.","archived":false,"fork":false,"pushed_at":"2023-11-19T00:18:29.000Z","size":38,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-10T00:14:58.985Z","etag":null,"topics":["jinja2","jq","make","static-site","static-site-generator","yaml"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/williamd1k0.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":"2022-07-24T23:07:14.000Z","updated_at":"2024-08-09T04:54:04.000Z","dependencies_parsed_at":"2024-12-17T17:43:45.680Z","dependency_job_id":"d1514e26-6e20-45d7-ba7c-d3a8acfa3f02","html_url":"https://github.com/williamd1k0/sake","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/williamd1k0%2Fsake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamd1k0%2Fsake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamd1k0%2Fsake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamd1k0%2Fsake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/williamd1k0","download_url":"https://codeload.github.com/williamd1k0/sake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247191580,"owners_count":20898957,"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":["jinja2","jq","make","static-site","static-site-generator","yaml"],"created_at":"2024-10-11T05:04:46.148Z","updated_at":"2025-04-04T14:24:07.503Z","avatar_url":"https://github.com/williamd1k0.png","language":"Makefile","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Sake 🍣\n\nA simple static site generator built with make.\n\n## Concept\nI created this site generator because I wanted something to use for simple projects, which aren't always blogs, so I didn't want to mess with other site generators, which are usually complex because they have too many features (or are just bloated, like jekyll).\n\nThe goal was to make it as simple as possible without sacrificing usability.\n\n### Name\n\nIf you are curious about the name \"sake\", it's an acronym of the words **S**ite and M**ake**.\n\nSake means salmon in Japanese (鮭/さけ).\n\n## Deps\n\n### make\n`make` is used for building everything.\n- Official website: https://www.gnu.org/software/make/\n\n`make` can be installed from various distro repos.\n\n### jinja2\n`jinja2` is used for processing template files (*.j2).\n\nIt's a python library, but I'm using a standalone command-line implementation.\n- Official website: https://jinja.palletsprojects.com\n- CLI website: https://github.com/mattrobenolt/jinja2-cli\n\n`jinja2-cli` can be installed from source using `pip`:\n```shell\npip install jinja2-cli\n```\n\n### fd\n`fd` is used for finding project resources recursively.\n\nIt's an user-friendly alternative to `find`.\n- Official website: https://github.com/sharkdp/fd\n\n`fd` can be installed from various distro repos.\n\nIt can also be installed from source using `cargo`:\n```shell\ncargo install fd-find\n```\n\n### jq\n`jq` is used for parsing JSON data.\n- Official website: https://stedolan.github.io/jq/\n\n`jq` can be installed from various distro repos.\n\n### yj\n`yj` is used for converting data from YAML to JSON.\n- Official website: https://github.com/bruceadams/yj\n\n`yj` can be installed from source using `cargo`:\n```shell\ncargo install yj\n```\n\n## Basic Usage\n\nAfter installing all deps, just copy/link the `Makefile` to your project directory.\n\nRun `init` task to initialise a sample with basic configs:\n```shell\nmake init\n```\n\nThen build the project running the default task:\n```shell\nmake\n```\n\nAll processed files will be saved to `out/` directory.\n\n## Project Structure\n\n### Basic directory structure\n\n- `/`: project base directory\n  - `Makefile`: all build processes are defined here\n  - `src/`: all static resources (html, js, css etc) and templates (*.j2) are stored here\n  - `site.yml`: all site variables are defined in this file (equivalent to jekyll's `_config.yml`)\n  - `build.mk`: optional Makefile to define custom build settings like input/output directories, includes and excludes (this file is automatically included in the main `Makefile`)\n\n### Sources directory\n\nAll files in the `src/` directory are processed as follows:\n- If the file ends with `*.j2`, it will be processed by the template engine and saved in the output directory using the same path structure, but without the .j2 extension.\n  - Eg: The file `src/page01/index.html.j2` will be processed and saved to `out/page01/index.html`\n- All other files (any extension other than `*.j2` and `*.meta`) will be copied to the output directory as is.\n\n### Includes\n\nIncludes are optional.\n\nAll layouts and other utils must be stored outside of the `src/` directory.\n\nThe includes directories can have any structure, just make sure they are registered in the `build.mk` file.\n\nEg: If you have two include folders, `layouts/` and `utils/`, add the following line to the `build.mk` file:\n```py\nINCLUDES := layouts utils\n```\n\n\u003eNOTE: the layouts and other includes are equivalent to jekyll's `_layouts` and `_includes` directories.\n\n### Layouts\n\nLayouts are optional.\n\nYou can create layouts by creating templates (`.j2`) that follow the Jinja2 Child Template format.\n\nSee more about Jinja2 Child Template here: https://jinja.palletsprojects.com/en/2.11.x/templates/#child-template\n\nStore all layouts outside of the `src/` directory. Follow the rules for `includes` mentioned above.\n\n## Data\n\n### Site data\n\nAll data added to the `site.yml` file can be accessed within any template (`.j2`) using the `site` object.\n\nEg: If you want to print the site title:\n```jinja2\n\u003ctitle\u003e{{ site.title }}\u003c/title\u003e\n```\n\n\u003eNOTE: the `site.yml` file is equivalent to the jekyll's `_config.yml` file.\n\n### Template Metadata\n\nTemplate metadata is optional.\n\nTemplates can have metadata such as page title, date, tags etc.\n\nMetadata is accessible within the template (`.j2`) and is most useful if you are using layouts.\n\nMetadata is stored in a .meta file along with the template files.\n\nIt uses the same YAML syntax as `site.yml`.\n\nEg: If you want to add metadata to a template called `index.html.j2`:\n- Create a file called `index.html.meta` in the same directory.\n\nMetadata example:\n\n```yaml\ntitle: About Me\ntags: [page, about]\n```\n\nMetadata variables are accessed within the template using the `page` object.\n\nEg: If you want to print the page title:\n```jinja2\n\u003ch1\u003e{{ page.title }}\u003c/h1\u003e\n```\n\n\u003eNOTE: metadata files are equivalent to jekyll's front matter.\n\n### Custom Data\n\nCustom data are optional.\n\nYou can create custom data files that can be accessed in any template.\n\nCustom data can be stored in any directory outside the `src/` directory, just make sure it's registered in the `build.mk` file.\n\nEg: If your custom data directory is called `data/`, add the following line to the `build.mk` file:\n```py\nDATA := data\n```\n\nAll custom data must be created using YAML syntax and stored with the `.yml` extension.\n\nAll custom data can be accessed within any template (`.j2`) using the `data` object.\n\nEg: If you have custom data saved as `data/authors.yml`, you can access it like this:\n```jinja2\n{% for author in data.authors %}\n\u003cp\u003e{{ author.name }}\u003c/p\u003e\n{% endfor %}\n```\n\u003eNOTE: custom data files are equivalent to jekyll's data files.\n\n\n## Showcase\n\nProjects already using Sake:\n\n- [GDScript Playground](https://gd.tumeo.space)\n- [MANGA Plus Top 40](https://manga.tumeo.space)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamd1k0%2Fsake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliamd1k0%2Fsake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamd1k0%2Fsake/lists"}