containernetworking / cni.dev

CNI website
https://cni.dev
Apache License 2.0
48 stars 55 forks source link

Change version scheme #80

Closed nate-double-u closed 3 years ago

nate-double-u commented 3 years ago

Changing from a URL based to a folder based versioning scheme.

Contributes to: https://github.com/containernetworking/cni.dev/issues/76

nate-double-u commented 3 years ago

Deploy previews: https://deploy-preview-80--cni.netlify.app/ https://deploy-preview-80--cni.netlify.app/docs/ https://deploy-preview-80--cni.netlify.app/plugins/current/ https://deploy-preview-80--cni.netlify.app/plugins/v0.9/ https://deploy-preview-80--cni.netlify.app/plugins/v0.8/

nate-double-u commented 3 years ago

WIP

nate-double-u commented 3 years ago

Redirect doesn't seem to work on the deploy preview, but the redirect rules check passed, and I tested it locally with the netlify cli, so it should work--if it doesn't we can open a new issue.

edit: this is referring to the plugins/ root dir (https://deploy-preview-80--cni.netlify.app/plugins/), the intention is that no one should be able to land on this page.

nate-double-u commented 3 years ago

I removed the link checking system as this way of versioning can lead to broken links automatically -- if for example a file is moved or removed between versions.

The link checking system wasn't ideal as is either, as it was a netlify plugin that not everyone would be able to access.

squeed commented 3 years ago

He @nate-double-u - this looks awesome, thanks for looking in to this!

Do we want have folders for just major and minor? Do we care about docs diffs between v0.8.7 and v0.8.6, for example?

nate-double-u commented 3 years ago

Do we want have folders for just major and minor? Do we care about docs diffs between v0.8.7 and v0.8.6, for example?

That's an easy change to make now. I tend to err on the side of keeping existing information, but moving forward the team should have a discussion about which and how many versions of the documentation should be supported.

nate-double-u commented 3 years ago

The last force-push updates the README file to remove versioning instructions.

nate-double-u commented 3 years ago

Converted back to draft because I think:

nate-double-u commented 3 years ago

I've added a new link checker in the make file: make check-links

I've altered the Versions dropdown menu in the plugins section. Normally it will link to the current file in the other version, but now if that file doesn't exist in the other version, it links to the top level of that version.

Example: https://deploy-preview-80--cni.netlify.app/plugins/current/main/win-overlay/ only exists from v0.8 and up, so the v0.6 and v0.7 entries in the menu link to the version index.

nate-double-u commented 3 years ago

@squeed If you're happy with this as is, I can merge it in. Or if you'd like, I can make the change to make the folders just major and minor.

nate-double-u commented 3 years ago

Last force-push updates the deprecation warning with the same style of code for linking to the version top level if the file has been removed between versions.

nate-double-u commented 3 years ago

Last force-push corrects the regex used.

squeed commented 3 years ago

Hey @nate-double-u (sorry for the delay!) - how much bother would it be to get rid of the last version component? If it's not to bad, we'd like to do that (so just have v0.8, v0.9, etc.)

This looks great, by the way - I think it's totally the right structure.

nate-double-u commented 3 years ago

how much bother would it be to get rid of the last version component?

Not much!

Last force-push updates to 2-digit version numbers. I've also updated links in previous comments so the deploy previews work as they should for review.

squeed commented 3 years ago

Looks awesome to me - anyone else want to review?

nate-double-u commented 3 years ago

Looks awesome to me - anyone else want to review?

I'd like to propose a lazy consensus here. If no one objects or comments by 5:00 PM PST on Friday, March 19, 2021 I'll go ahead and merge this in and start the process of dismantling the existing versioning system in favour of this one (this means taking down the old version sites we set up in Netlify).

/cc @bboreham, @dcbw, @mccv1r0