In Publii, access the Tools & Plugins page, then select "Custom CSS":
You'll find a text area to paste in your custom CSS rules.
I'm working on a custom Publii theme that's derived from an existing theme, but doesn't make use of theme overrides. I'm making the changes directly to the theme files, because I want this to be a standalone theme by the end of my modifications.
As I learn new things, I'll add them to the list below. Let's assume we're starting from the "Simple" theme, and changing it to a new theme called "My-New-Theme"
Folder structure:
.
└── site name/
(Response to: https://forum.getpublii.com/topic/post-modification-date-manual-editing/)
Just wanted to chime in on this topic:
You can modify the post mod date -- just not in the UI. You'll just need to edit the db.sqlite file in your site folder. I use SQLiteStudio. It looks like the modified_at value is based on Unix Time (from what I gathered with ChatGPT).
Here's a 2nd fix for the forum topic Need Help with Publii Glitches in Author and Tag Descriptions, which uses the Simple theme. Demo of issue:
I'm assuming you're editing the main.css file in a theme override. If you're using "Custom CSS" inside Publii, try to override every rule that has to be deleted using "unset" (ex: .hero { position: unset; }
)
Delete or comment out the following three lines inside the .hero
rule:
.hero {
height: var(--hero-height); /*delete this line*/
This is an explanation of how to achieve a Masonry gallery effect for Photoswipe galleries in Publii, in response to the forum post "Why a masonry layout for front pages, e.g. Mercury, but not for the galleries ?"
Credit: Yaroslav Khvorostyanenko - "Masonry gallery for Publii static CMS" and https://koolkat.photography/
Go to your site folder > input
> themes
> [theme name] > css
and edit the main.css
file in the text editor of your choice.
Comment out (/*like this*/
) or delete all the lines of code related to the gallery. These lines should be near the end of the file, around line 2,312. Next, paste the following code:
This is an English expansion of the Google Translate widget script covered in this video: https://www.youtube.com/watch?v=5meQKQhGBZg. Thank you to Programming with Vishal !
To get started, place this script in Tools & Plugins > Custom HTML > Footer:
(Code Snippets for: https://forum.getpublii.com/topic/where-should-the-font-files-be-put-if-self-host-google-fonts/#post-7040)
Here's a summary of what you'll want to do:
.woff2
files for your font. Ideally, it should be a variable font file.Code snippets for: https://forum.getpublii.com/topic/looking-for-the-best-way-to-include-schema-markup/
{{> head}}
for the new head partial {{> head-recipes}}