Skip to main content

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

Usage

  1. git clone this repository
  2. cd into the directory
  3. Configure wrangler.toml with your Cloudflare details, make sure your route ends in a wildcard e.g. route = "https://example.com/*".
  4. Create a KV Namespace and bind in to pages in your wrangler.toml file.
  5. Start a python virtualenv python3 -m venv .env
  6. Enter the virtualenv source .env/bin/activate
  7. Install dependences pip install -r requirements.txt
  8. Make a markdown file ending in .md in the content/ directory If you want it to be your main page, name it index.md.
  9. Run python workdown.py
  10. Done!

Assets

Text-based assets, e.g. CSS, javascript, etc should go in the assets/ directory. They will be available as their full filename under assets. For example if you make main.css, it will be example.com/assets/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 assets/ or would like to include a a fonts CDN, add it into the <head> in the assets/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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

workdown-0.0.3.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distributions

workdown-0.0.3-py3.7.egg (5.3 kB view hashes)

Uploaded Source

workdown-0.0.3-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page