Gustavo makes it easy to write posts in Github Gists using markdown and publish using now to a specific url.
This repository documents getting a Gustavo blog setup quickly.
Learn more about Gustavo.
- You need a shell app like terminal or iterm.
- Github and Gist access, Docker.
- It is written by developers using macs. Please file an issue with other notes for other OSs.
Setup Deploying Further Configuration Custom Now Url Cites and Thanks
mkdir <new gustavo repo> && cd <new gustavo repo>
create a Github gist
Check out [gustavo](https://github.com/eggplanetio/gustavo)! 🚀
<meta name="title" content="This is the first Gustavo gist">
<meta name="date" content="00/00/0000"><!-- provide a date -->
echo 'module.exports = {\n
title: 'My gustavo blog',\n
gistId: '<< gist id >>',\n
}' > gustavo.config.js
- To avoid rate limiting provide a token. Read more
create a Dockerfile
Make sure docker is installed
echo 'FROM eggplanet/gustavo:latest' > Dockerfile
develop locally http://localhost:3000
docker build -t <gustavo blog> .
# i.e.
# ----
# docker build -t learn-gustavo .
docker run -p 3000:3000 <gustavo blog>
# i.e.
# ----
# docker run -p 3000:3000 learn-gustavo
- Here are some images for quick reference.
Deployment can be done with Now.
npm i now -g
now login
# provide email
# confirm login via email
now secrets add gustavo-gist-id <ID>
# i.e.
# ----
# now secrets add gustavo-gist-id 8affba6b231ca41a0b12f1ca7b14308b
now -e GIST_ID=@gustavo-gist-id --docker
module.exports = {
title: '<< title >>',
gistId: '<< gist id >>',
githubToken: '<< token >>', /* github access token */
}
module.exports = {
title: '<< title >>',
gistId: '<< gist id >>',
googleAnalyticsId: 'UA-X-XXXXX' /* google analytics id */
}
# add github token
now secrets add gustavo-github-token <TOKEN>
# add gist id
now secrets add gustavo-gist-id=<ID>
# deploy with github token and gist id
now -e GITHUB_TOKEN=@gustavo-github-token -e GIST_ID=@gustavo-gist-id --docker
TODO
Now will provide a different url everytime gustavo is deployed, to provide now with a specific url.
# provide alias
now alias now alias <gustavo blog><now special url>.sh <gustavo blog>.blog
# i.e.
# ----
# now alias now alias <gustavo blog><now special url>.sh <gustavo blog>.blog
Thanks to Brian Gonzolaz for building this awesome project and allowing me to hack on it with him. Reach out to us on the Gustavo project.