Skip to content

About

Website content

Resources

Code of conduct

Contributing

Security policy

Stars

18 stars

Watchers

4 watching

Forks

Repository files navigation

Nerves website

Get started

The website uses Hugo and Node.js. We're using asdf to manage versions, so first install the hugo and nodejs plugins if you haven't already.

asdf plugin add hugo
asdf plugin add nodejs

Then install dependencies:

asdf install
bin/setup

Run the development server.

bin/server

The stylesheets are compiled with Dart Sass, which bin/setup installs through the sass-embedded npm package. bin/server puts it on the PATH for Hugo, so use it rather than running hugo server directly.

Visit localhost:1313.

Release activity from Hex.pm

hex_packages.txt lists the Nerves packages on Hex.pm that we track, one per line. bin/sync_hex_packages looks each of them up and writes data/hex.json: the latest version and publishing date per package, who wrote the commits since the release before it (from GitHub, with their avatars saved to static/img/hex-authors), and a summary (releases and packages released in the last 30, 90 and 365 days) that templates read as hugo.Data.hex. The Code page shows a line from it.

The github pages workflow runs the script before each deploy and once a day on a schedule, without committing the result. The committed data/hex.json is what local builds, pull request builds and a build that cannot reach Hex.pm use. To refresh it:

GITHUB_TOKEN=$(gh auth token) ./bin/sync_hex_packages

Without a token the authors are left as they are.

Adding to the newsletter archive

The Newsletter sync workflow runs every Friday and opens a pull request with any issues that are in the archive on underjord.io but not here yet. To do the same locally:

./bin/sync_newsletters --dry-run  # list what's missing
./bin/sync_newsletters

To add a single issue by hand, get the URL to the HTML source (usually found at the top where it says No images? Click here) then run the script:

./bin/add_newsletter URL

See ./bin/add_newsletter --help for customization and more info.

Both scripts strip the email markup (inline styles, the logo header, the unsubscribe footer, the recurring "how to help" sections) and replace Campaign Monitor's click-tracking links with where they point, so the issue reads like a regular page on the site. Pass --raw to keep the email as-is. The cleaning lives in bin/newsletter_cleaner.exs. To re-run it over issues that still contain the raw email HTML:

./bin/clean_newsletters [FILE...]

About

Website content

Resources

Code of conduct

Contributing

Security policy

Stars

18 stars

Watchers

4 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages