Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

Points docs to last stable release #160

Merged
merged 8 commits into from
Mar 20, 2020

Conversation

lmammino
Copy link
Member

@lmammino lmammino commented Mar 19, 2020

Closes #157

This PR changes the current behaviour to point to the latest documentation and provides some high-level refactoring of the build process code.

As discussed in #157, the new behaviour is the following:

  • latest doesn't track to master anymore, the 2 tags are now independent
  • latest will point to the most recent version that does not include annotation (as for instance -alpha.1)
  • master tracks to actual master (this is unchanged)

I created a fake v3.0.0-alpha to test these assumptions. You can see a preview in the demo below.

Please help me to test this thoroughly before we ship any change :)

DEMO: https://latest-doc-to-last-stable-release.surge.sh/

Comment on lines 72 to 83
// TODO: ----------------------------------------------------------------------- debug
.concat([
{
name: 'v3.0.0-alpha',
zipball_url: 'https://api.github.com/repos/fastify/fastify/zipball/v1.13.3'
},
{
name: 'v3.0.0-alpha.2',
zipball_url: 'https://api.github.com/repos/fastify/fastify/zipball/v1.13.3'
}
])
// TODO: ----------------------------------------------------------------------- end of debug
Copy link
Member Author

@lmammino lmammino Mar 19, 2020

Choose a reason for hiding this comment

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

Note: This is used to simulate two upcoming alpha release, it will be removed before the merge

@lmammino lmammino changed the title [WIP] Points docs to last stable release + build pipeline refactoring Points docs to last stable release Mar 19, 2020
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@lmammino lmammino self-assigned this Mar 20, 2020
Copy link
Member

@Eomm Eomm left a comment

Choose a reason for hiding this comment

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

LGTM!

Only a question:
when you switch version in a page (like decorators for ex), the user is sent to the TOC, could we maintain the path changing only the version-path-param?

@lmammino
Copy link
Member Author

Only a question:
when you switch version in a page (like decorators for ex), the user is sent to the TOC, could we maintain the path changing only the version-path-param?

In theory yes, in practice that page might not exist in another version. Not sure right now what would be a better way to handle this to be honest without having to map all the possible pages in advance.

@lmammino
Copy link
Member Author

@Eomm, actually, on a second thought, there might be a way to achieve that. The question is,
when a page does not exist in a given version, what do we do?

  • Option 1: we don't show the version itself in the dropdown
  • Option 2: we show the version but we point it to the Table of Contents for that version

Any preference @Eomm, @mcollina, @jsumners ?

@jsumners
Copy link
Member

I'd make it a follow-up PR.

@lmammino
Copy link
Member Author

@jsumners makes sense. Then I will merge this and I will create a dedicated issue to discuss this other potential improvement :)

@lmammino
Copy link
Member Author

lmammino commented Mar 20, 2020

Merged, released and open a dedicated issue (#161) for the problem raised by @Eomm.

Thanks a lot everyone for the quick turnout on this! 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

latest docs should point to the latest non-experimental release, not master
4 participants