LogoJoshua Spann

Hacking with Publii

Publii Background

Sep 19, 2019

Publii is a static CMS generator, similar to Wordpress. You install an app on your Windows or OSX device to build the website, then specify where to deploy it to. For the optional cost of only a domain name, you can host your own website with no progamming knowledge!

Chances are you’re a web developer that has little time and money to hack together your own website (all that time going to work, sleep, and memes). Like any pro, you pick a random and easy-looking framework. Publii is one such tool that looks friendly, too friendly. So friendly that it doesn’t do much. So how do you make it do more? Can you?

JavaScript

Luckily, Publii can do JavaScript. Publii has a source-code HTML button. Go ahead, click it. Looks familiar? Now type in a <script></script> tag. You’ll see the following below. Get the idea?

Publii Script Tags

But wait! That’s an image! I’m fooling you! Nope, Publii generates HTML so you can safely assume that an inconspicuous button must do something. Go ahead, click it after coding one. Seeing is believing.

CSS

Now Publii has very few decent themes on its own Marketplace. Seriously. Very. Few. With the All option selected, you get a whopping 15 total themes! Only 8 are free. Most of them are no-doubt good enough, but sometimes you need some flair and panache, ya know? Just a simple tweak to make that pic pop! Or to fix a glitch where the theme displays all images at FULL-SIZE, even when they obviously shouldn’t.

Simple! Go to the main menu on the left, to the bottom on Tools, then click on the Custom CSS button. There ya go. Simple as that!

Tools Page

Of course you could always do custom CSS by editing a post’s HTML, but that’s really not something to get into.

Dynamic Content

Unfortunately, no. Publii is a static CMS generator, it makes pure HTML/JS/CSS only. Need a DB? Look at an API. Need to dynamically change and update page content? JQuery. Need a small web shop? Stop being cheap and upgrade to an actual server.