Skip to content

diddlesnaps/snapcrafters.org

 
 

Repository files navigation

Snapcrafters.org website

This site catalogues releases from charm engineering teams. Its content automatically generated every 15 minutes by querying the Github API and scraping Launchpad pages.

  • The site is rendered using Hugo
  • The repositories page data is generated by releasegen.

The site is published at: https://snapcrafters.org

Development / Contributing

Developing the site is relatively simple. You'll need to have Hugo installed in order to build and serve the pages.

This site doesn't use any content pages, since it relies heavily on templating. All the visual components are in layouts/.

# Clone the repository
git clone https://github.com/snapcrafters/snapcrafters.org.git
cd snapcrafters.org

# Build and serve the site using Hugo
hugo serve -D

The site should now be available at http://0.0.0.0:1313 on your local machine.

Updating Data

For the live site, data/repos.json is automatically rebuilt from a GitHub Action, but you can build it for local development. The file is generated using releasegen.

First, create a GitHub token with repo permissions and copy it somewhere safe.

# Make sure you have golang installed, if you don't already
sudo snap install go --classic

# Get the latest releasegen binary
go install github.com/jnsgruk/releasegen/cmd/releasegen@latest

# Set your Github API token as an environment variable
export RELEASEGEN_TOKEN=ghp_aBcDeFgHiJkLmNoPqRsTuVwXyZ

# Run the tool and redirect the output to the data file.
releasegen > data/repos.json

About

The snapcrafters.org website built with Hugo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 69.9%
  • JavaScript 30.1%