{"id":17874302,"url":"https://github.com/jomy10/pufferfish","last_synced_at":"2025-03-21T22:31:51.458Z","repository":{"id":56889531,"uuid":"456476213","full_name":"Jomy10/pufferfish","owner":"Jomy10","description":"An extensible html templating engine that generates static html.","archived":true,"fork":false,"pushed_at":"2025-03-13T12:48:13.000Z","size":77674,"stargazers_count":2,"open_issues_count":16,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T11:52:04.147Z","etag":null,"topics":["cli","compiler","developer-tools","fast","html","npm","rust","static-site","template","template-engine","template-language","templates"],"latest_commit_sha":null,"homepage":"https://pufferfish.jonaseveraert.be","language":"Rust","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/Jomy10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-07T11:25:28.000Z","updated_at":"2025-03-13T12:48:50.000Z","dependencies_parsed_at":"2022-08-20T16:50:25.491Z","dependency_job_id":null,"html_url":"https://github.com/Jomy10/pufferfish","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jomy10%2Fpufferfish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jomy10%2Fpufferfish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jomy10%2Fpufferfish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jomy10%2Fpufferfish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jomy10","download_url":"https://codeload.github.com/Jomy10/pufferfish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244880328,"owners_count":20525506,"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":["cli","compiler","developer-tools","fast","html","npm","rust","static-site","template","template-engine","template-language","templates"],"created_at":"2024-10-28T11:08:27.140Z","updated_at":"2025-03-21T22:31:51.449Z","avatar_url":"https://github.com/Jomy10.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pufferfish\n\n[![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/jomy10/pufferfish?include_prereleases)](#download)\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/jomy10/pufferfish/Cargo%20Release)](#download)\n[![npm](https://img.shields.io/npm/v/pufferfish-html)](https://www.npmjs.com/package/pufferfish-html)\n[![Website](https://img.shields.io/website?down_message=down\u0026label=docs\u0026up_message=up\u0026url=https%3A%2F%2Fpufferfish.jonaseveraert.be)](https://pufferfish.jonaseveraert.be/docs/intro)\n\nPufferfish is an extensible html templating engine that generates raw html, meaning that it will not affect load times of websites.\n\nA full-blown javascript framework is sometimes a bit overkill for a static website. Pufferfish adds some simple templating to html so you don't have to use such a framework for small projects or for pages that require fast loading. Pufferfish will compile your files to raw html.\n\n**Pufferfish is still under heavy development - A 1.0 release is currently being developped in the `1.0` branch. This is a restructure of the project and will implement a lot of new features**\n\n\u003e [!WARNING]\n\u003e This repository is no longer actively mainained\n\n[To the documentation!](https://pufferfish.jonaseveraert.be)\n\n\u003cdetails\u003e\n    \u003csummary\u003eTable of contents\u003c/summary\u003e\n\n- [Overview](#overview)\n    - [Syntax](#syntax)\n    - [Setting up a Pufferfish project](#setting-up-a-pufferfish-project)\n    - [Compiling html](#compiling-html)\n    - [Config file](#config-file)\n- [Download](#download)\n- [Integrations](#integrations)\n- [Contributing](#contributing)\n- [License](#license)\n\u003c/details\u003e\n\n## Overview\n### Syntax\nTo include a template file inside of html, simply write `%filename%`.\n\n**Example**\n```html\n\u003chtml\u003e\n  \u003cbody\u003e\n    %menu%\n    %header.html%\n    %footer.handlebars%\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nIf the filename does not include a file extension, `.html` will be used. You can also specify files with other file extensions.\n\nWhen compiled, the html above will expand to include the `menu.html`, `header.html` and `footer.handlebars` file contents.\n\n*In the future, Pufferfish will support passing variabls to html. Pufferfish is still in early development. If you have any suggestions for its future, please suggest them by opening an issue!*\n\n### Setting up a Pufferfish project\n\nThe recommended folder structure for a Pufferfish project is the followng: \n\n```\nproject_name\n├── assets\n├── html\n├── output\n├── templates\n└── pufferfish.toml\n```\n\n- `html`: contains the html of your website (like the file shown in the [Syntax](#syntax) section as example).\n- `output`: contains the output of pufferfish.\n- `templates`: contains the files to be used as templates (e.g. `menu.html` in the example)\n- `Pufferfish.toml`: the configuration file for the project\n\nThese directories can also be set using the [config file](#config-file).\n\n### Compiling html\nInside of the directory of the project, run `puf build`. This will take into account the the [config file](#config-file) and build html to the output directory.\n\n### Config file\n\nEvery Pufferfish project needs a `pufferfish.toml` file.\n\nThe minimum config file looks like this:\n\n```toml\n[project]\n```\n\nHere is a complete config file with all possible settings and their default values:\n\n```toml\n[project]\nhtml_dir = \"html\"\ntemplate_dir = \"templates\"\noutput_dir = \"output\"\nassets_dir = \"assets\"\npretty = false\nminify = false\nverbose = false\n \n[minify]\nmethod = \"default\" # values: (default | onepass)\nminify_doctype = true\nensure_spec_compliant_unquoted_attribute_values = true\nkeep_closing_tags = true\nkeep_html_and_head_opening_tags = true\nkeep_spaces_between_attributes = false\nkeep_comments = false\nminify_css = true\nminify_js = true\nremove_bangs = false\nremove_processing_instructions = false\n\n[server]\nport = \"8080\"\n```\n\n## Further documentation\nGo to the dedicated [documentation](pufferfish.jonaseveraert.be/docs/intro) or [tutorial](pufferfish.jonaseveraert.be/tutorial/intro) for more information on Pufferfish.\n\n## Download\n\nYou can download Pufferfish with the following command:\n\n```bash\ncurl \"https://raw.githubusercontent.com/Jomy10/pufferfish/master/installation/install.sh\" | sh\n```\n\nOr, you can download Pufferfish from **npm**:\n\n```bash\nnpm i -g pufferfish-html\n```\n\nTest if the package was installed using `puf --version`.\n\n### Manual installation\nHead over to the [Github releases](https://github.com/Jomy10/pufferfish/releases/latest) page and download the correct build for your operating system. You now have an executable which can be moved to the correct directory (e.g. `/usr/local/bin`).\n\n### Manual compilation\nPufferfish can be compiled for any platform, to do so, copy this repository:\n\n```bash\ngit clone https://github.com/Jomy10/pufferfish.git\n```\n\nThen, go into the directory containing the project:\n\n```bash\ncd pufferfish/pufferfish\n```\n\nRun `cargo build --release` and the executable will be put in the `target` directory.\n\n## Integrations\nPufferfish is made so it can be included in other build processes. It also includes integrations with [htmlbeautifier](https://github.com/threedaymonk/htmlbeautifier) and [minify-html](https://crates.io/crates/minify-html) (and [minify-html-onepass](https://crates.io/crates/minify-html-onepass)).\n\n## Contributing\nContributions are always welcome. Read the [CONTRIBUTING](.github/CONTRIBUTING.md) file for more information!\n\n## License\nPufferfish is licensed under the [MIT license](LICENSE).\n\n© Jonas Everaert 2022\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjomy10%2Fpufferfish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjomy10%2Fpufferfish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjomy10%2Fpufferfish/lists"}