dssg 1.0.0
A simple static site generator written in D.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
DSSG - A static site generator with a different approach
Advantages
Unlike other static site generators, DSSG doesn't differentiate between front matter and a content section in its content files. This makes it very easy to create web pages based on templates with multiple content sections.
For maximum flexibility, each project can be based on multiple templates.
Content may be written in both Markdown or pure HTML.
How does it work?
DSSG creates HTML pages out of TOML files. Each TOML file represents one HTML page and consists of as many key-value pairs as you want.
The key-value pairs contain both metadata and the actual page content. There can be multiple key-value pairs with page content. If a key in your TOML file ends with _md
, DSSG expects Markdown as value. DSSG will turn the Markdown into HTML.
Templates are written in the Mustache template language. DSSG substitues each variable in the template with its equivalent from the TOML file.
Why is it called DSSG?
DSSG is written in the D programming language. DSSG stands for D Static Site Generator.
Download
The latest binaries are available on https://github.com/kambrium/dssg/releases. Currently, there are Ubuntu 16.04 and Windows 10 binaries.
Installation (Linux)
After you have downloaded the software (see above), open a terminal, change to the directory that contains the DSSG binary and set the permissions so that you can execute the program.
$ cd /this/is/your/dssg/path/ $ chmod u+x dssg
Add the directory that contains the DSSG binary to your PATH. Please refer to the documentation of your distribution for further details. Here is an example of how it works on Ubuntu with Bash.
$ echo 'export PATH=$PATH:/this/is/your/dssg/path/' >> ~/.bashrc $ source ~/.bashrc
Installation (Windows)
After you have downloaded the software (see above), open the PowerShell and add the directory that contains the DSSG binary to your Path.
PS> [System.Environment]::SetEnvironmentVariable("Path", [System.Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User) + ";C:\this\is\your\dssg\path", [EnvironmentVariableTarget]::User)
Restart the PowerShell.
Try the example
$ git clone https://github.com/kambrium/dssg-example.git
$ cd dssg-example
$ dssg build
$ dssg serve
Begin from scratch
$ dssg new myproject
$ cd myproject
// Create Mustache templates in 'contents/_templates'
// Create TOML files, CSS, JavaScript, images etc. in 'contents'
$ dssg build
$ dssg serve
Made with DSSG
License
MIT
- Registered by kambrium
- 1.0.0 released 4 years ago
- kambrium/dssg
- MIT
- Copyright © Martin Muehlbauer
- Authors:
- Dependencies:
- vibe-d, dmarkdown, toml, mustache-d
- Versions:
-
1.0.0 2020-Feb-03 0.2.0 2017-Jun-03 0.1.0 2017-May-13 ~master 2023-Mar-12 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
47 downloads total
-
- Score:
- 1.9
- Short URL:
- dssg.dub.pm