Write Markdown and have it published and hosted on Cloudflare Workers
Project description
Workdown
A system to write Markdown and have it published and hosted via Cloudflare Workers
Pre-requisites
- Python 3
- Install
wrangler
Usage
pip3 install workdown
- Run
wrangler generate site https://github.com/eldridgea/workdown-example-site
. This will generate a folder calledsite
containing the folder structureworkdown
requires to work. - Configure wrangler.toml with your Cloudflare details, make sure your route ends in a wildcard e.g.
route = "https://example.com/*".
- Create a KV Namespace and bind in to
pages
in yourwrangler.toml
file. - Make a markdown file ending in
.md
in thecontent/
directory If you want it to be your main page, name itindex.md
. - From the
site
folder (or whatever you named it) runworkdown
- Done!
CSS
CSS should go in the assets/
directory. They will be available as their full filename under css
. For example if you make main.css
, it will be example.com/css/main.css
Partials
Here is where you can customize the header and footer of pages in HTML. Currently all partials apply to all pages generated. Good things to do here would be if you have a static CSS file in css/
or would like to include a a fonts CDN, add it into the <head>
in the partials/header.html
so it will be usable on your pages.
Notes
The path for content will be the name of the markdown file with no extension. For example if you make contact.md
, it will be example.com/contact
.
Install directly from Github
pip3 install git+https://github.com/eldridgea/workdown
Manual Install
git clone https://github.com/eldridgea/workdown
cd workdown
python3 setup.py install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file workdown-0.0.4.tar.gz
.
File metadata
- Download URL: workdown-0.0.4.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d9af359e67c10cebac1bc1fba013d531f14c3af058f109a1fb41bdddeb24683 |
|
MD5 | dee52b358e539e7faefca40db16db8bc |
|
BLAKE2b-256 | b2899b54a6697e2bcbc577931f2d49d581a3e3013cf08306bea3b18569aa028c |
File details
Details for the file workdown-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: workdown-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20e35b1ab96ba2cddfcd689c089c6c4aa407c3de6491f57ef1609b1e366d6d91 |
|
MD5 | 55e172990e046a0c2018117ce672a449 |
|
BLAKE2b-256 | 2b0994008920331c5eac292fef054d91cc841b7f301480bf47c253458e314fb5 |