We have versioned documentation and we’re trying to alias content via symlinks–which we have “working,” but not without errors when running hugo, e.g.:
ERROR 2018/02/26 16:34:07 Two or more menu items have the same name/identifier in Menu "sensu-core-1.2": "CHANGELOG".
Rename or set an unique identifier.
The URLs behave appropriately (/2.8 and /latest both work and point to the same content), but these errors cause hugo to exit non-zero–appropriately, I suppose.
So I have a couple of questions:
Is it intended for this to work? (I think the answer is no, and that it just happens to work.)
Are we doing it wrong?
I know we can do this with aliases, but then we have to maintain frontmatter for every page that should be “latest.” Or am I missing some other mechanism for aliasing.
We aren’t doing anything in frontmatter right now. We’re actually trying to figure out how to avoid that. If we do this in frontmatter, we’d have to automate the process, because otherwise we’d have quite a few files’ frontmatter to edit when we release a new version of the documentation.
The problem is that the two versions of the same page will be assigned the same ID in the defined menu. Removing the ERROR message will not fix the problem with the menu. The menu logic needs to be adjusted for this case. The menu code is not mine, but you need to create a GH issue to track this.
Ahhhhh okay, right. Yeah, my suspicion was that we were going to have to do URL rewriting/redirects somehow, but Heroku doesn’t support it. I had forgotten about netlify, though. Will ponder how we might be able to do this. Thanks.