Phraxos
A POSIX-compliant static website generator
Features
- Simple. No Markdown, no JavaScript, no BS
- Pages are written in HTML
- Phraxos finds references between pages and lists them at the bottom of the page
You can see an example of it on the LICENSE page
- Any orphan pages are listed while building the website, so you can find a sweet place to link them
- A list of all available pages is also created as a file named
all.html
- A
404.html
page that you can customize — just setup your server to use it - Mobile compatible
- Light and Dark mode based on device settings
Install
- Download the latest release and decompress it somewhere in your computer
- Edit the
template.html
to your liking - Edit the variable
HEAD_TITLE
in line55
ofbin/build
to set the general HTML title of your siteThat means if you are in page "Bar", and
HEAD_TITLE
is set to "Foo", the HTML title will be "Foo - Bar"
Usage
- Add new html pages to the
pages/
directoryMake sure the first line is a
h1
with the page title in itThese pages should not be complete HTML pages, just what will be placed inside the body of the template
- Note that you are adding your html files to the
pages
folder, but when linking to them, do not use/pages/file.html
, since the file will be copied to the root of your website as/file.html
- Always use absolute paths when making references to pages (links, for example)
/file.html
instead offile.html
- Anything added to the
static/
folder will be available in the root path - Images from the
images/
folder are a special case and are available in the/images/
path - Run the command
bin/build
to generate the website in theout/
folder - Publish the files from the
out/
somewhere
Advanced Phraxos & Dragons
- If
python3
is in your path, you can preview your website locally by runningbin/server
- You can inject HTML into the header of a page by adding code between HTML comments named
head inject start
andhead inject end
on the second line. There’s an example of how to do it on the index page of the release package
Dependencies
- A POSIX compliant shell
- grep
- awk
- head
Sites using Phraxos
If you are using Phraxos to run a website, let me know and I will add it to the list.