question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Permalink Settings UI

See original GitHub issue

The current Permalink Settings UI is just a checkbox to switch between WP style and Ghost style permalinks. But Ghost is capable of supporting many, many more formats. In order to make these formats accessible, we are going to add a new UI to the general settings pane that is going to look something like this:

In order to ship this, the following tasks need to be completed:

Ghost Permalink Spec

The details of what permalink formats we support were originally covered by https://github.com/TryGhost/Ghost/issues/2057 and extended by https://github.com/TryGhost/Ghost/issues/3858

The full details of what constitutes a valid permalink as a result of those two issues are:

A permalink can contain any of the following items:

  • :slug
  • :id
  • :year
  • :month
  • :day
  • :author
  • santised custom text containing a-z, 0-9, - or _

To be a valid permalink:

  • each item must be separated by a ‘/’,
  • there should be a maximum of 5 items
  • one of them must be :slug or :id so that the post can be identified.
  • no url part can be ghost

Examples

I could set my blog posts to have a URL like any of these:

  • /:year/:month/:slug/
  • /:year/:slug/
  • /blogpost/:id/
  • /post/:year/:month/:day/:slug/
  • /:author/:slug/
  • And many more combinations

Please note that contrary to what is shown in the new UI, Ghost does not yet support having a tag in your permalink, because at present we have no way to indicate which tag would be the canonical one.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:21 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
kirrg001commented, May 31, 2018

@Cellane There is a table called settings.

update settings set value=‘/post/:slug/’ where `key`=‘permalinks’;

This query makes it possible to change the location of all posts.

But note: We are about to ship the beta of dynamic routing. This feature makes it possible to configure your routes in a yaml routing file. I would recommend waiting for the upcoming release next week.

1reaction
jlohcommented, Nov 22, 2016

I asked this question on slack however didn’t get a response so thought I’d shoot a question on here. Is there any plans of implementing this for 1.0/x or a general overhaul of the whole permalink structure so you can do things like sub pages or put all posts under /post for example?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use the WordPress Permalink Settings - BoldGrid
In your WordPress dashboard, navigate to Settings > Permalinks and scroll to the bottom. Look at the Category Base field – if you...
Read more >
Settings Permalinks Screen – WordPress.org Forums
The Settings Permalinks Screen allows you to choose your default permalink structure. You can choose from common settings or create custom URL structures....
Read more >
What Permalink Is And How To Customize Permalink In ...
At first, go to your Admin dashboard, and then you need to go to Settings ▻ Permalink. · Here, you will see a...
Read more >
What is WordPress Permalinks and How to Change it?
Login to your WordPress admin dashboard and navigate to “Settings > Permalinks”. WordPress allows the following options for setting URL of your site....
Read more >
What Is A Permalink And How To Change It?
A consistent URL structure can make your site more SEO-friendly, allowing you to attract more visitors from search engines.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found