All Projects β†’ hypermodules β†’ sitedown

hypermodules / sitedown

Licence: ISC license
πŸ“„ Turn some markdown files into a website.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to sitedown

muleify
Muleify - Static Site Generator | Website Bundler | Asset Compiler | Templating | Preproccessor
Stars: ✭ 16 (-73.77%)
Mutual labels:  static, site
django-freeze
🧊 convert your dynamic django site to a static one with one line of code.
Stars: ✭ 81 (+32.79%)
Mutual labels:  static, site
assemble-core
The core assemble application with no presets or defaults. All configuration is left to the implementor.
Stars: ✭ 17 (-72.13%)
Mutual labels:  static, site
bowman
A simple static site generator with an integrated toolchain for efficient development and delivery.
Stars: ✭ 17 (-72.13%)
Mutual labels:  static, site
vite-plugin-sloth
Fresh take on static site generation, using HTML-first approach to build website. Powered by ⚑️ Vite
Stars: ✭ 39 (-36.07%)
Mutual labels:  static, site
teedoc
wiki and multi docs friendly static document site generator(doc generator), convert markdown and jupyter notebook to html website. wiki ε’Œε€šζ–‡ζ‘£ε‹ε₯½ηš„ι™ζ€ζ–‡ζ‘£η½‘η«™η”Ÿζˆε·₯ε…·
Stars: ✭ 72 (+18.03%)
Mutual labels:  site
static-webpack-boilerplate
πŸš€ Minimal & Modern Webpack Boilerplate for building static sites
Stars: ✭ 40 (-34.43%)
Mutual labels:  site
ffmpeg-builds
MOVED: https://gitlab.com/q3aql/ffmpeg-builds
Stars: ✭ 71 (+16.39%)
Mutual labels:  static
remarkablemark.github.io
🎩 Site of @remarkablemark.
Stars: ✭ 21 (-65.57%)
Mutual labels:  site
docs
Documentation site for LFE
Stars: ✭ 23 (-62.3%)
Mutual labels:  static
sandboni-core
Sandboni - Java test optimization library which reduces test execution time without compromising quality
Stars: ✭ 27 (-55.74%)
Mutual labels:  static
vuepress-homepage
πŸ“„ Elegant & friendly homepage (bio, tech portfolio, resume, doc...) template with Markdown and VuePress
Stars: ✭ 302 (+395.08%)
Mutual labels:  site
Site
Site layout for RiiConnect24
Stars: ✭ 14 (-77.05%)
Mutual labels:  site
vulnscan
A static binary vulnerability scanner
Stars: ✭ 47 (-22.95%)
Mutual labels:  static
nextjs-boilerplate
Jam3 NextJS Generator for SPA, SSG, SSR and JAMStack applications
Stars: ✭ 95 (+55.74%)
Mutual labels:  static
vittorioromeo.info
Latest iteration of my static webpage/blog generator
Stars: ✭ 50 (-18.03%)
Mutual labels:  static
osm-static-maps
Openstreetmap static maps is a nodejs lib, CLI and server open source inspired on google static map service
Stars: ✭ 130 (+113.11%)
Mutual labels:  static
Chisai
ChΔ«sai - A small website generator, editable and hosted on github, with automatic deployment!
Stars: ✭ 33 (-45.9%)
Mutual labels:  static
yamete
Yamete - Hentai downloader in PHP CLI - Easy site downloader PHP system
Stars: ✭ 63 (+3.28%)
Mutual labels:  site
docs
Documentation for Bolt.
Stars: ✭ 47 (-22.95%)
Mutual labels:  site

sitedown

Minimalist Markdown-based static site generator.

npm build downloads

Overview

Sitedown turns a folder with Markdown files into a static HTML site.

.                              build/
β”œβ”€ README.md         ==>       β”œβ”€ index.html
β”œβ”€ about.md          ==>       └─ about/
β”‚                              β”‚  └─ index.html
β”‚                              β”‚
β”œβ”€ docs/                       └─ docs/
β”‚  β”œβ”€ README.md      ==>       β”‚  β”œβ”€ index.html
β”‚  └─ ref.md         ==>       β”‚  └─ ref/
β”‚                              β”‚     └─ index.html
β”‚                              β”‚
└─ assets/                     └─ assets/
   └─ cat.jpg        ==>          └─ cat.jpg

It takes all markdown files in the current folder (and subfolders) and generates a new site in the build directory.

  • Converts README.md files into indexes (index.html).
  • Creates directory indexes for pretty URLs (CHANGELOG.md => changelog/index.html).
  • Supports custom layouts (comes with a default layout.html).
  • Copies assets (defaults to copying over contents of assets folder).
  • Comes with a dev mode that starts a server and watches for changes for easy local development.

Sitedown's website was built with sitedown, so you know it's for real.

Read the Usage section for a full overview of options and defaults.

Install

npm install sitedown

Usage

CLI

Usage: sitedown [source] [options]

    Example: sitedown . -b dist -l layout.html

    source                path to source directory (default: current working directory)
    --build, -b           path to build directory (default: "build")
    --pretty              use directory indexes for pretty URLs (default: true)
    --el, -e              css selector for target element (default: ".markdown-body")
    --layout, -l          path to layout file
    --github-headings, -g add anchors to headings just like GitHub (default: false)
    --no-hljs-class       don't add the hljs class to codeblocks (default: false)
    --silent, -s          make less noise during build
    --watch, -w           watch a directory or file (experimental)
    --dev, -d             start development server (experimental) (default: false)
    --assets, -a          assets folder to copy (default: "assets")
    --version, -v         show version information
    --help, -h            show help

Node API

var sitedown = require('sitedown')

var options = {
  source: '.',            // path to source directory                 default: cwd
  build: 'build',         // path to build directory                  default: 'build' in cwd
  pretty: true,           // use directory indexes for pretty URLs    default: true
  el: '.markdown-body',   // css selector for target element          default: '.markdown-body'
  layout: 'layout.html',  // path to layout                           default: none
  githubHeadings: false,  // add anchors to headings just like GitHub default: false
  noHljsClass: false,     // don't add hljs class to codeblocks       default: false
  silent: false           // make less noise during build             default: false
}

sitedown(options, function (err) {
  if (err) return console.error(err)
  console.log('success')
})

Layout

All files are wrapped in a layout.html file. Markdown content is appended to the first .markdown-body element, and the page title (<title> in <head>) is set to the text of the first h1 element.

The default layout is:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
    <link rel="stylesheet" href="https://unpkg.com/style.css">
  </head>
  <body>
    <main class="markdown-body"></main>
  </body>
</html>

The default layout comes bundled with style.css, a classless stylesheet for markdown documents.

Directory indexes (pretty URLs)

Markdown 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).

Links

Relative links that point to markdown files ($f.md, $f.markdown) are rewritten as $f/ to point to their $f/index.html equivalent.

Contributing

Contributions welcome! Please read the contributing guidelines first.

License

ISC

Page image is from emojipedia.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].