A Go-based static site generator that compiles brandur.org.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
atom Add type attribute to feed entry content tag Jul 12, 2016
cmd
content Add a little more flavor around function volatility Sep 14, 2018
docs Move deployment information to its own document Sep 2, 2018
downloader Rename "assets" package to "downloader" Oct 3, 2016
layouts Fix styling on code blocks that are wrapped inside of links Jun 18, 2018
markdown Add an additional test to catch a recent problem Sep 14, 2018
pages Switch from Retina.JS to srcset Sep 13, 2018
passages Don't render footnote links when sending emails Jun 14, 2018
pool Just use WaitGroup as a value type Aug 19, 2016
resizer Add `-auto-orient` option Sep 3, 2018
scripts We now have retina images for talks Sep 13, 2018
talks Check that ImagePaths aren't empty in testing Sep 13, 2018
templatehelpers Add comment on exported function Sep 13, 2018
testing Add test file to testing package Jul 18, 2016
toc
vendor Remove comments that aren't quite true Sep 2, 2018
views
.env.sample Add `LOCAL_FONTS=true` to `.env.sample` [skip ci] Jul 25, 2016
.forego Let's get sorg off the standard 5000 port by default Nov 1, 2017
.gitattributes Strip git-lfs Sep 1, 2018
.gitignore Script to resize exported talk images Sep 13, 2018
.gitmodules Initial commit Apr 27, 2016
.travis.yml Move photos to a different prefix in deploy Sep 2, 2018
Gopkg.lock Switch to dep for dependency management Sep 2, 2017
Gopkg.toml Switch to dep for dependency management Sep 2, 2017
LICENSE Add MIT license Sep 25, 2017
Makefile Remove artifact Sep 2, 2018
Procfile Add watchfs for changing Go files [skip ci] Jul 8, 2016
README.md Move deployment information to its own document Sep 2, 2018
sorg.go Remove emphasis from publishing info text Sep 9, 2018
sorg_test.go Add support for "Passages & Glass" newsletter Jul 17, 2017
version.go
version_test.go Move version into separate file Jan 9, 2017

README.md

sorg Build Status

A Go-based build script that compiles my personal website. This is the site's second incarnation, with the original being a Ruby/Sintra stack (sorg = "static org").

The site deploys automatically from its CI build in Travis as changes are committed to the master branch.

Clone

git clone https://github.com/brandur/sorg.git

Build

Install Go 1.9+, set up and run blackswan, then:

go get -u github.com/ddollar/forego

cp .env.sample .env

# Used to run the test suite.
createdb sorg-test

# Compile Go executables.
make install

# Run an initial build of the site, look for build output in public/.
forego run make build

# Watch for changes in Go files and/or content and recompile and rebuild when
# one occurs.
forego start

The project can be deployed to s3 using:

pip install awscli

export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...
export S3_BUCKET=...
make deploy

Cached photos can be fetched using:

make photographs-download

Development

Run the entire lifecycle like in CI:

make

Run the test suite:

make test

Run a single package's test suite or single test:

go test ./markdown
go test ./markdown -run TestCollapseHTML

Get more verbose output while running tests:

go test -v ./markdown

Vendoring dependencies

Dependencies are managed with dep. New ones can be vendored using these commands:

dep ensure -add github.com/foo/bar