Disqus - preserve the thread when page is redirected
Closes https://gitlab.com/gitlab-com/gitlab-docs/issues/138
I'm using this method to preserve the comments thread when we redirect a page on the docs:
- Define Disqus'
this.page.identifier
as the page slug - When there's a redirect, we use
redirect_from
in the new page frontmatter so Disqus will use the old URL as identifier
The old doc will have in its frontmatter (https://gitlab.com/gitlab-com/gitlab-docs/issues/144):
---
redirect_to: 'new/path.md'
---
And the redirect layout will not include the comments.
The new doc will have in its frontmatter:
---
redirect_from: 'old/path.hml'
---
So that Disqus will always identify the page from the redirect_from
slug.
Page with redirect_from
:
Normal page:
@axil is my logic right?
Refs:
Edited by Marcia Ramos