Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a simple webpage compiler for restructured text?

Instead of a blog/cms, I'd like to have a static html-based site with a few (rarely updated) pages. I figure the simplest way to update them is to keep the sources in a format like ReST, and compile it each time it updates. What is a recommended compiler for this usage? I'd like to have my own theme/design and I don't need anything beyond the proper ReST syntax (Sphinx is too much, for example).

like image 664
Oliver Zheng Avatar asked Jan 23 '23 17:01

Oliver Zheng


1 Answers

A Makefile would be a good solution to do this. Here's a quick template makefile

# Flags to pass to rst2html
# e.g. 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 the html from the rst

like image 119
Geoff Reedy Avatar answered Jan 31 '23 20:01

Geoff Reedy