google / certificate-transparency-community-site

Certificate Transparency Community Website
https://certificate.transparency.dev
Apache License 2.0
107 stars 63 forks source link

Certificate Transparency website.

This website is built as a static site using Hugo. Stylesheets are written in SCSS.

Dependencies

You'll need Hugo 0.60 extended or greater installed on your path. For OSX, brew install hugo should hook you up. The site was developed against Hugo 0.62.

You'll need a Javascript package manger to install PostCSS and other dependencies. npm is recommended (primarily for compatibility with Github Actions).

Running the site locally

npm install

will install the JS dependencies. Once you've done that, you can spin up a local server with

hugo serve

Where content is stored

Adding new timeline/logop/useragent/monitor entries

See CONTRIBUTING.md

Automatic deployment

We currently deploy to Github Pages.

Currently, there's an action setup (in ./github/workflows/gh-pages.yml) that will build the site and deploy it to Github Pages on every commit to master.

It does this using actions for Github Pages by @peaceiris. It uses the per-repository GITHUB_TOKEN to authenticate this.

Every time you push to master, the action checks out the code, builds the site, pushes that build to the gh-pages branch and then, thanks to configuration, that's available at a Github Pages URL. That URL is secured through obscurity rather than anything else, which we've previously deemed acceptable for this project.

The CNAME for the site's URL is not stored in the repository; instead, it is set every time via the gh-pages action, and configured with the cname variable inside the workflow.

Note that the environment variable HUGO_ENV should be set to production to enable CSS minifcation/fingerprinting and to disable SCSS sourcemaps. This is currently the case on our Pages deployment, where it is made available as a Secret.

The site also automatically deploys whenever a Pull Request is closed.

License

Apache 2.0

This is not an official Google product.