What is a simple web page compiler for restructured text?

Instead of the / cms blog, I would like to have a html-based static site with several (rarely updated) pages. I believe that the easiest way to update them is to save the sources in a format such as ReST and compile it every time it is updated. What is the recommended compiler for this use? I would like to have my own theme / design, and I need nothing but the correct ReST syntax (e.g. Sphinx too much).

+4
source share
5 answers

rest2web may be more than what you are looking for.

+2
source

A makefile would be a good solution for this. Here is a quick makefile template

# Flags to pass to rst2html # eg RSTFLAGS = --stylesheet-path=mystyle.css RSTFLAGS = %.html: %.rst rst2html $(RSTFLAGS) $< $@ .PHONY: all .DEFAULT: all all: index.html foo.html bar.html # any other html files to be generated from an rst file 

Then just run make in the directory with your files to generate html from the first

+5
source

If you don't need restructured text, but markdowns or textiles are just as good, then jekyll .

I use it myself. Thumbs up.

+1
source

I use nanoc3 along with docutils (via sphinx installation) to provide good support for restructured text in a static site generator. I have reviewed (and would like to use) a pure python (hyde) solution, but nanoc allows you to use cleaner ReST source files.

I also considered using sphinx to create a static site, but it is not so easy to do without forcing a lot of code to support it.

I will be happy to tell you how to do this if you have an interest in this topic. It mainly uses docutils to output html from the original source. I have a simple nanom processor that does this:

 module Nanoc3::Filters class ReST < Nanoc3::Filter identifier :rest def run(content, params={}) open('|rst2html.py --template=rest.template', 'r+') do |io| io.write(content) io.close_write io.read end end end end 

The rest.template file is basically a dummy template with the following line:

 %(body)s 
0
source

You might want to use a static site generator. There are a billion of them ...

https://www.staticgen.com/

0
source

All Articles