Skip to content

feat: support versioned docs#639

Merged
arkodg merged 4 commits intoenvoyproxy:mainfrom
Xunzhuo:feat-versioned-docs
Nov 3, 2022
Merged

feat: support versioned docs#639
arkodg merged 4 commits intoenvoyproxy:mainfrom
Xunzhuo:feat-versioned-docs

Conversation

@Xunzhuo
Copy link
Copy Markdown
Member

@Xunzhuo Xunzhuo commented Oct 21, 2022

Resolves: #632

Take this as an example: https://gateway.merbridge.cn


We can access the current release version of EG by https://gateway.merbridge.cn.

And we can access the latest version of EG by https://gateway.merbridge.cn/latest.

Or by clicking the latest docs at the footer of the pages, which redirects to the /latest pages of the site:

image

We can come back to the current release version of EG by clicking the index title, which redirects to the root page of the site:

image

Checkout the quickstart guides in two different versions:

Signed-off-by: bitliu bitliu@tencent.com

@Xunzhuo Xunzhuo force-pushed the feat-versioned-docs branch 4 times, most recently from 93e0dff to 69e7caf Compare October 22, 2022 06:00
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 22, 2022

Codecov Report

Merging #639 (ba97a35) into main (592863a) will decrease coverage by 0.10%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #639      +/-   ##
==========================================
- Coverage   62.82%   62.72%   -0.11%     
==========================================
  Files          47       47              
  Lines        5762     5762              
==========================================
- Hits         3620     3614       -6     
- Misses       1912     1917       +5     
- Partials      230      231       +1     
Impacted Files Coverage Δ
internal/provider/kubernetes/gatewayclass.go 73.91% <0.00%> (-1.45%) ⬇️
internal/provider/kubernetes/gateway.go 51.38% <0.00%> (-0.86%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Xunzhuo Xunzhuo force-pushed the feat-versioned-docs branch 8 times, most recently from 6cd7f7e to 9352bd1 Compare October 22, 2022 08:18
@Xunzhuo Xunzhuo force-pushed the feat-versioned-docs branch 2 times, most recently from 8746d06 to 0614ccd Compare October 22, 2022 08:46
@Xunzhuo Xunzhuo mentioned this pull request Oct 22, 2022
@Xunzhuo Xunzhuo marked this pull request as ready for review October 22, 2022 08:48
@Xunzhuo Xunzhuo requested a review from a team as a code owner October 22, 2022 08:48
@phlax
Copy link
Copy Markdown
Member

phlax commented Oct 22, 2022

slightly related to this - one problem we had with Envoy docs was that changelogs contained links to content that no longer existed - breaking sphinx in different ways or causing links to be updated to approximately related content

we resolved this by using intersphinx so that all the links in the changelogs are versioned and can point to the docs version where the change occurred.

its a bit of work to setup/maintain but it resolves the problem - not sure if you will have changelogs in docs - but if you will, its probably worth thinking about

@Xunzhuo
Copy link
Copy Markdown
Member Author

Xunzhuo commented Oct 22, 2022

Thanks for the comments and suggestions @phlax! I think at least for now, we did not meet such issues, and this PR is to init the versioned docs, which we do not support yet. I think maybe we can make it work at first, and optimize it later if we meet issues like you pointed.

@danehans
Copy link
Copy Markdown
Contributor

@phlax #639 (comment) should not be an issue since we use GitHub-generated changelogs and have release-specific release notes. See the v0.2 release announcement as an example.

@Xunzhuo Xunzhuo force-pushed the feat-versioned-docs branch 4 times, most recently from 08a93e9 to ba97a35 Compare October 29, 2022 08:44
@Xunzhuo Xunzhuo requested a review from arkodg October 29, 2022 10:15
docs/index.html Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this generated or will someone need to update this as well as the VERSION file value during every release ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VERSION is generated too, so I think maybe we can generate this file too. Or we can just point to the latest not the current release

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just take this approach to update this value?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be docs/html to support versioned docs. Otherwise, code 404, message File not found when trying to access a versioned doc.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I forgot to update this, Will be updated later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Test locally and works fine.

@danehans
Copy link
Copy Markdown
Contributor

This PR versions all the docs. Do all docs need to be versioned or just the user docs? THoughts @LukeShu @arkodg @Xunzhuo @skriss @AliceProxy @youngnick

@Xunzhuo
Copy link
Copy Markdown
Member Author

Xunzhuo commented Oct 31, 2022

This PR versions all the docs. Do all docs need to be versioned or just the user docs? THoughts @LukeShu @arkodg @Xunzhuo @skriss @AliceProxy @youngnick

IMO, we miss something like envoy-website and envoy-mobile site, they have the homepages separated with the docs, the homepage contains things which do not need to be versioned like blogs, announcements and etc. As for the the sphinx docs, they are all versioned.

So contents in sphinx docs would be better to be all versioned, we can just add our homepage support after this.

image

Take what istio has as an example:
non-versioned:

  1. Blogs
  2. Announcements
  3. Get involved
  4. About
  5. Introduction
  6. Case studies
  7. FAQ
  8. ....

versioned: Documents.

This PR is already big enough, I can work on the non-versioned Homepages later, and finished in v0.3.0-rc1.

Copy link
Copy Markdown
Contributor

@danehans danehans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I run make docs-release TAG=v0.3.0 and see the v0.3.0 docs content is generated:

$ cat VERSION
v0.3.0

$ ls -al docs
total 8
...
drwxr-xr-x  17 daneyonhansen  staff   544 Nov  1 08:23 latest
drwxr-xr-x  17 daneyonhansen  staff   544 Nov  1 08:23 v0.2.0
drwxr-xr-x  17 daneyonhansen  staff   544 Nov  1 08:24 v0.3.0

However, the docs still default to v0.2.0 when I run locally.

docs/index.html Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just take this approach to update this value?

@Xunzhuo
Copy link
Copy Markdown
Member Author

Xunzhuo commented Nov 1, 2022

I run make docs-release TAG=v0.3.0 and see the v0.3.0 docs content is generated:
However, the docs still default to v0.2.0 when I run locally.

Thanks @danehans, right, we need to update the redirect index.html too. I will update this ASAP.

@danehans
Copy link
Copy Markdown
Contributor

danehans commented Nov 1, 2022

@Xunzhuo can you rebase and include #665 in this PR?

Signed-off-by: bitliu <bitliu@tencent.com>
Signed-off-by: bitliu <bitliu@tencent.com>
Signed-off-by: bitliu <bitliu@tencent.com>
@Xunzhuo Xunzhuo force-pushed the feat-versioned-docs branch from 285bdae to 32d9c4a Compare November 2, 2022 02:56
Signed-off-by: bitliu <bitliu@tencent.com>
@Xunzhuo Xunzhuo force-pushed the feat-versioned-docs branch from b066b5a to 401c8e2 Compare November 2, 2022 03:32
@Xunzhuo Xunzhuo requested review from arkodg and danehans November 2, 2022 03:32
@arkodg arkodg merged commit 10eb279 into envoyproxy:main Nov 3, 2022
@Xunzhuo Xunzhuo deleted the feat-versioned-docs branch November 11, 2022 07:13
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.

Support Versioned Docs

5 participants