Skip to main content

Sphinx theme for LSST user documentation built on Bootstrap and Astropy's theme.

Project description

Travis build status

This is a prototype Sphinx theme for LSST Stack documentation, based on the Astropy Sphinx theme.

Getting started with development

Get the repo:

git clone https://github.com/lsst-sqre/lsst-sphinx-bootstrap-theme
cd lsst-sphinx-bootstrap-theme

Install JavaScript dependencies:

npm install -g gulp-cli
npm install

Compile the assets and continue watching for changes:

gulp

Codebase orientation

  • lsst_sphinx_bootstrap_theme/ is the theme’s Python package

    • static/ is for static assets deployed onto the site. app.css is generated with gulp, so don’t edit it directly.

    • layout.html is the main Jinja2 template for the HTML. The other HTML files are blocks/partials.

  • scss/ contains Sass source files that get compiled into lsst_sphinx_bootstrap_theme/static/app.css.

Gulp commands

This project uses Gulp to run its build pipelines. This section describes the gulp commands you can run.

gulp

Use this default command for development. It does the following:

  • sass (compile Sass)

  • Watches for changes and recompiles assets as necessary.

gulp scss

Compile Sass into CSS (app.css). We use the following features:

  • Compile Sass.

  • Add prefixes to CSS using Autoprefixer (via PostCSS).

  • Clean and compress the CSS using gulp-clean-css.

You can run this task alone, but usually through gulp (default task).

gulp pretty

Automatically format code. See Code style via Prettier.

Code style via Prettier

This project uses Prettier to make sure the Sass and JavaScript are formatted as you’d expect. Like most projects, we use Prettier nearly as-is. A couple minor exceptions are configured in .prettierrc.yaml.

You can run Prettier two ways:

  1. Manually, by running gulp pretty.

  2. Automatically, by committing code. This is configured as a pre-commit hook in package.json.

Note that Prettier’s pre-commit hook and chunked git commits don’t mix. You’ll want to manually run Prettier before committing a subset of the changed lines in your files.

Release process

  1. Update the change log (CHANGELOG.rst), commit, and marge work to master.

  2. Tag the release using a PEP 440-compatible version string:

    git tag -s X.Y.Z -m "X.Y.Z"

    Push the tag:

    git tags --push

The Travis CI pipeline will create and upload the release to PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lsst-sphinx-bootstrap-theme-0.2.2.tar.gz (78.8 kB view details)

Uploaded Source

File details

Details for the file lsst-sphinx-bootstrap-theme-0.2.2.tar.gz.

File metadata

  • Download URL: lsst-sphinx-bootstrap-theme-0.2.2.tar.gz
  • Upload date:
  • Size: 78.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.7

File hashes

Hashes for lsst-sphinx-bootstrap-theme-0.2.2.tar.gz
Algorithm Hash digest
SHA256 71c14b309cac280301facdd6db4fc43be9b95962e20c16bb84678fd813f2d2a1
MD5 cde9b2bf762abdcce2ae95f698ee0b95
BLAKE2b-256 7da89f6da99fcea15d7b8228d1550732b319068d4d8a676ede5015e3c73dcfbe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page