Find a file
2024-03-06 17:46:06 -04:00
static Adding Linktree and Reading Page 2024-03-06 17:45:56 -04:00
templates Adding Linktree and Reading Page 2024-03-06 17:45:56 -04:00
test Images for testing the reading list 2024-03-06 17:46:06 -04:00
.gitignore Adding the option for a very minimal homepage 2024-03-06 11:04:07 -04:00
LICENSE Added license 2022-07-07 10:48:46 -03:00
Pipfile The necessary pipenv 2022-12-22 23:10:57 -04:00
README.md Updated for the minimal homepage configuration 2024-03-06 11:06:57 -04:00

Jeff's Pelican SSG Theme

The base pelican theme for my site, jeffmackinnon.com

Configuration

The first step is the pelicanconf.py file.

There are some variables that you can add to the pelicanconf.py file that make things look good.


# ####################################################
# JeffTheme variables
# ####################################################

#DIRECT_TEMPLATES = ['posts'] # If you already have a direct templates just add posts.

THEME_COLOUR = 0 # Pick the colour.
    # 0 => default
    # 1 => Blue

SITELICENSE = '<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.'
TRACKING = False
IMAGETRACKINGCODE = ''

## Sidebar things
#
#DUCKDUCKGOSEARCHURL = '' # This is the only search that I have working right now. 
BIO_IMAGE = 'jeffmackinnon.jpg' # Make sure that this is in the "images" folder
SHOWCATEGORIES = True
SHOWTAGS = False
CONTACT_PHONE_NUM = '+1 (902) 555-1234'
CONTACT_EMAIL = 'support@thisdoamin.co'
CONTACT_HOME_ADDR = 'Nova Scotia'
#CONTACT_BUSINESS_ADDR =''

# The Social Things
#
SOCIAL_SHARE = True
SOCIAL_TWITTER = 'jeffmackinnon'
SOCIAL_GITHUB = 'Jeffmackinnon'
SOCIAL_LINKEDIN = 'jeffmackinnon'
SOCIAL_FLICKR = 'jeffmackinnon'
SOCIAL_MASTODON = 'https://bluenoser.me/@Jeff'

# Frontpage customization
#

#MINIMAL = True # If True the homepage will use the 'minimal_homepage.html template.
# If minimal is set to true, the other configuration options below don't do anything.

BANNER = True
TAGLINEHEAD = 'The cool headline'
TAGLINESUBHEAD = 'The sub-header'
TAGLINE = 'Now this is going to be super cool, think of all the things we can teach you about. It is going to be amazing'
BANNERLINK = 'services/'
BANNERIMAGE = 'images/20130923124523.jpg'
CORNERSTONE_CONTENT = True # If true add the html you want in include/cornerstone.html
NEWSLETTER = '' # place your newsletter embed information here

# Article List Pages
#
INCLUDE_SUMMARY = False     # Default True
INCLUDE_TITLE = False       # Default True
INCLUDE_CATEGORY = True     # Default False
INCLUDE_IMAGE = True        # Default False
MOREBUTTON = True           # This adds the "MORE" to the article list

MICROBLOG = 'microblog' # This caetgory will ALWAYS have just a picture and no headline or summary

# This is for https://fediring.net/#table-of-members and is located in the sidebar
#
FEDIRING = False
FEDIRINGRANDOM = True
FEDIRINGURL = ''   # This is needed because the SITEURL includes the https:// and Fediring doesn't want that part.

# Article Customization
#
SHOW_BOTTOM_IMAGE = False # This defaults as false, change to true if you want to show the article image at the bottom
SHOW_TOP_IMAGE = True # This shows the article image at the top before the content. It will not be included in the ATOM or RSS feed.

# Commenting
#

# Mastodon Comments
MASTODON_COMMENTS = False
MASTODON_HOST = 'url.tld
MASTODON_USER = 'user'

# If you use a hosted commenting engine like hashover, commento, etc.
COMMENTS = False
COMMENT_EMBED ='' # This is the emdbed code that you need for the comments.

# That's all folks
# ####################################################

Second is the custom theme includes.

To make this configurable for a bunch of different sites I wanted to make sure that I can have a "custom" homepage for some of them.

To do this I have included a few templates in the include folder. Whether or not these are used is controlled by the configuration file.

  • article_footer.html
  • cornerstone.html
  • trackingcode.html

The other files in there can be modified, but don't need to be.

I'm not sure how this is going to work with an "installable" theme, which is what is holding me back. If you know how this could be done please message me (mastodon) or email jeffmackinnon@proton.me.

Use

If you are using the pelican photos plugin, and use the :image: tag to create a header image, I've added a :image_alt: variable. This adds alt text to the header image.

So, the below set up is for this post.

:image: {photo}microblog/865A0747.jpg
:image_alt: Macro photo of a flower.

Mastodon comments

To use the mastodon commenting system you will need to edit the article with the mastodon id of where it is posted.

For example, for this post with flowers I have the following tags in the post:

:date: 2023-07-04
:author: Jeff
:category: microblog
:tags: flowers, year-of-flowers
:slug: 20230704-sea-of-white-flowers
:status: published
:image: {photo}microblog/865A2210.JPG
:alt_text_image: white flowers with yellow center.
:mastodon_post_id: 110656661657103654

The critical one here is the :mastodon_post_id: with the ID of the mastodon post.

In the future this may be automatic using a plugin and some fancy JS.

RoadMap

In order of percieved importance, but not in the order that I will get them done.

  • Make installable
  • Create custom colours
  • Figure out how to create a Dark Mode
  • Create a minimal homepage option

Roadmap notes

I would like for this to be installable, and once that is ready/working I will bind it as a release.

I would also like to have a couple colour themes so that I can use this exact theme for a few of the different sites that I would like to use it for, to make that work I will need different colour styles.

Finally, and probably similar to the above, I want to have it set up so that I can have a dark mode for each of those colour schemes. I really prefer dark mode for anything that has a lot of text, and not having it for my own theme/website is probably annoying for some people.