Notes for upgrading an existing GoBlog site across releases that need manual steps. Newest first.
Fenced code in posts and pages is now coloured when the markdown is rendered, and goblog no longer loads highlight.js. Two things to do:
- Label your code fences. A fence with no language (
```rather than```go) is guessed, and chroma's guess only works for code with a clear signature, such as Go'spackageline or a#!/bin/bashshebang. Anything else renders as plain text until you add the language:```bash,```python,```yamland so on (chroma's list). - Themes: drop any
hljs.highlightAll()call fromfooter.html;hljsis no longer defined, so the call throws. To restyle code, override the.chromaclasses in yourgoblog.css; the defaults are inwww/css/base.css.
Optional, from 0.14.0. A site set up before GOBLOG_DATA_DIR existed keeps its files in goblog's working directory (/go/src/github.com/compscidr/goblog in the Docker image), usually with one bind mount per path. It keeps working as it is. To move it to a single data directory instead:
-
Stop goblog and take a backup of everything below.
-
Copy the files into the data directory, keeping these names:
Before (relative to the working directory) In the data directory .env.envthe SQLite file named by sqlite_dbin.envany name, see step 3 www/uploads/uploads/plugins/wasm/plugins/wasm/plugins/dynamic/plugins/dynamic/themes/installed/themes/installed/(not needed if you setTHEMES_INSTALLED_DIR, which still wins)Copy only what exists; goblog creates the rest. A MySQL or PostgreSQL database stays where it is.
-
Point
sqlite_dbat the copy. A relative path is resolved inside the data directory, sosqlite_db=goblog.dbmeans<data dir>/goblog.db. Do not keep a../path:sqlite_db=../database.dbwould now resolve to the data directory's parent. An absolute path is used as given. -
Start goblog with
GOBLOG_DATA_DIRset to the directory, and with Docker mount it instead of the individual paths:docker run -p 7000:7000 -e GOBLOG_DATA_DIR=/data -v /srv/goblog:/data compscidr/goblog:v0.14.0
The log says
Data directory: /dataat startup. -
Check the site, an image from a post (uploads are served at the same
/uploads/...URLs), Admin → Plugins and Admin → Themes. Signing in should work with the same account, since.envcarries the session key and GitHub settings.
Two things still read only from the working directory: the WordPress-compatibility path /wp-content/uploads/ (served from www/), and local.env, a development fallback for .env. Leave those mounts in place if you use them.
The minimal theme is no longer built in; it is Minimal in the theme directory. A site whose theme setting is minimal renders default after the upgrade until you install Minimal from Admin → Themes — the setting is left alone, so the site switches back the moment the theme is installed.
The analytics and socialicons plugins are no longer compiled in; they are Google Analytics (goblogplatform/goblog-plugin-analytics) and Social Icons (goblogplatform/goblog-plugin-socialicons) in the plugin directory. After upgrading, install the ones you use from Admin → Plugins. Their settings carry over (same plugin names and setting keys), so your measurement ID and profile URLs are back as soon as each plugin is installed; until then the snippet and the icon row are simply absent. Docker users: bind-mount plugins/wasm/ first (see Installing from the directory).
The scholar plugin is no longer compiled in; it is now Scholar Publications in the plugin directory (goblogplatform/goblog-plugin-scholar). After upgrading, install it from Admin → Plugins. Your Research page and the plugin's settings carry over (same plugin name and page type), so the page reappears in the nav as soon as the plugin is installed and enabled — its enabled setting defaults to false on a fresh install, while a site that already had scholar.enabled=true keeps it. Until then the page is hidden and /research answers "Page Not Available". The new plugin reads from the Semantic Scholar API only — if you were using Google Scholar, set semantic_scholar_id (the number at the end of your semanticscholar.org author URL) under Admin → Settings → Scholar Publications. Docker users: bind-mount plugins/wasm/ first (see Installing from the directory), or the installed plugin vanishes when the container restarts.