# Jeff's Pelican SSG Theme The base pelican theme for my site, [jeffmackinnon.com](https://jeffmackinnon.com) This is version 2.0, which is very very different and "simple". If you are looking for the original theme check the release V1.0 ## 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. SITELICENSE = 'Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.' TRACKING = False IMAGETRACKINGCODE = '' 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 ='' #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. INCLUDE_IMAGE = True # Default False # 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 # # 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 - 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](https://bluenoser.me/@Jeff)) 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](https://jeffmackinnon.com/20230511-new_flash.html). ``` :image: {photo}microblog/865A0747.jpg :image_alt: Macro photo of a flower.