{"id":14069273,"url":"https://github.com/jmaczan/xiexie","last_synced_at":"2025-11-07T01:30:36.416Z","repository":{"id":173307904,"uuid":"524711042","full_name":"jmaczan/xiexie","owner":"jmaczan","description":"🎐 Static site generator","archived":false,"fork":false,"pushed_at":"2023-08-16T12:44:42.000Z","size":67,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-27T20:13:11.571Z","etag":null,"topics":["china","chinese","rust","ssg","static-site","static-site-generator","web","xiexie"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmaczan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-08-14T15:36:33.000Z","updated_at":"2023-07-31T21:59:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"a18b8262-7591-49a9-9c8e-a39c33a3d3b6","html_url":"https://github.com/jmaczan/xiexie","commit_stats":null,"previous_names":["jmaczan/xiexie"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmaczan%2Fxiexie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmaczan%2Fxiexie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmaczan%2Fxiexie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmaczan%2Fxiexie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmaczan","download_url":"https://codeload.github.com/jmaczan/xiexie/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239515301,"owners_count":19651720,"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":["china","chinese","rust","ssg","static-site","static-site-generator","web","xiexie"],"created_at":"2024-08-13T07:06:47.414Z","updated_at":"2025-11-07T01:30:36.370Z","avatar_url":"https://github.com/jmaczan.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"150\" src=\"xiexie.png\" alt=\"xiexie logo\"\u003e\u003c/p\u003e\n\n# `xiexie 谢谢`\nStatic site generator 个的静态网站生成器\n\n## Quick start\nIf you like learning by example, you can check out a [xiexie blog template](https://github.com/jmaczan/xiexie-blog-template) and play with it to get an intuition. To start you only need to know that the dynamic values are rendered by prefixing with `xiexie::` and each html needs a JSON config file, most of them are more or less copy-paste of another.\n\nFor a real-world usage of xiexie, you can check my [technical blog](https://maczan.pl/).\n\n## Install\nDownload xiexie from [releases](https://github.com/jmaczan/xiexie/releases)\n\nTo use it globally, copy xiexie to `/usr/bin`\n\n## Run\n```\nxiexie --source path/to/source/directory --target path/to/target/directory\n```\n\n## Documentation\n\nFor each page named i.e. `about`, you create 3 files: \n- HTML with content and `xiexie::`-prefixed tags (`about.html`)\n- CSS with page specific styles (`about.css`)\n- JSON (`about.json`)\n\nJSON file needs a specific schema, which is defined below.\n\n### Body tag\nThis is where content of a `template` is rendered.\n```HTML\nxiexie::body\n```\n\n### CSS tag\nIt is replaced with a `\u003clink\u003e` pointing to a page's CSS file.\n```HTML\nxiexie::css\n```\n\n### Aggregation tag\nUse aggregations when you want to make copies of some HTML structure multiple times. For example, when you want to render a collection of posts on a blog.\n```HTML\n\u003cxiexie::aggregation::aggregationName\u003e\n    xiexie::aggregation:aggregationName::fieldName\n\u003c/xiexie::aggregation::aggregationName\u003e\n```\n\n### JSON configuration schema\nThis is how your JSON file is structured.\n\nA file has a `purpose`. If it's a template for other pages, set it to `template`. If it renders a collection of pages, set it to `aggregator`. If it's a page (like `about.html`), set it to `\"page\"`.\n\nIf a file is a regular page, it needs a `template`. Put a name of a template as a value, i.e. `\"blog-post\"`.\n\n```py\n{\n    \"purpose\": \"template\" | \"aggregator\" | \"page\",\n    \"template\": templateFileName,\n    \"fields\": [\n        {\n            fieldFileName: \"value of field name\"\n        },\n        {\n            anotherFieldFileName: \"\"\n        }\n    ],\n    \"aggregations\": [\n        {\n            aggregationName: [\n                {\n                    fieldFileName: \"\"\n                },\n                {\n                    anotherFieldFileName: \"\"\n                }\n            ]\n        }\n    ]\n}\n```\n\n## Build\nIf you don't want to use a released binary version, build xiexie on your own. [Clone](https://github.com/jmaczan/xiexie.git) this repository\n\nRun `cargo build --release` in a project root directory. You need Rust and Cargo to build it\n\nA binary file will be available in `target/release/xiexie`\n\n## License\nFree for personal use. [Email me](mailto:jedrzejpawel@maczan.pl) for a commercial license.\n\n© Copyright [Jędrzej Paweł Maczan](https://maczan.pl/). Made in [Poland](https://en.wikipedia.org/wiki/Poland), 2022\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmaczan%2Fxiexie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmaczan%2Fxiexie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmaczan%2Fxiexie/lists"}