https://github.com/matheusfillipe/pymacc
Python MArkdown driven fastCgi Cms
https://github.com/matheusfillipe/pymacc
fastcgi markdown markdown-to-html python3
Last synced: 3 months ago
JSON representation
Python MArkdown driven fastCgi Cms
- Host: GitHub
- URL: https://github.com/matheusfillipe/pymacc
- Owner: matheusfillipe
- License: other
- Created: 2022-10-20T22:52:43.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-25T23:39:23.000Z (over 3 years ago)
- Last Synced: 2025-01-20T21:37:46.830Z (about 1 year ago)
- Topics: fastcgi, markdown, markdown-to-html, python3
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PYMACC
This is a simple hacky script to serve a directory of markdown files over nginx's fastcgi. Put your `.md` files under `www` and add to your nginx configuration something like:
```nginx
location ~^/notes/* {
gzip off;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME {PUT_THEPATH_HERE}/main.py;
}
```
Replacing `{PUT_THEPATH_HERE} ` with wherever your cloned this repo into.
Run `sudo pip3 install mistune Pygments`, restart nginx and take a look at `config.py`.
## Writting
The folder structure under `www` defines the routes. If an invalid path is requested, the index listing is shown for the upper valid path. Just create any markdown file and use github syntac. It also enables most of the plugins of mistune: https://mistune.lepture.com/en/latest/plugins.html
# TODO
- [ ] This could use a web framework and serve over a proxy like any modern thing
- [ ] Proper packaging
- [ ] Poetry run is slow for the cgi