Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all 404 links #229

Merged
merged 3 commits into from
Aug 30, 2023
Merged

Fix all 404 links #229

merged 3 commits into from
Aug 30, 2023

Conversation

smythp
Copy link
Collaborator

@smythp smythp commented Aug 22, 2023

All links on the docs site that resolved to 404 now lead somewhere

Some links changed to more useful or up-to-date links

Added link to Slack invite

References #43

Resolves #228

@netlify
Copy link

netlify bot commented Aug 22, 2023

Deploy Preview for docssigstore ready!

Name Link
🔨 Latest commit 979b7cc
🔍 Latest deploy log https://app.netlify.com/sites/docssigstore/deploys/64efa5fd4e64680008758175
😎 Deploy Preview https://deploy-preview-229--docssigstore.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@normal-coder
Copy link
Contributor

normal-coder commented Aug 22, 2023

Note: This is strongly not recommended!

Please try to solve this problem by Hugo engine.

@smythp @ltagliaferri

This is equivalent to tampering with all your routes once. This will cause all existing Sigstore materials and external links to be unable to get the correct jump. (In fact, this is a bug left over from migrating Hugo)

In addition, if the existing document address is changed, it does not look elegant. For a docs second-level domain, there is still a docs on the route, except that it brings extra operational burden to people like www in a domain, what's the point?

+ https://docs.sigstore.dev/docs/about/tooling/
- https://docs.sigstore.dev/about/tooling/

@smythp
Copy link
Collaborator Author

smythp commented Aug 22, 2023

In principle, this is absolutely correct. Moving all of the URLs down to docs will break most external links to the site.

However, I'll note that the site has undergone a major content reorganization as of last week, and among those changes is the renaming of (I think) every resource category. For example, many of the resources that were once under "cosign" are now under "signing." When the Hugo migration was undertaken, only perhaps 4-5 links had the same URLs (about half of the items now under "about"). About 20% of the link fixes in this PR are actually internal links not updated during the content migration.

If more than a handful of links hadn't been reorganized, I agree that it would make sense to invest the effort to remove the "docs" level from the hierarchy. If there's interest in this expressed here, I can undertake to do that. However, I'll note that the Doks theme does hard-code behavior based on the presence of a docs folder, so this effort is more like creating our own theme, in terms of upfront effort and ongoing maintenance.

Thanks for this comment. I'm sympathetic to this as someone who has worked in libraries and favors backward compatibility. I'm curious to know what other thoughts there are on this issue, or what you think of the above.

tl;dr Most URLs have already changed before the Hugo migration, maybe 95%.

@normal-coder
Copy link
Contributor

原则上来说,这是绝对正确的。将所有 URL 移至文档将破坏该网站的大多数外部链接。

不过,我要指出的是,截至上周,该网站已经进行了重大内容重组,其中包括对(我认为)每个资源类别的重命名。例如,许多曾经处于“共同签名”状态的资源现在处于“签名”状态。当进行 Hugo 迁移时,大约只有 4-5 个链接具有相同的 URL(现在大约有一半的项目位于“about”下)。此 PR 中大约 20% 的链接修复实际上是内容迁移期间未更新的内部链接。

如果没有重新组织多个链接,我同意投入精力从层次结构中删除“文档”级别是有意义的。如果有人对此感兴趣,我可以承诺这样做。不过,我会注意到,Doks 主题根据文档文件夹的存在进行硬编码行为,因此就前期工作和持续维护而言,这项工作更像是创建我们自己的主题。

感谢您的评论。作为一个在图书馆工作过并支持向后兼容性的人,我对此表示同情。我很想知道关于这个问题还有什么其他想法,或者您对上述内容有何看法。

tl;dr 大多数 URL 在 Hugo 迁移之前已经发生了变化,也许 95%。

In principle, this is absolutely correct. Moving all of the URLs down to docs will break most external links to the site.

However, I'll note that the site has undergone a major content reorganization as of last week, and among those changes is the renaming of (I think) every resource category. For example, many of the resources that were once under "cosign" are now under "signing." When the Hugo migration was undertaken, only perhaps 4-5 links had the same URLs (about half of the items now under "about"). About 20% of the link fixes in this PR are actually internal links not updated during the content migration.

