Open yeekangc opened 6 years ago
This work may need #175 if we want to change any existing URLs.
Right now the code to generate the related guides section is using the permalink (which happens to contain the projectid). If we choose to make the projectid and permalinks different, we will need to change how we find the guides that belong in the related guides section. Maybe we look for projectids and ask Jekyll/Liquid for the permalink?
Hi @yeekangc @evelinec Do we still need this issue?
Yes, @kinueng. This is still what we should consider and so for SEO.
I think you can change the permalink in guides, but keeping the project id's as is. We'll need to add redirects from old guide urls to the new ones once they change.
Adding support for a guide-redirects.properties file in the guides-common repo which will help address the move of permalinks.
@gkwan-ibm @yeekangc now the ui work is done for guides to begin converting permalinks. Add the old url and new url to the guides-common redirect file and then it should work on the draft site.
@gkwan-ibm @yeekangc i see one more instance on end of guides, where we display the cards to other related guides. This uses the permalink. I need to debug a little bit more to see how it can be done before we change the guides. But at least the redirect file can be used for now.
@yeekangc @gkwan-ibm
It actually works with no changes to the UI.
1) If a page permalink changes, then the guides that reference that guide in their page-related-guides will also have to update that metadata to include the new permalink. 2) Update guide categories json to include the new permalink changed.
The reason why we have to update the related guides and guide categories json, is that jekyll has no idea what projectid is. It can only have access to "page" variables. If we wanted to not have to change the related guides and guide category json, another approach is to rename :projectid: to :page-projectid:. If you want to take that approach, let me know as i'll probably have to update the ui code to look for the projectid instead of permalink.
@gkwan-ibm do you know if the above is good to implement or if we even want to change the permalinks anymore?
Hi @steven1046, what is the current status of this issue?
I provided a suggested fix above.
We need to optimize permalinks for the guides for SEO. The website will need to handle permalinks that do not map to projectids and treat them as independent.
related-guides uses projectid today and the website might have coded with the assumption they start with projectid.
Please answer the following if applicable