Skip to main content
# Sphinx-Doc theme for Crafter CMS

This repo contains the necessary assets to develop and deploy the python package that powers the Crafter CMS
Sphinx Docs theme.

A Gulp-powered build helps local development without `make html` to view the every change, making it easier
to work on the front end of the theme. This system as the following features:

- Handlebars HTML templates with Panini
- Sass compilation and prefixing
- JavaScript module bundling with webpack
- Built-in BrowserSync server
- For production builds:
- CSS compression
- JavaScript compression
- Image compression

## Local Theme Development

### Prerequisites

To use this, you need:

- [NodeJS](https://nodejs.org/en/) (0.12 or greater)
- [Git](https://git-scm.com/)
- [Yarn](https://yarnpkg.com/en)
- Python, twine and pip
- Foundation cli: `yarn global add foundation-cli`
- Run `yarn` to initialize the project (FYI. this is the equivalent to `npm install` in the yarn world)

### Running the dev server

Run `foundation watch`

### Development

The above will start the dev server and watch for changes. The important files to get started and
understanding are `src/layouts/default.html` and `src/pages/index.html`. These two are the markup
that renders what you see as soon as you run the watch. Index is what contains the test content to
work on styling.

At `src/assets/*` you'll find the other important parts ([s]css, js, imgs).

As for the sphinx theme itself, see `src/sphinx`.

## Build

- Run `yarn crafter`. This will update the `craftercms_sphinx_theme` directory which is the python
package to be built and published to PyPI
- Run `python setup.py sdist` to create a "source distribution"
- This will create `dist/` and inside with a .tar.gz
- Run `python setup.py bdist_wheel --universal` to create a "universal wheel"
- This will create a .whl inside of `dist/` and a `build/`
- To upload project to PyPI — with twine:
- [Set up your account](https://packaging.python.org/tutorials/distributing-packages/#uploading-your-project-to-pypi)
- If you haven't already, `pip install twine` & `pip install wheel`
- `twine upload dist/*`
- Visit [PyPI](https://pypi.python.org/pypi?%3Aaction=pkg_edit&name=craftercms-sphinx-theme) to manage the package
- Tada! Done.

#### Extra credit

https://packaging.python.org/tutorials/distributing-packages


Release files for craftercms-sphinx-theme 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for craftercms-sphinx-theme 1.1.4
File Size Uploaded
craftercms_sphinx_theme-1.1.4.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for craftercms-sphinx-theme 1.1.4
File Interpreter ABI Platform
craftercms_sphinx_theme-1.1.4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 104.5 kB

Release files / craftercms_sphinx_theme-1.1.4.tar.gz

Download URL craftercms_sphinx_theme-1.1.4.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
158fff1f077febfebe269f9aa83895925b6ee2a38541504534a956154525db8f
BLAKE2b-256 checksum
How to use checksums
44d6eebd35a199c625f20aa92b4819156d512974075a40eb534adbe23ec43976
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / craftercms_sphinx_theme-1.1.4-py2.py3-none-any.whl

Download URL craftercms_sphinx_theme-1.1.4-py2.py3-none-any.whl
Size 101.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a4197cc03d71e3c952ce9259df5525c34c37268f5cb6aa45ad068bb3cb95d7da
BLAKE2b-256 checksum
How to use checksums
7a6532adf1c9a316795ecd5b0ea826b01d57f623c7d3b8cfc6c78ab0002028da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page