{"id":13431402,"url":"https://github.com/ungoldman/sitedown","last_synced_at":"2025-09-25T17:39:34.989Z","repository":{"id":34803181,"uuid":"38788457","full_name":"ungoldman/sitedown","owner":"ungoldman","description":"📄 Turn some markdown files into a website.","archived":false,"fork":false,"pushed_at":"2023-12-11T09:10:16.000Z","size":233,"stargazers_count":68,"open_issues_count":10,"forks_count":4,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-14T06:51:20.416Z","etag":null,"topics":["generator","markdown","site","static","website"],"latest_commit_sha":null,"homepage":"https://ungoldman.com/sitedown","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ungoldman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-07-09T01:01:38.000Z","updated_at":"2024-03-19T15:27:41.000Z","dependencies_parsed_at":"2023-02-13T02:15:52.027Z","dependency_job_id":"e6afbba6-a529-4a34-85fc-79837a4743c6","html_url":"https://github.com/ungoldman/sitedown","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungoldman%2Fsitedown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungoldman%2Fsitedown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungoldman%2Fsitedown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungoldman%2Fsitedown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ungoldman","download_url":"https://codeload.github.com/ungoldman/sitedown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243735835,"owners_count":20339536,"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","markdown","site","static","website"],"created_at":"2024-07-31T02:01:02.848Z","updated_at":"2025-09-25T17:39:29.955Z","avatar_url":"https://github.com/ungoldman.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cdiv class=\"hero\" align=\"center\"\u003e\n\n\u003cimg src=\"./assets/page.png\"\u003e\n\n# sitedown\n\nMinimalist [Markdown](https://www.markdownguide.org/getting-started/)-based static site generator.\n\n[![npm][npm-image]][npm-url]\n[![build][build-image]][build-url]\n[![downloads][downloads-image]][npm-url]\n\n[npm-image]: https://img.shields.io/npm/v/sitedown.svg\n[npm-url]: https://www.npmjs.com/package/sitedown\n[build-image]: https://github.com/ungoldman/sitedown/actions/workflows/tests.yml/badge.svg\n[build-url]: https://github.com/ungoldman/sitedown/actions/workflows/tests.yml\n[downloads-image]: https://img.shields.io/npm/dm/sitedown.svg\n\n\u003c/div\u003e\n\n## Overview\n\nSitedown turns a folder with Markdown files into a static HTML site.\n\n```\n.                              build/\n├─ README.md         ==\u003e       ├─ index.html\n├─ about.md          ==\u003e       └─ about/\n│                              │  └─ index.html\n│                              │\n├─ docs/                       └─ docs/\n│  ├─ README.md      ==\u003e       │  ├─ index.html\n│  └─ ref.md         ==\u003e       │  └─ ref/\n│                              │     └─ index.html\n│                              │\n└─ assets/                     └─ assets/\n   └─ cat.jpg        ==\u003e          └─ cat.jpg\n```\n\nIt takes all markdown files in the current folder (and subfolders) and generates a new site in the `build` directory.\n\n- Converts `README.md` files into indexes (`index.html`).\n- Creates directory indexes for pretty URLs (`CHANGELOG.md` =\u003e `changelog/index.html`).\n- Supports custom layouts (comes with a default `layout.html`).\n- Copies assets (defaults to copying over contents of `assets` folder).\n- Comes with a `dev` mode that starts a server and watches for changes for easy local development.\n\nSitedown's [website](https://ungoldman.github.io/sitedown) was built with sitedown, so you know it's *for real*.\n\nRead the [Usage](#usage) section for a full overview of options and defaults.\n\n## Install\n\n```\nnpm install sitedown\n```\n\n## Usage\n\n### CLI\n\n```console\nUsage: sitedown [source] [options]\n\n    Example: sitedown . -b dist -l layout.html\n\n    source                path to source directory (default: current working directory)\n    --build, -b           path to build directory (default: \"build\")\n    --pretty              use directory indexes for pretty URLs (default: true)\n    --el, -e              css selector for target element (default: \".markdown-body\")\n    --layout, -l          path to layout file\n    --github-headings, -g add anchors to headings just like GitHub (default: false)\n    --no-hljs-class       don't add the hljs class to codeblocks (default: false)\n    --silent, -s          make less noise during build\n    --watch, -w           watch a directory or file (experimental)\n    --dev, -d             start development server (experimental) (default: false)\n    --assets, -a          assets folder to copy (default: \"assets\")\n    --version, -v         show version information\n    --help, -h            show help\n```\n\n### Node API\n\n```js\nvar sitedown = require('sitedown')\n\nvar options = {\n  source: '.',            // path to source directory                 default: cwd\n  build: 'build',         // path to build directory                  default: 'build' in cwd\n  pretty: true,           // use directory indexes for pretty URLs    default: true\n  el: '.markdown-body',   // css selector for target element          default: '.markdown-body'\n  layout: 'layout.html',  // path to layout                           default: none\n  githubHeadings: false,  // add anchors to headings just like GitHub default: false\n  noHljsClass: false,     // don't add hljs class to codeblocks       default: false\n  silent: false           // make less noise during build             default: false\n}\n\nsitedown(options, function (err) {\n  if (err) return console.error(err)\n  console.log('success')\n})\n```\n\n### Layout\n\nAll files are wrapped in a `layout.html` file. Markdown content is appended to the first `.markdown-body` element, and the page title (`\u003ctitle\u003e` in `\u003chead\u003e`) is set to the text of the first `h1` element.\n\nThe default layout is:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\u003e\n    \u003ctitle\u003e\u003c/title\u003e\n    \u003clink rel=\"stylesheet\" href=\"https://unpkg.com/style.css\"\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cmain class=\"markdown-body\"\u003e\u003c/main\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nThe default layout comes bundled with [`style.css`](https://ungoldman.github.io/style.css), a classless stylesheet for markdown documents.\n\n### Directory indexes (pretty URLs)\n\nMarkdown files (`$f.md`, `$f.markdown`) are lowercased and parsed into `$f/index.html` files. Directory indexes can be disabled with the `pretty: false` option. `README.md` files are always converted to directory indexes (`index.html`).\n\n### Links\n\nRelative links that point to markdown files (`$f.md`, `$f.markdown`) are rewritten as `$f/` to point to their `$f/index.html` equivalent.\n\n## Contributing\n\nContributions welcome! Please read the [contributing guidelines](CONTRIBUTING.md) first.\n\n## License\n\n[ISC](LICENSE.md)\n\nPage image is from [emojipedia](https://emojipedia.org/page-facing-up/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fungoldman%2Fsitedown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fungoldman%2Fsitedown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fungoldman%2Fsitedown/lists"}