phantomake

所属分类:代码编辑器
开发工具:TypeScript
文件大小:0KB
下载次数:0
上传日期:2023-12-01 19:48:02
上 传 者sh-1993
说明:  以文件为中心的静态站点生成器。
(A file-focused static site generator.)

文件列表:
.prettierignore (5, 2023-12-01)
.prettierrc (47, 2023-12-01)
LICENSE (733, 2023-12-01)
bun.lockb (93741, 2023-12-01)
bunfig.toml (70, 2023-12-01)
docs/ (0, 2023-12-01)
docs/.phantomake.toml (41, 2023-12-01)
docs/.templates/ (0, 2023-12-01)
docs/.templates/default.ejs (2662, 2023-12-01)
docs/.templates/navlinks.ejs (1910, 2023-12-01)
docs/api.md (7955, 2023-12-01)
docs/download.md (990, 2023-12-01)
docs/examples/ (0, 2023-12-01)
docs/examples/github_pages.md (5888, 2023-12-01)
docs/examples/github_pages_setting.png (26906, 2023-12-01)
docs/examples/includes.md (1900, 2023-12-01)
docs/examples/index.md (360, 2023-12-01)
docs/examples/pagination.md (3062, 2023-12-01)
docs/examples/templates.md (1578, 2023-12-01)
docs/favicon.ico (446, 2023-12-01)
docs/features.md (9971, 2023-12-01)
docs/index.md (1973, 2023-12-01)
docs/left_phantomake.png (3649, 2023-12-01)
docs/phantomake_banner.png (7688, 2023-12-01)
docs/styles.css (7120, 2023-12-01)
docs/usage.md (1497, 2023-12-01)
package.json (1519, 2023-12-01)
phantomake.png (3251, 2023-12-01)
src/ (0, 2023-12-01)
src/base.ts (2810, 2023-12-01)
src/cli.ts (5076, 2023-12-01)
src/compat.d.ts (114, 2023-12-01)
src/context.ts (4819, 2023-12-01)
src/index.ts (5568, 2023-12-01)
... ...

Phantomake

A file-focused static site generator.

Documentation - Download - Examples

## About Phantomake is a static site generator with specific goals: - Distributed as a single, standalone executable - When run on an existing static site, will (in most cases) output the exact same site with no changes - Can reuse common code (headers/footers/common HTML) across several pages with templates and includes - Can do pagination (e.g. for blog listings) Phantomake is written in [TypeScript](https://www.typescriptlang.org/) and runs on [Bun](https://bun.sh/). ## Install Binaries for MacOS and Linux ([Windows support eventually!](https://github.com/oven-sh/bun/issues/43)) are available from the [Releases](https://github.com/Osmose/phantomake/releases) page. Or, use the links below to fetch the latest builds: - [MacOS](https://github.com/Osmose/phantomake/releases/latest/download/phantomake-macos.tar.gz) - [Linux](https://github.com/Osmose/phantomake/releases/latest/download/phantomake-linux.tar.gz) If you have [Bun](https://bun.sh/) installed, you can also install Phantomake as a global package: ```sh bun add -g https://github.com/Osmose/phantomake/releases/latest/download/source.tar.gz ``` ## Usage Phantomake takes two arguments: a source directory and an output directory. It processes the source files and generates output files in the output directory: ```sh phantomake /path/to/source /path/to/output ``` Phantomake will transform files that meet one of the following criteria: - Any file with a `.ejs` extension will be processed as an [EJS template](https://ejs.co/). - Any file with a `.md` extension will be processed as [Markdown](https://www.markdownguide.org/). - Any text file (including `.ejs` or `.md` files) with a `template` value in [YAML front matter](https://jekyllrb.com/docs/front-matter/) will have a template applied to its output. - Any dotfile or dot directory (with a `.` at the start of its name) is not included in the output. All files that don't match any of these are copied without changes from the source to the output. See [the full documentation](https://www.mkelly.me/phantomake/features.html) for more information. ### Example: Shared Header Let's say we have a header for our website that we don't want to have to copy-paste to every page whenever we update it. We can put this header in a separate file: ```html

Phanto's Ghostlace Site

``` We can add the `.ejs` extension to our HTML files and use the `include` function of EJS to embed the content of `header.html` in the generated output: ```html Phanto's Ghostlace Site <%- include('.header.html') %>

Homepage

Welcome to Phanto's Ghostlace Site

``` Now we can run Phantomake: ```sh phantomake src output ``` This will create an `output/index.html` file with our shared header: ```html Phanto's Ghostlace Site

Phanto's Ghostlace Site

Homepage

Welcome to Phanto's Ghostlace Site

``` ## Developer Setup Before working on Phantomake you'll need a few tools: - [Git](https://git-scm.com/) - [Bun](https://bun.sh/) To set up your development copy: 1. Check out the repo: ```sh git clone https://github.com/Osmose/phantomake.git cd phantomake ``` 2. Install the dependencies: ```sh bun install ``` After this you can run the Phantomake CLI of your development copy using `bun cli` instead of `phantomake`: ```sh bun cli watch ./docs --verbose ``` ## License Phantomake is distributed under the [ISC license](LICENSE).

近期下载者

相关文件


收藏者