{"id":13624941,"url":"https://github.com/yuanqing/single-page-markdown-website","last_synced_at":"2025-10-04T01:31:57.394Z","repository":{"id":45989227,"uuid":"317073550","full_name":"yuanqing/single-page-markdown-website","owner":"yuanqing","description":":hot_pepper: Create a nice single-page documentation website from one or more Markdown files","archived":false,"fork":false,"pushed_at":"2021-11-23T03:19:11.000Z","size":1980,"stargazers_count":48,"open_issues_count":3,"forks_count":15,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-17T23:40:20.697Z","etag":null,"topics":["docs","markdown","static-site-generator"],"latest_commit_sha":null,"homepage":"https://yuanqing.github.io/single-page-markdown-website/","language":"TypeScript","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/yuanqing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-30T00:45:40.000Z","updated_at":"2024-11-10T15:54:55.000Z","dependencies_parsed_at":"2022-07-20T04:47:32.689Z","dependency_job_id":null,"html_url":"https://github.com/yuanqing/single-page-markdown-website","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/yuanqing%2Fsingle-page-markdown-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuanqing%2Fsingle-page-markdown-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuanqing%2Fsingle-page-markdown-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuanqing%2Fsingle-page-markdown-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuanqing","download_url":"https://codeload.github.com/yuanqing/single-page-markdown-website/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235208997,"owners_count":18953003,"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":["docs","markdown","static-site-generator"],"created_at":"2024-08-01T21:01:48.490Z","updated_at":"2025-10-04T01:31:56.998Z","avatar_url":"https://github.com/yuanqing.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"![Single-Page Markdown Website](media/single-page-markdown-website.svg)\n\n\u003e Create a nice single-page documentation website from one or more Markdown files\n\n# Features\n\n- Zero configuration\n- Render a table of contents, shortcuts to the top-level sections, and custom links\n- Include the contents of other Markdown files using a special syntax\n- Responsive from mobile and up\n- Dark mode (follows system settings)\n\n# Quick start\n\n*Requires [Node.js](https://nodejs.org).*\n\n```sh\n$ npx --yes -- single-page-markdown-website '*.md' --open\n```\n\nThe above command does the following:\n\n- Concatenates the given globs of Markdown files (`'*.md'`) and renders the result as a single-page website to `./build/index.html`.\n- Copies any local image file referenced in the Markdown to `./build/images`.\n- Opens the rendered page in your default web browser.\n\n# Configuration\n\nConfiguration is via the **`\"single-page-markdown-website\"`** key of your `package.json` file.\n\n- Single-Page Markdown Website works without configuration out of the box; all configuration options are optional.\n- Some configuration options default to values specified in your `package.json` or `lerna.json`.\n\n```json\n{\n  \"single-page-markdown-website\": {\n    \"baseUrl\": \"https://yuanqing.github.io/single-page-markdown-website/\",\n    \"title\": \"Single-Page Markdown Website\",\n    \"description\": \"Create a nice single-page documentation website from one or more Markdown files\",\n    \"toc\": true,\n    \"sections\": true,\n    \"links\": [\n      {\n        \"text\": \"GitHub\",\n        \"url\": \"https://github.com/yuanqing/single-page-markdown-website\"\n      }\n    ],\n    \"faviconImage\": \"media/favicon.svg\",\n    \"shareImage\": \"media/share.png\"\n  }\n}\n```\n\n## `\"baseUrl\"`\n\n(*`null`* or *`string`*)\n\nThe base URL of the single-page website.\n\n- Defaults to `null`\n\n## `\"title\"`\n\n(*`null`* or *`string`*)\n\nThe title of the page.\n\n- Defaults to `packageJson.name`, else `null`\n\n## `\"description\"`\n\n(*`null`* or *`string`*)\n\nThe `meta` description of the page.\n\n- Defaults to `packageJson.description`, else `null`\n\n## `\"toc\"`\n\n(*`boolean`*)\n\nWhether to render a Table of Contents.\n\n- Defaults to `true`\n\n## `\"sections\"`\n\n(*`boolean`*)\n\nWhether to render sections shortcuts in the menu. (Sections are the level-one headers (`# `) in the Markdown.)\n\n- Defaults to `true`\n\n## `\"links\"`\n\n(*`Array\u003c{ text: string, url: string }\u003e`*)\n\nA list of links to add to the menu.\n\n- Defaults to `[{ text: 'GitHub', url: packageJson.homepage }]`, else `null`\n\n## `\"faviconImage\"`\n\n(*`null`* or *`string`*)\n\nThe URL or file path of the favicon image to use.\n\n- Defaults to `null`\n\n## `\"shareImage\"`\n\n(*`null`* or *`string`*)\n\nThe URL or file path of the share image to use.\n\n- Defaults to `null`\n\n## `\"version\"`\n\n(*`null`* or *`string`*)\n\nThe version number to show beside the title.\n\n- Defaults to `v${lernaJson.version}`, else `v${packageJson.version}`, else `null`\n\n# Tips\n\n## Including files\n\nUse the following syntax to include the entire contents of a local file `foo.md` in your Markdown:\n\n```\n\n./foo.md\n\n```\n\nNote that an empty line is required immediately before and after the file path.\n\n- If the `./` prefix is used, then the file path is resolved relative to the current Markdown file.\n- If the `/` prefix is used, then the file path is resolved relative to the current working directory (ie. `process.cwd()`).\n\nYou can also specify a glob to include multiple files:\n\n```\n\n./bar/*.md\n\n```\n\n## Deploying to GitHub Pages\n\nDeploy your single-page website to [GitHub Pages](https://pages.github.com/) via one of the following two ways:\n\n1. Commit the `./build` directory and push your changes. Then, set the `./build` directory as the [publishing source](https://docs.github.com/en/free-pro-team@latest/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) in your GitHub repository settings.\n\n2. Use the [`gh-pages`](https://github.com/tschaub/gh-pages) CLI to deploy the `./build` directory to the `gh-pages` branch:\n\n    ```sh\n    $ npx --yes -- gh-pages --dist build\n    ```\n\n    Then, set the `gh-pages` branch as the publishing source in your GitHub repository settings.\n\n## Deploying to Cloudflare Pages\n\nTo deploy your single-page website to [Cloudflare Pages](https://pages.cloudflare.com/), use the following settings in your [build configuration](https://developers.cloudflare.com/pages/get-started#configuring-your-deployment):\n\n- Build command: `exit 0`\n- Build output directory: `/build`\n- Root directory: `/`\n\n# CLI\n\n\u003c!-- ``` markdown-interpolate: node packages/single-page-markdown-website/lib/cli.js --help --\u003e\n```\n\n  Create a nice single-page documentation website from one or more Markdown files.\n\n  Usage:\n    $ single-page-markdown-website \u003cfiles\u003e [options]\n\n  Arguments:\n    \u003cfiles\u003e  One or more globs of Markdown files. Defaults to 'README.md'.\n\n  Options:\n    -h, --help     Print this message.\n    -p, --open     Whether to open the generated page in the default web\n                   browser. Defaults to 'false'.\n    -o, --output   Set the output directory. Defaults to './build'.\n    -v, --version  Print the version.\n    -w, --watch    Whether to watch for changes and regenerate the page.\n                   Defaults to 'false'.\n\n  Examples:\n    $ single-page-markdown-website\n    $ single-page-markdown-website '*.md'\n    $ single-page-markdown-website --open\n    $ single-page-markdown-website --output dist\n    $ single-page-markdown-website --watch\n\n```\n\u003c!-- ``` end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuanqing%2Fsingle-page-markdown-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuanqing%2Fsingle-page-markdown-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuanqing%2Fsingle-page-markdown-website/lists"}