Skip to content

hayesgm/avalanche

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Avalanche

Avalanche is a static web blog builder, built exclusively on CloudFlare workers. All you need is a free CloudFlare account and a domain name.

Setup

You will need a CloudFlare account, and set the following varibles:

  • TF_VAR_takehome_cloudflare_email: Your CloudFlare email
  • TF_VAR_takehome_cloudflare_api_token: API Token with ability to edit zones and workers
  • TF_VAR_takehome_cloudflare_account_id: Your CloudFlare account ID
  • TF_VAR_takehome_cloudflare_zone: The CloudFlare zone for your blog
  • TF_VAR_takehome_cloudflare_zone_id: The zone ID
  • TF_VAR_takehome_cloudflare_domain: The associated domain name

You will also need rust installed (see Installing Rust) and Terraform.

You will need to run terraform init, which should check these variables.

Building

cargo build --release

Add Your Blog Entries

Create a new directory and add any number of blog entries in markdown. You may also want to add a css file and a file named index.md as a homepage.

avalanche/
  my_site/
    index.md
    blog_entry_1.md
    my_css.css

Generating and Deploy Your Site

target/release/avalanche build --input example/*.md --css example/page.css

This will build a dist/worker.js that hosts the content of your site. Next, we need to push the files to CloudFlare. See above for the necessary variables.

terraform apply

Now you can simply visit your domain, and the site should be hooked up!

Updating Your Site

You can re-run the commands above to update your site. Put together, that's:

target/release/avalanche build --input example/*.md --css example/page.css && terraform apply -auto-approve

Contributing

Please open issues or follow up with any questions!

Originally built as a code sample for Compound.

About

Drop your blog down the slopes, on the edge.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published