Source

stone / doc / pages / index.md

Full commit

"Just write it": easily generate portfolios, documentation, ...

Stone is a static website generator: it takes a template, a css stylesheet, the content itself written in a high-level formatting syntax, and generates the corresponding html pages.

However, Stone isn't a generalistic one: its goal is to provide a very easy way to generate simple websites like a portfolio, or the pages of documentation for a small project. That is quite limitated, but Stone tries to be good at what it aims.

First steps with Stone

So, let's generate our first Stone-based website!

First, get Stone. That's the most complicated step of the process.

You now have a stone binary. You can put it whereever you want, it is self-sufficient. I will here assume it is in the current folder.

Type stone --help to have some explanations on how to use the binary : let's first generate a default website:

{{ ./stone -i my-portfolio ls my-portfolio }}

As you can see, a directory has been initialized with a default project, which consists in: A config file (config.stone), which holds the title of the website, and the list of the pages to display in the title bar A data directory, which contains the template and the stylesheet. As long as you use the default theme, you won't need to modify them. * A pages directory. This is where you write your pages. Just create a file for each page, with the .markdown or .md extension, and write your content in it, in (a slightly modified) Markdown syntax.

You can now tweak the config.stone a little, write things in pages, or just leave the default config. Finally, we can generate the html content:

{{ ./stone my-portfolio ls my-portfolio }}

A new directory as appeared: site. It contains the html pages, generated by Stone. If you have a FTP access to a web server somewhere, just upload on it the contents of site. You can also directly browse its contents locally with your favorite browser.

How to go further

  • For a more complete example, this documentation is written thanks to Stone. You can look at the sources.
  • Read the specifications about the structure of the project, the templates and the relevant css properties, and make your own templates and themes.
  • Feel free to contribute!