The Sphinx theme for my website
Project description
This package is the Sphinx theme for use by my projects and website. The base design started from the Jekyll Now them I started with, but I’ve modified some of the base styling, structural names, updated the link images in the footer (based on the usage details for each website), and adapted it to work with Sphinx.
Theme Options
The theme aims to be light weight and only has a few options. These are focused on my wants for my website. These include:
- author
The author of the website (me). This is placed in the masthead of each page with the project name beneath and is a link to the main page. If this is not give, the project name is used as the main link.
- avatar
The URL to the author’s Gravatar. This logo is placed in the masthead to the left of the author (or project).
An email address to use for the email link in the footer.
- github
The author’s Github handle (creates a link to the profile using the Github logo in the footer).
The author’s LinkedIn handle (creates a link to the profile using the LinkedIn logo in the footer).
- stackoverflow
The author’s Stack Overflow user ID (creates a link to the profile using the Stack Overflow logo in the footer).
Customization
The theme relies primarily on CSS to manage the customization. The new classes it defines are “abstract” and “by-line” for the post layout (see below). It uses the following CSS variables to set the basic colors:
- --foreground
The color of the main text.
- --background
The background color of the websites.
- --headers
The color of the headers.
- --quotes
The color of block quotes and level four headers.
- --links
The color of links.
- --footer
The background color of the footer, the border below the masthead, and the admonitions.
- --main-font
The list of fonts to use for the main text.
- --code-font
The list of fonts to use for code blocks.
To override these values (or redefine any other settings), create a “custom.html” and place it on the html_static_path. To see the default settings, use python -m kpruss {base,variables}.
The theme defines an additional page for blog posts. This is just a normal page, but it defines an “abstract” class that should be the first paragraph to summarize the post. It will also typeset the author and date from the metadata as a by-line after the post. To create a post, add the following metadata before the title of a post:
:author: A. Nonymous :date: 2021-03-21 :template: post.html Post Title ========== .. container:: abstract The abstract of the post. The content of the post.
The key metadata value is the :template:. The page.html template will use this template to generate the page. To add a custom template, place it on the html_static_path. This template should extend the basic page.html template.
This theme defines the template block headernav within the masthead in the layout. This placed at the end of the <header> and is designed for the “Blog” and “About” navigation buttons from the original Jekyll Now template. The following custom layout.html would add the links these to the header (mind the version skew regarding root_doc):
{%- extends !layout.html %} {%- block headernav %} <nav> <a href="{{ pathto(root_doc) }}/blog">Blog</a> <a href="{{ pathto(root_doc) }}/about">About</a> </nav> {{ super() }} {%- endblock %}
Contributing
Thank you for you interest in improving my Sphinx theme. It is open sourced under the BSD 2-Clause License like Jekyll Now, and I welcome feedback via bug reports, feature requests, and pull requests. Please report all bug reports or request a feature by submitting an issue on the Github project page.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kpruss-0.0.3.tar.gz
.
File metadata
- Download URL: kpruss-0.0.3.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b974c26c4ff912393f7eca2f1f634cec7277ac767fb3ea3656cc3d369802962 |
|
MD5 | 1a5ccdd35e4cea6297b6fba9cad7295d |
|
BLAKE2b-256 | 56820345994ef61151fa72088bfc4e3b0c5dcde2d6db1f0ec1f667216fddd170 |
File details
Details for the file kpruss-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: kpruss-0.0.3-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c043fb9a6a6d70eb15e4fa597dc9b6319c9e961c958fb2c9729c8bf7a492cf72 |
|
MD5 | d223701cd88af4641c22c14d39a9884f |
|
BLAKE2b-256 | 6c4df83c54406a7289e9cef2676a9ad5fba5b06bb65f6479cfc929cee7d0473f |