URLs to posts from forums

I’ve - so far - understood how to provide/use robust links within my blog between posts. What bothers me are those links I use in forums to posts. When I want to have the last-update-date displayed in a post to indicate its last revision the link will change! So I am looking for two things:

  • a way to display instead of the date, which is part of the url, a last-update-date in the front matter
  • how to come to more robust external urls which - for instance - do not change when I add a category, or alternatively display my_categories which again I maintain in the front matter and have them possibly displayed under the post title at the home page.

Leave the date of the post in the filename as when it was created.

You can add an optional date field

date: 2020-04-01

That will get converted to midnight and use can use as page.date and will overwrite the date set from filename.

or date_updated field if you want to keep created and modified separate.

Help on time handling


1 Like

I’d say figure out your categories when you make the post

You can change permalink in config if you really want to remove category from the post URL.

My guide

Please don’t go an implement my_categories because you don’t like how categories works. That’s not going to be easy to set up or maintain.

You can try adding using a tag instead of a category. It serves a different purpose but won’t change the URL ever so might suit you.

This might help for general use of categories and posts

Unfortunately I asked two things at once. I’d like to concentrate on the what I would call “External Links” issue.

  • At first I think that Permalinks will not help at all because they work only within the blog to link from one post to amother. Please correct me if I am wrong
  • Links to blog posts will be in numerous foreign forums which makes it impossible to keep them up to date when a post url Changes fo one or another reason, changing the title for instance
  • Something which does (yet) not exist would be a kind of “hashed” link which I use in “foreign forums” and I am able to maintain within my blog to which url it is “forwarded”. Example:

    The link https://warbe-maker.github.io/1234567890abc is forwarded to Programmatically updating or synchronizing VBA code of Excel VB-Project Components | Excel Passion
    In case the url within my blog changes I can maintain this change and because all foreign forums exclusively use the “other kind of permalink” there is no need to edit each of them.

I really wonder why this just my problem and not a very common well known by many one.

Correct. The link tag only works within the site. Same with the where filter.

The internet is messy. Links between my sites, from external sites and to external sites break. As sites rename and pages get moved or deleted.

There are tools you check if links from your site to other sites are valid.

I once ran checks against my Jekyll site locally with a Ruby tool. There will be plenty to choose from. It can be written in any language and will run against your HTML output - it doesn’t have to be Jekyll orientated.

You can also have it run in the cloud with GH Actions. Here are some generic ones to run against your Jekyll or whatever site that is deployed (or on preview URL). Run it on a schedule if you care about external links changing from time to time and then you’ll get a GH notification to gonand fix it.

There is a Jekyll Redirects plugin which would allow you move your post to a new path and have the old path point to the new one, to stop breaking of links.

So /abc.html would point to /xyz.html if you rename abc.md to xyz.md and also manually set up a redirect config value.

I guess what you could do is take Jekyll Redirects further and set up as hash /abc123def456.html URL in a config which points to /sub/abc.html or /sub/xyz.html when it moves.

Even better if you add a section on your page which says Share and provides a permalink for you and others to copy.

And then you would have to exclusively use that hash when linking to your posts from forums. Not everyone else will do it when linking to you .

Or you could force every page on your website to have a hash at the root and set that as permalink: /abc123def456.html.
then your site becomes more reliable, and less friendly (the page names and dir structure get lost in the URL bar)

Also you have to set manually on every page. You should not use a plugin or Ruby code to generate the URL randomly or based on the content, because then it risks changing. You would have to generate a hash externally even if it is 6 characters to handle 1000s of pages and then you paste it in your frontmatter.

On a non-Jekyll site there is a solution that is possible with some server and database… If you use dev.to you’ll see that a post gets created with a permalink as a mix between a hash and the title and if you rename the title of the post, the URL will not change.

Here is one of my posts there

It’s a complex issue and also two issues. To control links going out and links going in.

I gave ideas which take different levels of effort and maintenance.

I myself what to do the auto link checker to fix links between my own sites and to external sites. I am accepting links to my sites on forums will break if I rename a domain or page or move a page and if a link is important then I won’t move it, or I’ll move it and then make a page which in th old location saying This page has moved here … and use the link tag. Without the redirect plugin.

You can also just accept that things will change on the internet and broken links are inevitable and it may not be worth chasing down every link externally unless you have the time or it is a priority (like if you have high volume and make money from your site).

Thanks for this info. The redirect plugin looked pretty promising. Unfortunately I almost immediately lost confidence in it when I realized that all posted issues went “stale” because of no reaction to them. It appears that someone has thrown something over the wall and now doesn’t care or has no capacity for it.

I’ll try looking for alternative solutions. When I cannot make sure my links in other forums break I will not set one. I find broken links too frustrating to add one anywhere which potentially will break.

1 Like