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.
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.
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:
config.stone), which holds the title of the website, and the list of the pages to display in the title bar
datadirectory, which contains the template and the stylesheet. As long as you use the default theme, you won't need to modify them.
pagesdirectory. This is where you write your pages. Just create a file for each page, with the
.mdextension, and write your content in it, in Markdown
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.