{"id":15016633,"url":"https://github.com/punund/20ful","last_synced_at":"2025-04-12T10:41:32.136Z","repository":{"id":38379693,"uuid":"246099673","full_name":"punund/20ful","owner":"punund","description":"Static site generator","archived":false,"fork":false,"pushed_at":"2024-11-27T05:51:43.000Z","size":1527,"stargazers_count":7,"open_issues_count":46,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-18T01:42:34.083Z","etag":null,"topics":["11ty","20ful","jekyll","livescript","markdown","pug","sass","static-site-generator","stylus","website"],"latest_commit_sha":null,"homepage":null,"language":"LiveScript","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/punund.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-03-09T17:29:04.000Z","updated_at":"2025-01-03T20:39:35.000Z","dependencies_parsed_at":"2023-12-28T17:24:56.729Z","dependency_job_id":"c3f9bd60-4846-4d91-bc56-6b14652a3c09","html_url":"https://github.com/punund/20ful","commit_stats":{"total_commits":97,"total_committers":3,"mean_commits":"32.333333333333336","dds":0.4639175257731959,"last_synced_commit":"1274d3a97571cc6b991a6471428a03319c16cdf6"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punund%2F20ful","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punund%2F20ful/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punund%2F20ful/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punund%2F20ful/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/punund","download_url":"https://codeload.github.com/punund/20ful/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239922486,"owners_count":19718969,"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":["11ty","20ful","jekyll","livescript","markdown","pug","sass","static-site-generator","stylus","website"],"created_at":"2024-09-24T19:49:10.044Z","updated_at":"2025-02-21T08:35:31.245Z","avatar_url":"https://github.com/punund.png","language":"LiveScript","funding_links":[],"categories":["LiveScript"],"sub_categories":[],"readme":"[![](https://img.shields.io/npm/v/20ful?style=plastic)](https://www.npmjs.com/package/20ful)\n\u003c!-- ![](https://github.com/punund/20ful/workflows/publish-npmjs/badge.svg) --\u003e\n\n# 20ful\n\nStatic site generator that makes sense.\n\n## Installation\n\n````\n$ npm init -y\n$ npm install 20ful\n````\n\n## Quick start\n\n````\n$ mkdir -p src/html\n$ cat \u003e src/html/hello.md\n---\nindex: true\n---\n# Hello world!\n^D\n$ 20ful\n````\n\nYou can also check the [example project](https://github.com/punund/20ful-example).\n\n## What it does\n\nThe generator takes in your input files, possibly applies conversions, and\nwrites them out, optionally starting a static web server for development.\n\n## Running and command line options\n\n`20ful build`\ncompiles your input files and exits\n\n`20ful watch`\ncompiles your input files and watches for changes\n\n`20ful serve`\nall the above, and starts static server, reloading it on change\nwith browser-sync. This is the default.\n\n`20ful proxy \u003cport\u003e`\nstarts HTTP proxy server instead and connects to given port.  This is useful\nif your site is not so static and you already have a server running, but \nwould like to watch for changes of the front end files.\n\n#### --port\n\nPort to listen on in `serve` or `proxy` mode.  The default is 3000.\n\n## Directory structure\n\nPut all your stuff in `src/`. It will get compiled and placed into\n`_site/`, preserving directory structure.  Dot files are ignored.\n\nFolder `src/html/` is special, the \"html\" part will be stripped in the resulting\npath, and for files compiled to HTML file name is made a folder, and the content\nis placed in `index.html` in it.\n\n| source | destination |\n| ---    | --- |\n| src/server-config        | _site/server-config |\n| src/assets/css/main.styl | _site/assets/css/main.css |\n| src/html/.git/           | *ignored* |\n| src/html/mypage.md       | _site/mypage/index.html |\n\nThis also means that if you create two files whose pathnames are different only\nin `html/` part, only one of them will make it to the output location, so don't\ndo that.\n\n## Conversions\n\nThe generator natively supports the following conversions:\n* for HTML: Markdown (`.md`), Pug (`.pug`), Nunjucks (`.njk`)\n* for CSS: Stylus (`.styl`), Sass (`.scss`, `.sass`)\n* for JavaScript: LiveScript (`.ls`)\n\nFile type is determined by its suffix.  All other files are copied as is to\ntheir destinations, including plain HTML, CSS, JavaScript, binary files, etc.\n\nAny file can have YAML-formatted, \"`---`\" delimited front matter (FM), which is\nstripped after processing.  Some behavior is defined by the front matter data.\n\n## Front matter attributes\n\n### template: _string_\n\nThe file is a named template, normally `pug` or `njk`. There is no designated\nlocation to store your templates, as long as they are within `src`, nor there\nare any particular filenames that you must give them. The following template\nvariables are special:\n\n#### body\nThe rendered file that used this template.\n\n#### toc\nTable of content, or navigation, within an `\u003col\u003e`. Built from `toc` attributes,\nsee below.\n#### eleventyNavigation\nSynonym for `toc`.\n\n#### css\nSet of `\u003clink\u003e` attributes referring to CSS files, if cache busting is enabled.\nSee below.\n\n#### js\nSet of `\u003cscript\u003e` attributes referring to JS files, if cache busting is enabled.\n\nAll special variables contain HTML and therefore must be passed in unsafe mode.\nDefault template `system` is always present, and just renders the body, so you\nmay want to name your first template \"system\" to override it.\n\n### layout: _string_\n\nThe file is rendered using the named template. Possible values:\n\n* _some name_\nnamed template is used.\n* `none`\nno template is used\n* _(attribute not present)_\ntemplate \"system\" is used\n\n### index: _boolean_\n\nIf set to `true`, this file is written to top-level `index.html` in the output\ndirecory.\n\n### toc: _object_\n\nObject, describing a table of content entry. Its attributes:\n\n* key: (visible label in the TOC link)\n* order: (entries are sorted using this value)\n\nTable of content is hierarchical and follows the directory structure. To have a\nuseful table of content organize your files:\n\n      My-Stories.md           [FM]  toc:\n                                       key: My cool stories\n      My-Stories/\n         Cool-story-1.md      [FM]  toc:\n                                       key: First cool story\n                                       order: 10\n         Another-story.md     [FM]  toc: ...\n\nThere is no need (and no way) to specify a parent, you can rearrange your\npages just moving them around, and TOC will be automatically rebuilt, and\nwill render to an ordered list: `\u003col\u003e\u003cli\u003e\u003ca href='/'\u003eMy cool stories\u003c/a...`\n\n\n### bust-cache: _boolean_\n\nIf set to `true`, enables cache busting for this CSS or JS file. Cache busting\nis done by automatically adding a hash suffix to the filename, changing as the\nfile content changes.  Template variables `css` and `js` will have the whole\nsequences of `\u003clink\u003e` and `\u003cscript\u003e` attributes which you need to pass verbatim\nto templates.\n\nFor all files that compile to CSS `css` variable stores a sequence of `link`\ntags:\n\n    \u003clink rel=stylesheet href='/path/filename-34856.css'\u003e\u003clink ...\n    \nFor all files that compile to JavasScript `js` variable stores a sequence of\n`script` tags:\n\n    \u003cscript src='/path/filename-51536.js'\u003e\u003cjs ...\n\nIn a pug template, put `| !{css}` and `| !{js}` within the head.\n\n### order: _number_\n\nThis controls the order of tags within cache-busted `css` and `js` variables.\n\n### options: _object_\n\nOptions to pass to the compiler.  See the `jstransformer` for the\nrelevant language.  Examples:\n\n `main.ls`:\n\n    ---\n    options:\n       bare: true\n    ---\n    f = a \u003e\u003e b\n    # LiveScript won't generate top-lever wrapper.\n\n`page.pug`:\n\n    ---\n    options:\n        doctype: html\n    ---\n    p(x-attr)\n    // This shall render to `\u003cp x-attr=\"x-attr\"\u003e`.\n\n### ignore: _boolean_\n\nIf set to true, this file is skipped.\n\n\n## Config file\n\nUser configuration is read from `./20ful-config.yaml`.  The defaults are:\n\n```\nsource:  src\noutroot: _site\nmarkdown-it-plugins:\n  markdown-it-mark: true\n  markdown-it-multimd-table:\n    headerless:   true\n    multiline:    true\n    rowspan:      true\n```\n\nMarkdown-it-plugins are what they appear to be. To add a markdown-it plugin:\n* install `markdown-it-plugin-\u003cname\u003e`\n* mention it in the config (`false` to disable)\n\nIf the plugin takes options, give them as sub-keys.\n\n## Motivation\n\nI was amazed by the amount of effort put by people into something as simple as\nsite generators, and at the same time frustrated by the absence of obvious\nfunctionality, such as preprocessing of CSS.\n\nThis project is not nearly as grandiose (under 350 lines of code as of now),\nstill it covers most basic needs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpunund%2F20ful","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpunund%2F20ful","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpunund%2F20ful/lists"}