{"id":25031891,"url":"https://github.com/lgraubner/zelos","last_synced_at":"2025-03-30T19:40:35.239Z","repository":{"id":69992647,"uuid":"129411144","full_name":"lgraubner/zelos","owner":"lgraubner","description":"☄️ A batteries included static site generator for Node.js","archived":false,"fork":false,"pushed_at":"2018-08-28T13:59:43.000Z","size":48450,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T16:53:22.180Z","etag":null,"topics":["generator","javascript","nodejs","static-html","static-site","static-site-generator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/lgraubner.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":"2018-04-13T14:09:32.000Z","updated_at":"2018-08-28T14:01:47.000Z","dependencies_parsed_at":"2023-03-11T07:40:55.997Z","dependency_job_id":null,"html_url":"https://github.com/lgraubner/zelos","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/lgraubner%2Fzelos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgraubner%2Fzelos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgraubner%2Fzelos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgraubner%2Fzelos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lgraubner","download_url":"https://codeload.github.com/lgraubner/zelos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246372505,"owners_count":20766625,"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":["generator","javascript","nodejs","static-html","static-site","static-site-generator"],"created_at":"2025-02-05T22:45:32.022Z","updated_at":"2025-03-30T19:40:35.234Z","avatar_url":"https://github.com/lgraubner.png","language":"JavaScript","readme":"___\n\n⚠️ This is a work in progress and not tested in production. It's not likely that I will ever finish it (I can recommend [Gatsby](https://www.gatsbyjs.org/) instead), but this might be useful to learn how a static site generator can be built and how to structure a CLI heavy lib.\n___\n\n# Zelos\n\n\u003e ☄️ A batteries included static site generator for Node.js\n\n### Table of contents\n\n- [Install](#install)\n- [CLI](#cli)\n- [Usage](#usage)\n  - [Configuration](#configuration)\n  - [Variables](#variables)\n  - [Pages](#pages)\n  - [Layouts](#layouts)\n  - [Asset pipeline](#asset-pipeline)\n  - [Static data](#static-data)\n- [Motivation](#motivation)\n- [License](#license)\n\n## Install\n\nEither install as global package or dependency of your project.\n\n```bash\nnpm install -g zelos\n# or\nnpm install -D zelos\n```\n\n## CLI\n\n### build\n\nStarts the build process creating production ready files in the `public` folder.\n\n```bash\nzelos build [options]\n```\n\n#### --drafts\n\nPages with `draft: true` will not be built by default. To build drafts add this option.\n\n### serve\n\nStarts a local webserver serving the content from the public directory. Don't use this for production!\n\n```bash\nzelos serve\n```\n\n### new\n\nBootstraps a new project in the given path or current directory if no path is specified. Creates necessary folders, config and default layouts.\n\n```bash\nzelos new [path] [options]\n```\n\n#### --url\n\nAs it's advised to set an [siteUrl](#defaults) you can directly set the siteUrl during initialization. The value gets written to the `config.json`.\n\n## Usage\n\n### Configuration\n\nThere are three places Zelos is looking for configuration options. First of all Zelos extracts information from the `package.json` file if present. The following fields are mapped to Zelos config options:\n\n```\nhomepage =\u003e siteUrl\nauthor =\u003e (parsed) author\ndescription =\u003e description\nname =\u003e siteName\n```\n\nAdditionally the whole zelos config can be placed in the `package.json` using `zelosConfig` as field name.\n\nFinally Zelos is looking for a `config.json` file to extract configuration options from. The priority is as follows (low to high):\n\n```\npackage.json \u003e zelosConfig \u003e config.json \u003e CLI\n```\n\nThere are some options such as `drafts` which can be set via CLI. Those have the highest priority and overwrite corresponding options listed in any of the places above.\n\n#### Defaults\n\nBy default you don't have to set any options except `siteUrl`. The `siteUrl` is needed to generate a valid sitemap and RSS feed as well as permalinks.\n\nAll options have sensible defaults to generate a solid static website but can be adjusted as needed.\n\n```json\n{\n  \"assetDir\": \"assets\",\n  \"contentDir\": \"content\",\n  \"defaultLayout\": \"default\",\n  \"defaultPageType\": \"page\",\n  \"drafts\": false,\n  \"language\": \"en\",\n  \"layoutDir\": \"layouts\",\n  \"minify\": true,\n  \"publicDir\": \"public\",\n  \"rss\": true,\n  \"rssFilename\": \"feed.xml\",\n  \"rssRegex\": \"\\.md$\",\n  \"serviceWorker\": true,\n  \"sitemap\": true,\n  \"staticDir\": \"static\"\n}\n```\n\n### Variables\n\n#### site\n\n#### page\n\n### Pages\n\n### Layouts\n\nEvery site requires an `_base.html` layout. This file should contain the base html structure (head, body etc.) and is used for every page. This layout can be adjusted as needed. All [site and page variables](#variables) are available.\n\nAdditionally you can create your own layouts. To reference a layout add `layout: NAME` to the frontmatter of each page which should use your layout. By default every page uses the `default.html` layout. This can be changed in the configuration. To explicitly not use a layout add `layout: null` the the corresponding pages frontmatter. The `_base.html` will always be applied.\n\nEvery layout should contain the `{{{content}}}` handlebars expression. This will be replaced with the page content (or layout in case of `_base.html`).\n\n\n### Asset pipeline\n\nZelos has a simple builtin asset pipeline. Any files in `assets/css/` and `assets/js/` will be processed automatically.\n\n### Static data\n\nAll files in the `static` folder will be copied to the `public` folder without further processing. Use this for static files such as favicons, images and other data needed in production.\n\n## Motivation\n\nThere are a lot of awesome generators out there such as [Gatsby](https://gatsbyjs.org), [Hugo](http://gohugo.io), [Hexo](https://hexo.io) and many more. You might ask why another static site generator.\n\n..\nThis package aims for a zero config experience to quickly create static websites. In contrast to the bundler ecosystem (Webpack, Parcel, et al.) most static site generators written for Node.js are heading to a plugin based architecture. This makes them very flexible but require some decent amount of time to configure in the first place.\n\n## License\n\n[MIT](https://github.com/lgraubner/zelos/blob/master/LICENSE) © [Lars Graubner](https://larsgraubner.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgraubner%2Fzelos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flgraubner%2Fzelos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgraubner%2Fzelos/lists"}