{"id":26260567,"url":"https://github.com/bbfh-dev/mend.html","last_synced_at":"2025-03-13T23:16:17.084Z","repository":{"id":280982891,"uuid":"943819187","full_name":"bbfh-dev/mend.html","owner":"bbfh-dev","description":"Simple HTML template processor designed to, but not limited to be used to generate static websites","archived":false,"fork":false,"pushed_at":"2025-03-06T10:44:23.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T11:27:14.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbfh-dev.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":"2025-03-06T10:13:42.000Z","updated_at":"2025-03-06T10:43:21.000Z","dependencies_parsed_at":"2025-03-06T11:37:29.057Z","dependency_job_id":null,"html_url":"https://github.com/bbfh-dev/mend.html","commit_stats":null,"previous_names":["bbfh-dev/mend.html"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbfh-dev%2Fmend.html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbfh-dev%2Fmend.html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbfh-dev%2Fmend.html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbfh-dev%2Fmend.html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbfh-dev","download_url":"https://codeload.github.com/bbfh-dev/mend.html/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243495486,"owners_count":20299924,"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":"2025-03-13T23:16:16.388Z","updated_at":"2025-03-13T23:16:17.075Z","avatar_url":"https://github.com/bbfh-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔩 mend.html\n\nMend is a simple HTML template processor designed to, but not limited to be used to generate static websites.\n\n\u003e [!CAUTION]\n\u003e This project is currently in **Beta**, meaning that it is \u003cu\u003eNOT\u003c/u\u003e production ready.\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Example Usage](#example-usage)\n- [Language Specification](#language-specification)\n  - [1. Comment Statements](#1-comment-statements)\n    - [Extend Statement](#extend-statement)\n    - [If Statement](#if-statement)\n    - [Range Statement](#range-statement)\n    - [Include Statement](#include-statement)\n    - [Slot Statement](#slot-statement)\n  - [2. Expression Statements](#2-expression-statements)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n# Installation\n\nDownload the [latest release](https://github.com/bbfh-dev/mend.html/releases/latest) or install via the command line with:\n\n```bash\ngo install github.com/bbfh-dev/mend.html\n```\n\n# Usage\n\nRun `mend --help` to display usage information.\n\n## Example Usage\n\n```bash\nmend build -s '{\"title\":\"Hello World!\",\"filename\":\"index.html\",\"items\":[]}' example/index.html \u003e dist/output.html\n```\n\nThis command builds the `example/index.html` file along with all its dependencies into `dist/output.html` using the provided JSON parameters.\n\nNote that `mend build` outputs the result into **Stdout**, which is why `\u003e` operator is used to redirect output into a file.\n\n# Language Specification\n\n\u003e [!TIP]\n\u003e In the documentation, `[argument]` denotes required arguments and `(argument)` denotes optional ones.\n\nMend processes a file's content unchanged until it encounters one of two types of mend statements:\n\n## 1. Comment Statements\n\n\u003e [!IMPORTANT]\n\u003e Mend comments must be on separate, single lines to be recognized and processed.\n\nThere are two types of comment statements:\n\n- `\u003c!-- @... --\u003e` — A simple inline mend statement.\n- `\u003c!-- #... --\u003e` paired with `\u003c!-- /... --\u003e` — A mend block used to wrap a section of content.\n\n### Extend Statement\n\n**Syntax:**\\\n`\u003c!-- #extend [filename] (parameters) --\u003e` ... `\u003c!-- /extend --\u003e`\n\nThis statement extends a referenced file. Use the [Slot statement](#slot-statement) within the parent file to define where the child content should be inserted.\n\n### If Statement\n\n**Syntax:**\\\n`\u003c!-- #if [name] [operator] [value] --\u003e` ... `\u003c!-- /if --\u003e`\n\nThis block conditionally removes its enclosed content if the specified condition evaluates to false.\n\n**Supported Operators:**\n\n- `==` (equals)\n- `!=` (does not equal)\n- `has` (checks if an array contains a specified element)\n- `lacks` (checks if an array does not contain a specified element)\n\n### Range Statement\n\n**Syntax:**\\\n`\u003c!-- #range [parameter] --\u003e` ... `\u003c!-- /range --\u003e`\n\nThis block iterates over an array. To access properties of the current item, prefix the expression with `#` (for example, `{{ #.child_property }}`).\n\n### Include Statement\n\n**Syntax:**\\\n`\u003c!-- @include [filename] (parameters) --\u003e`\n\nThis inline statement inserts the contents of the referenced file directly into the current document.\n\n### Slot Statement\n\n**Syntax:**\\\n`\u003c!-- @slot --\u003e`\n\nThis statement marks the insertion point for content when a file is extended. **Note:** Each file can declare only one slot.\n\n## 2. Expression Statements\n\nExpression statements insert values directly into the output.\n\n- An expression beginning with `.` accesses a property from the input JSON (e.g. `{{ .path.to.name }}` retrieves the value at `path.to.name`).\n- Using just `.` outputs the entire JSON object (the root).\n\nExpressions can also include modifiers, using the format: `{{ modifier_name .path.to.property }}`.\n\n**Supported Modifiers:**\n\n- `length`, `len`, or `size` — Returns the length of an array.\n- `quote` — Wraps the output value in double quotes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbfh-dev%2Fmend.html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbfh-dev%2Fmend.html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbfh-dev%2Fmend.html/lists"}