- HSS is responsive and single page design theme for Pelican, it is my hack of a Giulio Fidente's gfidente/pelican-svbhack theme.
- HSS is "H"ack to "S"ingle-page-layout of "S"VBHACK.
You can see the my site.
| index | content |
|---|---|
![]() |
![]() |
Clone the repository, edit your pelicanconf.py and modify the THEME variable to make it point to the downloaded theme location.
-
GOOGLE_ANALYTICSto use Google Analytics, set this var to your ID ("UA-..." or "G-...") code -
The following values are intended for use Google Adsens(only responsive).
GOOGLE_ADSENSE_CLIENT:ca-pub-XXXXXXXXXatdata-ad-client.GOOGLE_ADSENSE_SLOT: value atdata-ad-slot
ex.
GOOGLE_ADSENSE_CLIENT = 'ca-pub-xxxxxxxxxxxxxxxx' GOOGLE_ADSENSE_SLOT = 'xxxxxxxxx'
-
USER_LOGO_URLto replace the logo placeholder, put your logo in content/images/your_logo.png and make this var point toSITEURL + '/static/images/your_logo.png' -
DISQUS_SITENAMEset this to your Disqus sitename to enable disqus comments in articles -
TAGLINEsome text rendered right below the logo -
INTERNET_DEFENSE_LEAGUEset this toTrueif you want to enable the Internet Defense League code -
SHOW_SOCIAL_SHARE_BUTTONto use social share button. set this var toTrue. -
SOCIAL_SHARE_BUTTONSto choice social media forfrom the following.
twitter: twitterx_twitter: Same astwitterexcept icon and domain.facebook: facebook share linkhatebu: hatena bookmarkbsky: Bluesky Social(bsky.app)
ex.
SHOW_SOCIAL_SHARE_BUTTON = True SOCIAL_SHARE_BUTTONS = ( 'twitter', 'x_twitter', 'facebook', 'hatebu', 'bsky', )
-
CUSTOM_CSS_URL(Default:None)if you want to customize to stylesheet, you add css file by your hosting and seting url to this value.
ex.
make
custom.cssto/path/to/your-pelican-project/content/extra/custom.css
and add topelicanconf.py# set custom.css url. CUSTOM_CSS_URL = '/static/custom.css' # add `extra` to STATIC_PATHS. STATIC_PATHS = [ 'extra', 'images', ] # set url of custom.css to EXTRA_PATH_METADATA. EXTRA_PATH_METADATA = { -- -- snip -- -- 'extra/custom.css': {'path': 'static/custom.css'}, }
or you can use your hosting url path.
so use your hosting url, there is no need to setSTATIC_PATHS,EXTRA_PATH_METADATA.# set custom.css url. CUSTOM_CSS_URL = 'https://your-hosting.example.com/path/to/custom.css'
-
HSS_TWITTER_CARDto enable twitter card for your site. set this var toTrue.HSS_TWITTER_CARD_TWITTER_IDtwitter_id for TWITTER_CARD, if you want. (optional)
-
HSS_DEFAULT_OGP_IMAGE_URLfor default ogp image of your site by URL.
if you want to set an ogp image by articles, set below parameters as file metadata.
ogp_image_url(URL): set an url path that you want to use as an ogp image.twitter_card_large(bool, default: false): set "true" if you want to ogp image as "summary_large_image".
ex.
Title: My super title
Date: 2022-02-05 10:20
... snip ....
ogp_image_url: https://example.com/path/to/your_ogp_image.png
twitter_card_large: trueAll theme pages automatically output a <link rel="canonical"> using SITEURL
and the page's URL. This includes the home page, category, tag and author pages,
archives, and category, tag and author indexes. Paginated lists use each page's
own URL, including custom PAGINATION_PATTERNS. Direct template pages respect
INDEX_URL, ARCHIVES_URL, CATEGORIES_URL, TAGS_URL and AUTHORS_URL when set;
other templates extending base.html fall back to their output filename.
For publishing, set SITEURL to your site's
absolute URL and RELATIVE_URLS = False. No automatic canonical link is emitted
when SITEURL is empty.
To point an article or page to a different canonical URL, set canonical_url in
its metadata to an absolute URL:
Title: My super title
Date: 2026-11-03 10:20
canonical_url: https://example.com/original-article.htmlThis metadata takes precedence over the automatically generated URL, including
when SITEURL is empty. Remove any canonical links added through a template
override or CUSTOM_HEADER_HTML when switching to the theme's built-in support
to avoid duplicate links.
Template regression checks require Jinja2 (included with Pelican) and can be run
with python -m unittest discover -s tests -v.
- A different Pygmentize theme can be used by editing
./Makefileand runningmake pygments.
- HSS is authored by Kei Iwasaki.
- pelican-svbhack is authored by Giulio Fidente.
Released under MIT License, full details in LICENSE file.

