rewrite the project as a static site generator
this removes Flask, reworks a number of library methods accordingly, and adds generators and build commands to process the instance directory (largely unchanged, except config.py is now config.json) and spit out files suitable to be served by a web server such as Nginx. there are probably some rough edges here, but overall this works. also note, as this is no longer server software on a network, the license has changed from AGPLv3 to GPLv3, and the "or any later version" allowance has been removed Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
45
README.md
45
README.md
@@ -1,6 +1,6 @@
|
||||
# incorporeal-cms
|
||||
|
||||
Software that makes simple Markdown content go.
|
||||
A lightweight static site generator software for Markdown-based sites.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
@@ -8,38 +8,32 @@ I recommend getting a release from <https://git.incorporeal.org/bss/incorporeal-
|
||||
installing the Python package in a virtualenv. Something like the following should suffice:
|
||||
|
||||
```
|
||||
% cd ~/site
|
||||
% virtualenv --python=python3.8 env-py3.8
|
||||
% virtualenv --python=python3.9 env-py3.9
|
||||
% source env-py3.8/bin/activate
|
||||
% pip install -U pip
|
||||
% pip install ~/incorporeal_cms-1.3.0-py3-none-any.whl
|
||||
% pip install -U gunicorn
|
||||
% gunicorn -w 5 -t 60 -b 127.0.0.1:10000 --reload 'incorporealcms:create_app()'
|
||||
% pip install incorporeal-cms
|
||||
% incorporealcms-build ./path/to/instance ./path/to/output/www/root
|
||||
```
|
||||
|
||||
This will get the CMS up and running, and listening on the specified port. The application is
|
||||
further configured within `env-py3.8/var/incorporealcms-instance/config.py`, and content is served
|
||||
out of `env-py3.8/var/incorporealcms-instance/pages/`.
|
||||
This will generate the directory suitable for serving by e.g. Nginx.
|
||||
|
||||
## Serving a Site
|
||||
## Generating a Site
|
||||
|
||||
Put content inside `env-py3.8/var/incorporealcms-instance/pages/` and go.
|
||||
Put content, notably Markdown content, inside `./your-instance/pages/` and go.
|
||||
|
||||
* Markdown files (ending in `.md`) are rendered via Python-Markdown if they are accessed without the
|
||||
suffix (i.e., `post.md` should be referred to as `/post` to get it to render as Markdown.
|
||||
* Directory paths (e.g. `/dir/`) can be rendered with a `/dir/index.md` file.
|
||||
* Symlinks to files are treated as redirects to the destination content.
|
||||
* Request paths with file suffixes are not rendered and served directly, so images, etc., can be
|
||||
referenced naturally, and even the unrendered Markdown can be served as a text file via e.g.
|
||||
`/post.md`.
|
||||
* Markdown files (ending in `.md`) are rendered via Python-Markdown as .html files, other
|
||||
files generally left alone and copied to the static site.
|
||||
* Directory paths (e.g. `/dir/`) can be served via a `/dir/index.md` file.
|
||||
* Symlinks to files are retained and handled per the web server's configuration.
|
||||
* Non-Markdown files are copied directly, so images, etc., can be referenced naturally.
|
||||
|
||||
Care is taken to not serve content above the `pages/` dir, even via symlink.
|
||||
The application is further configured within `./your-instance/config.json`, and content is served
|
||||
|
||||
## Configuration
|
||||
|
||||
I've tried to keep the software agnostic to my personal domains, logos, etc. There are some settings
|
||||
you are probably interested in tweaking, by specifying new values in
|
||||
`incorporealcms-instance/config.py`:
|
||||
`incorporealcms-instance/config.json`:
|
||||
|
||||
* `TITLE_SUFFIX` is appended to the title of every page, separated from other title content by a
|
||||
dash.
|
||||
@@ -58,17 +52,16 @@ out and discuss issues and features and whatnot.
|
||||
|
||||
## Author and Licensing
|
||||
|
||||
Written by and copyright Brian S. Stephan (bss@incorporeal.org).
|
||||
Written by and copyright (C) 2025 Brian S. Stephan <bss@incorporeal.org>.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, version 3 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Reference in New Issue
Block a user