Static site generator (made with Hugo) for Buffer's Open Source Site
-
Install Hugo. It's easy with Homebrew:
brew update && brew install hugo
-
Clone the repo
git clone --recursive git@github.com:bufferapp/buffer-opensource.git
-
Run the Hugo server
hugo server
-
Open the site at http://localhost:1313/
It's important to note that the code to generate this site in this repo is separate from the actual generated site, which is in a submodule in the public
directory.
When making changes it's important to commit and push to the repo in the public
directory as a separate step, which will deploy the changes to bufferapp.github.io
-
Edit an existing project area
.toml
file in thedata/projects
directory, or create a new file for a new area. -
If it's a new file, add an
AreaName
value at the top of the file. -
To add a project, create a new entry that looks something like this:
[[projects]]
name = "The project name (Appears in the heading)"
repo = "The name of the repo on github (excluding 'bufferapp/')"
description = "A short description of the project"
- Run the hugo server, check if everything looks OK locally
- Generate the site in the root directory with hugo
hugo
It might be a good idea to run git status at this point:
git status
Make sure you aren't detached from the head or anything weird. If you are, you can fix it with:
git checkout master
git pull
And that should get you back in shape.
- Commit and push changes to
bufferapp.github.io
cd public
git add --all
git commit -m "Added my new shiny project"
git push origin master
- Don't forget to commit changes to this repo too!
cd -
git add --all
git commit -m "Added my new shiny project"
git push origin master