A Fastly Compute@Edge service that renders externally hosted Markdown files. https://markdown-at-edge.edgecompute.app/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Leonora Tindall b1c1af886e Update deps 4 weeks ago
.cargo Initial working setup. 5 months ago
content Polish writing, css, and favicon 4 months ago
src Support images and embeds properly. 5 months ago
.gitignore Initial working setup. 5 months ago
Cargo.lock Update deps 4 weeks ago
Cargo.toml Update deps 4 weeks ago
README.md inclue all content for ease of editing 5 months ago
fastly.toml Update deps 4 weeks ago
rust-toolchain.toml Initial working setup. 5 months ago

README.md

Markdown@Edge

A Markdown renderer on the Compute@Edge platform from Fastly.

The main source file, src/main.rs, contains all the code for the renderer. The content on the server is stored in content/ for convenience.

Deploying Content

Simply use scp to copy the files to the server:

scp -r ./content/* example.com:/var/www-html/edgeblog/

Nginx Configuration

In order to best support this application, it's important to add the following line to Nginx's MIME types configuration:

text/markdown     md;

I also disabled gzip and set the max-age and cache-control headers as follows:

server {
  # ...
  location /edgeblog {
    # To illustrate the source to visitors.
    autoindex on;
    autoindex_exact_size off;
    autoindex_format html;
    autoindex_localtime on;

    # To facilitate tagging.
    gzip off;

    # Cache-Control headers
    expires 1h;
    add_header Cache-Control "public";
  }
}