{"id":15290774,"url":"https://github.com/u-c-s/zola-npm","last_synced_at":"2026-01-18T03:59:05.742Z","repository":{"id":56788255,"uuid":"429454369","full_name":"U-C-S/zola-npm","owner":"U-C-S","description":"NPM Packages for Zola, A Static Site Generator","archived":false,"fork":false,"pushed_at":"2023-12-31T17:40:16.000Z","size":133,"stargazers_count":8,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T16:29:54.762Z","etag":null,"topics":["create-zola-site","npm","npm-package","static-site-generator","tera","zola","zola-bin"],"latest_commit_sha":null,"homepage":"https://npmjs.com/zola-bin","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/U-C-S.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-11-18T14:09:33.000Z","updated_at":"2024-06-21T16:38:52.875Z","dependencies_parsed_at":"2023-12-31T18:37:51.179Z","dependency_job_id":null,"html_url":"https://github.com/U-C-S/zola-npm","commit_stats":{"total_commits":76,"total_committers":5,"mean_commits":15.2,"dds":"0.39473684210526316","last_synced_commit":"733053da96e4fd4b9b5aaaf8525717bbf9845cf9"},"previous_names":["u-c-s/zola-tools"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/U-C-S%2Fzola-npm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/U-C-S%2Fzola-npm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/U-C-S%2Fzola-npm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/U-C-S%2Fzola-npm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/U-C-S","download_url":"https://codeload.github.com/U-C-S/zola-npm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248695482,"owners_count":21146956,"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":["create-zola-site","npm","npm-package","static-site-generator","tera","zola","zola-bin"],"created_at":"2024-09-30T16:09:24.286Z","updated_at":"2026-01-18T03:59:05.737Z","avatar_url":"https://github.com/U-C-S.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zola-npm\n\n[![npm](https://img.shields.io/npm/v/zola-bin?label=zola-bin-version)](https://www.npmjs.com/package/zola-bin)\n[![npm](https://img.shields.io/npm/v/@u-c-s/zola-linux-x64-gnu?label=zola-npm-latest)](https://www.npmjs.com/package/@u-c-s/zola-linux-x64-gnu)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/getzola/zola?label=zola-official-latest)](https://github.com/getzola/zola/releases)\n\nZola is a static site generator (SSG), similar to Hugo, Pelican, and Jekyll. It is written in Rust and uses\nthe [Tera](https://tera.netlify.com/) template engine, which is similar to Jinja2, Django templates, Liquid,\nand Twig. Content is written in [CommonMark](https://commonmark.org/), a strongly defined, highly compatible\nspecification of Markdown.\n\n### Official Links\n\n- [Website](https://www.getzola.org/)\n- [Documentation](https://www.getzola.org/documentation/getting-started/overview/)\n- [Forum](https://zola.discourse.group/)\n- [Github Repo](https://github.com/getzola/zola)\n\n### Why Zola as a NPM package ??\n\nThis package provides Node.js bindings for Zola, compiled directly from its source code and exposed via\n[Node-API](https://nodejs.org/api/n-api.html) or standard JavaScript calls. This approach ensures performance\nclose to that of native binaries while offering the convenience of an npm package, making deployment easier\nacross various environments due to Node.js' extensive ecosystem and support.\n\n## Usage\n\nAdd it as a dependency into your project or a new one, using....\n\n```bash\nnpm i zola-bin\n```\n\nor\n\n```bash\nnpm i -g zola-bin\n```\n\n### From CLI\n\nFormat: `npx zola-bin [args]`\n\n`args` are same as official zola [CLI](https://www.getzola.org/documentation/getting-started/cli-usage/).\nAdditionally, In your project's `package.json` file, you call it inside a script after adding it as a devDependency.\n\n```json\n\"scripts\": {\n    \"dev\": \"zola-bin serve --port 7000 --open\",\n    \"build\": \"zola-bin build\"\n}\n```\n\n---\n\n### JavaScript API\n\n```typescript\nimport { build, init, check, serve } from \"zola-bin\";\n```\n\nEach of these methods are a wrapper around the CLI commands. You can refer to the [JSdoc of each function](lib/main.ts)\nor the type definitions on how to use them.\n\n```typescript\ninterface BuildOptions {\n\tbaseUrl?: string;\n\toutputDir?: string;\n\tforce?: boolean;\n\tdrafts?: boolean;\n\tminify?: boolean;\n}\nexport declare function build(rootDir: string, configFile?: string, options?: BuildOptions): void;\n\ninterface ServeOptions {\n\tinterface: string;\n\tport: number;\n\toutputDir?: string;\n\tforce: boolean;\n\tbaseUrl?: string;\n\topen: boolean;\n\tstoreHtml: boolean;\n\tdrafts: boolean;\n\tfast: boolean;\n\tnoPortAppend: boolean;\n\textraWatchPaths: Array\u003cstring\u003e;\n\tdebounce?: number;\n}\nexport declare function serve(rootDir: string, configFile?: string, options?: ServeOptions): void;\n\nexport declare function init(name: string): void;\n\ninterface checkOptions {\n\tbasePath: string | undefined | null;\n\tbaseUrl: string | undefined | null;\n\tdrafts: boolean;\n\tskipExternalLinks: boolean;\n}\nexport declare function check(rootDir: string, configFile?: string, options?: checkOptions): void;\n```\n\n## Getting Started with Create Zola Site\n\nWith NPM installed, you can quickly setup a new _Zola_ site with the following command:\n\n```bash\nnpx create-zola-site -n {NAME}\n```\n\nThis will create a new directory `{NAME}` and initializes the necessary files in it. Note that the site created\nusing this process depends on Node.js, so you might see `package.json` and `node_modules` in the directory.\nThis doesn't mean it any works different than actual template initialized by Zola. But This template will\nsimplify the process of creating, building and deploying a new site.\n\nif you already have a existing site, you can add the `zola-bin` NPM package to make it work same as the one\ncreated with `create-zola-site`.\n\n```bash\nnpm init\nnpm i -D zola-bin\n```\n\nAnd then you can add the following script to your `package.json` file:\n\n```json\n\"scripts\": {\n    \"dev\": \"zola-bin serve --open\",\n    \"build\": \"zola-bin build\",\n}\n```\n\n## FAQ\n\n- What is the difference between Zola and create-zola-site template ?\n\n  - Nothing, directory structure is pretty much the same and works the same.\n  - create-zola-site template creates extra files - `package.json` and `node_modules`, with `zola-bin` npm\n    package as a devDependency, which builds bindings from the source code and exposes them as node.js function calls.\n\n- Why would I use this instead of the official one ?\n\n  - Because for few who are used to NPM, this package makes it feel more like its a part of NPM ecosystem.\n  - Easyily deploy the sites since Node.js and NPM are accepted by most of the hosting services.\n  - Simple installation and usage.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu-c-s%2Fzola-npm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fu-c-s%2Fzola-npm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu-c-s%2Fzola-npm/lists"}