Change Archives URL
I would like to change the URL of the archive, but I can't find a way to do it. Instead of url/archives, I want the archive website to be accessible at url/blog. How can I change this?
Hello! This is very possible. You will first need to fork an editable copy of your template, if you haven't done so already. Then follow these steps:
- Open the template's package.json file
- Change the
urlparameter of thearchives.htmlproperty from/archivesto/blog. The relevant section will look something like this:
"archives.html": {
"url": "/archives",
"partials": {
...
}
},
Don't forget to also change the link on your menu from /archives to /blog.
Does that solve the problem? Please let me know if you have any questions about this or anything else.
Is this how you would change the url structure for tagged items too? I'm migrating from Squarespace, which used the domain/blog/tag/tag-name structure and I want to preserve those links. Can I set that structure up here, too?
This won't work for tagged pages unfortunately, since the format of those URLs cannot be changed at the moment, although I plan to make this possible in future. In the meantime, I would set up a general purpose redirect using RegEx from:
/blog/tag/tag-name
to:
/tagged/tag-name
Does that help?
I'm not super familiar with RegEx syntax. I've tried this combo, but it didn't work. Any ideas?
Could you put me on a list to know when that format can be changed?
This should work:
from: /blog/tag/(.*)
to: /tagged/$1
If you send us an email we'll notify you and follow up here when you can customize the tag URL.