write.as

11ty & Write.as

This is an app that makes a webpage from the data of an anonymous Write.as post by feeding it into Eleventy, an awesome static site generator!

Take a look at the source of the site right here

Getting Started

1) Remix the app on Glitch!

2) Publish an anonymous post on Write.as (no sign up needed). It should produce a link like this: https://write.as/c2a8t7c04n83amvl

3) Grab the unique ID at the end of the post's url and add it to the end of the following url: https://write.as/api/posts/{add-id-here}

4) Go to that url. You should see the JSON data of your post. Copy that code and paste it into the src/_data/post.json file. Feel free to format the file if you like.

5) Refresh the app and you should see your post as a static site!

Customizing

6) To customize the HTML and make it your own, go to the src/_includes/layouts/default.njk file and play around with the HTML. Just make sure to keep the post.data.title & content | safe values intact.

Gratitude

Special thanks to Tom Critchlow for his website's awesome design. It served as the inspiration for this project. None of it, however, would truly happen without Zach Leatherman – thanks for all you do with Eleventy!