Skip to main content

Keith’s Website Theme

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).

email

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).

linkedin

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.

Release files for kpruss 0.0.3

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

Source distribution (sdist)

Source distribution for kpruss 0.0.3
File Size Uploaded
kpruss-0.0.3.tar.gz 19.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kpruss 0.0.3
File Interpreter ABI Platform
kpruss-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 33.3 kB

Release files / kpruss-0.0.3.tar.gz

Download URL kpruss-0.0.3.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4b974c26c4ff912393f7eca2f1f634cec7277ac767fb3ea3656cc3d369802962
BLAKE2b-256 checksum
How to use checksums
56820345994ef61151fa72088bfc4e3b0c5dcde2d6db1f0ec1f667216fddd170
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / kpruss-0.0.3-py3-none-any.whl

Download URL kpruss-0.0.3-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c043fb9a6a6d70eb15e4fa597dc9b6319c9e961c958fb2c9729c8bf7a492cf72
BLAKE2b-256 checksum
How to use checksums
6c4df83c54406a7289e9cef2676a9ad5fba5b06bb65f6479cfc929cee7d0473f
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

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