Skip to content

Latest commit

 

History

History
90 lines (54 loc) · 2.72 KB

README.rst

File metadata and controls

90 lines (54 loc) · 2.72 KB

EthicalAds

This is a landing page for EthicalAds.io, the developer network from Read the Docs.

Site details

The site is built as a static site using Pelican and hosted by GitHub pages. The site is automatically built and updated when there are commits on the main branch although it can take up to 5 minutes.

Building the site locally

You can build the site HTML and serve it locally with:

$ pip install -r requirements.txt
$ pre-commit install  # Install a code style pre-commit hook
$ inv rebuild         # build one time
$ inv regenerate      # regenerate the site whenever you modify a page/post
$ inv serve           # serve the site at http://localhost:8000
$ inv livereload      # Rebuild and serve the site on http://localhost:8000

If you don't see any styling, you may also need to build static assets (see below).

Building static assets

Built static assets are NOT checked into the repository and you need to build them if files under static-src/ are modified.

$ npm clean-install
$ npm run build     # use "npm run dist" for minified builds

The static content appears in ethicalads-theme/static/

Deploying the site

The site is generated automatically by GitHub Actions whenever there's new commits on the main branch. It is served by GitHub pages at https://www.ethicalads.io.

For more details on the deployment actions, see workflows.

Developing the site

Style Guide

Our style is loosely based on the Wikipedia Manual of Style.

  • Titles use title case
  • Section headings (h2 and below) use sentence case and tend to be descriptive/substantive beyond a simple noun

Writing pages

Pages should be saved under content/pages/. By default, they use the ethicalads-theme/templates/page.html template but that can be overridden.

Writing blog posts

Blog posts should be saved under content/posts/.

Updating the design

The styles and scripts for the site are built by Webpack from the sources in static-src/. The HTML templates for the site live under ethical-ads-theme/ and extend from Pelican's simple theme.

The EthicalAds theme was not designed to work with relative URLs.