# susi

> Super Simple Site generator.

Latest version **0.1.4** (published 2018-05-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install susi
pnpm add susi
yarn add susi
bun add susi
```

Provides the command `susi`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2018-05-24 |
| First published | 2014-05-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 (+8 in 1 direct dependencies) |
| Install scripts | no |
| Author | Martin Naumann |
| Maintainers | avgp |
| Keywords | static site generator, generator, static, markdown, website, generator |

## Links

- npm: https://www.npmjs.com/package/susi
- Homepage: https://github.com/AVGP/susi/blob/master/README.md
- npm.io page: https://npm.io/package/susi

## Dependencies (1)

- [marked](https://npm.io/package/marked.md) 0.3.2

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.1.4 (latest) — 2018-05-24
- 0.1.3 — 2018-05-24
- 0.1.2 — 2016-12-21
- 0.2.3 — 2015-06-30
- 0.2.2 — 2015-04-22
- 0.2.1 — 2015-01-06
- 0.1.1 — 2014-05-10
- 0.1.0 — 2014-05-10

## README

# SuSi<sup>2</sup>
## Because static site generation shouldn't be rocket science.


This is the **Su**&#8203;per **Si**&#8203;mple **Si**&#8203;te generator.

You give it markdown files and (if you fancy) an HTML layout to render them into - and it gives you static HTML.

That's it.
No magic, no fancy build tools - Markdown and HTML. Now go and make that website!

## How to use it

To setup, you run

```shell
    npm install -g susi
```

and then to parse markdown files into HTML you can use for example:

```shell
    susi /var/www/markdown /var/www/html
```

## Using a layout

Now parsing naked Markdown files into naked HTML often isn't enough, so there's the layout option.

### A basic layout
Say you have a layout with a few navigation links and some css like this:

```html
  <!doctype html>
  <html>
    <head>
      <link rel="stylesheet" href="style.css">
      <title>My Site</title>
    </head>
    <body>
      <nav>
        <ul>
          <li><a href='home.html'>Home</a></li>
          <li><a href='projects.html'>Projects</a></li>
          <li><a href='contact.html'>Contact</a></li>
      </nav>
      <section id="main">{{CONTENT}}</section>
    </body>
  </html>
```

When you pass in the path to this file as the third parameter, SuSi will render each markdown file into the place of ``{{CONTENT}}``.
So if you do:

```shell
  susi input/ output/ path/to/layout.html
```

A markdown file like this:

```markdown
  # Home
  Some *text*
```

will be rendered into:

```html
  <!doctype html>
  <html>
    <head>
      <link rel="stylesheet" href="style.css">
      <title>My Site</title>
    </head>
    <body>
      <nav>
        <ul>
          <li><a href='home.html'>Home</a></li>
          <li><a href='projects.html'>Projects</a></li>
          <li><a href='contact.html'>Contact</a></li>
      </nav>
      <section id="main">
        <h1>Home</h1>
        <p>Some <em>text</em></p>
      </section>
    </body>
  </html>
```

which is pretty handy.

### Using titles
There is also a second placeholder, ``{{TITLE}}`` which can be used to adjust the title for pages individually.

Here is an example:

```html
  <!doctype html>
  <html>
    <head>
      <link rel="stylesheet" href="style.css">
      <title>My Site {{TITLE}}</title>
    </head>
    <body>
      <nav>
        <ul>
          <li><a href='home.html'>Home</a></li>
          <li><a href='projects.html'>Projects</a></li>
          <li><a href='contact.html'>Contact</a></li>
      </nav>
      <section id="main">
        <h1>Home</h1>
        <p>Some <em>text</em></p>
      </section>
    </body>
  </html>
```
in combination with

```markdown
  <!-- - Home -->
  # Home
  Some *text*
```

will turn the title into ``My Site - Title``.

**Note:** The comment must be the first thing on the first line of your markdown file or title injection will not work.

Now, seriously, go make static websites!

---
_Source: https://npm.io/package/susi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