If more than a handful of links hadn't been reorganized, I agree that it would make sense to invest the effort to remove the "docs" level from the hierarchy. If there's interest in this expressed here, I can undertake to do that. However, I'll note that the Doks theme does hard-code behavior based on the presence of a docs folder, so this effort is more like creating our own theme, in terms of upfront effort and ongoing maintenance.

Thanks for this comment. I'm sympathetic to this as someone who has worked in libraries and favors backward compatibility. I'm curious to know what other thoughts there are on this issue, or what you think of the above.

tl;dr Most URLs have already changed before the Hugo migration, maybe 95%.

Maybe you can consider trying Slug?

@ltagliaferri
Copy link
Collaborator

@normal-coder — we addressed this in a recent info architecture change, but the extensive re-platform lost some of these files which we should bring back, I agree! I created an issue to track: #230

@smythp
Copy link
Collaborator Author

smythp commented Aug 22, 2023

Unfortunately, sections cannot be changed with front matter, and Hugo really wants the site organization to reflect folder organization.

With that said, and even though most external links will not be backwards compatible after the reorganization anyway, , I do find the inclusion of a "docs" section to be redundant for our site, which is entirely a docs site. I think I have come up with a way to do this, but it will take some more development work.

For now, I will leave this PR as-is, but it should not be merged. If I can reorganize the site to not include a superfluous "docs" on the path, I will, and will create a PR for that. If that is successful, I will revise this PR to include only those links that were broken for reasons unrelated to the inclusion of "docs" on the path.

Thanks, @normal-coder , appreciate the thoughts here.

@ltagliaferri ltagliaferri changed the title Fix all 404 links [WIP] Fix all 404 links Aug 22, 2023
@ltagliaferri
Copy link
Collaborator

I renamed with "WIP" for "work in progress" @smythp if you can change the flag when this is ready for review. Thanks!

@smythp smythp mentioned this pull request Aug 22, 2023
smythp added a commit to smythp/sigstore-docs that referenced this pull request Aug 22, 2023
Removed the docs folder and moved all content up one level

Added necessary front matter to all content files, as Doks depended on
the docs folder to determine the template used

Updated archetype with correct front matter for furture file creation

Rewrote sidebar template to use new folder structure

Resolves sigstore#231

References sigstore#229

Signed-off-by: Patrick Smyth <patrick@iotaschool.com>
ltagliaferri pushed a commit that referenced this pull request Aug 23, 2023
* Removed docs from URL path

Removed the docs folder and moved all content up one level

Added necessary front matter to all content files, as Doks depended on
the docs folder to determine the template used

Updated archetype with correct front matter for furture file creation

Rewrote sidebar template to use new folder structure

Resolves #231

References #229

Signed-off-by: Patrick Smyth <patrick@iotaschool.com>

* Changed FlexSearch params to reflect new structure

Signed-off-by: Patrick Smyth <patrick@iotaschool.com>

---------

Signed-off-by: Patrick Smyth <patrick@iotaschool.com>
Added link to Slack invite

Changed link to external Slack community

Resolves sigstore#228

Signed-off-by: Patrick Smyth <patrick@iotaschool.com>
Fixed trailing whitespace, spaces around headings and lists, consistent
lists

Updated another link to Slack

Signed-off-by: Patrick Smyth <patrick@iotaschool.com>

More markdown fixes

Signed-off-by: Patrick Smyth <patrick@iotaschool.com>

More linting

Signed-off-by: Patrick Smyth <patrick@iotaschool.com>
@smythp smythp changed the title [WIP] Fix all 404 links Fix all 404 links Aug 28, 2023
@smythp
Copy link
Collaborator Author

smythp commented Aug 28, 2023

OK, fixed the links and linted the pages I touched. In theory, there should be no current broken links on the site after this is merged.

Signed-off-by: ltagliaferri <lisa.tagliaferri@gmail.com>
@ltagliaferri ltagliaferri merged commit d3a7e25 into sigstore:main Aug 30, 2023
7 checks passed
@smythp smythp deleted the fix-links branch August 31, 2023 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix all broken links
3 participants