Skip to content

Instantly share code, notes, and snippets.

@debloper
Last active August 9, 2018 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save debloper/408916b3a6e5cb6e47add3f82854bca7 to your computer and use it in GitHub Desktop.
Save debloper/408916b3a6e5cb6e47add3f82854bca7 to your computer and use it in GitHub Desktop.
URL scheme customization for a Ghost blog

Quick steps to change URL scheme in a self-deployed Ghose blog:

  • Open DB in CLI: # sqlite3 content/data/ghost.db
  • Set the UX properties (optional): sqlite> .headers ON & sqlite> .mode column
  • Check the settings table (look for key "permalinks"): sqlite> SELECT * FROM settings;
  • Change the URL scheme: sqlite> update settings set value = '/:id/' where key = 'permalinks';
  • Quit database (sqlite> .quit) & restart ghost server

N.B: year, month, day, slug, id etc are valid keywords for configuring the URL (let me know if I've missed any).
Statutory Warning: if you're using different database, the steps are similar, but the commands will differ to achieve the same purpose. Also, I'm not to be blamed if you broke your thing while trying this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment