Giter Club home page Giter Club logo

Comments (18)

jseldess avatar jseldess commented on July 18, 2024 1

Sorry for my delay, @kuanluo. Your assessment makes sense. I'm good with the drop-down recommendation.

@benesch, what do you think we should have in the drop-down initially? Stable 1.0 and Edge, with the former pointing to https://cockroachlabs.com/docs/stable and the latter pointing to https://cockroachlabs.com/docs/edge?

from docs.

benesch avatar benesch commented on July 18, 2024

Since I didn't see an existing proposal, I figured I'd submit a strawman RFC for docs versioning here.

The downside of this approach is that nearly every commit on gh-pages in the next few weeks will need to be backported to release-1.0. I don't see a great way around that, considering we've already started landing 1.1 features to master that will need documentation but won't make it into the 1.0.x series.

/cc @bdarnell @sploiselle

from docs.

jseldess avatar jseldess commented on July 18, 2024

Your proposal looks very good to me, @benesch! Thanks for writing it up. Adding @mjibson since I've discussed basic approaches with him, too.

In terms of "backporting commits" from gh-pages to a release branch, that's what we would do for any patch releases that need to be reflected in that version's docs as well as for any doc bugs we decided need to be fixed, is that right? And how would it work exactly? It's something I haven't yet done in git.

from docs.

jseldess avatar jseldess commented on July 18, 2024

Also, just to make sure we're on the same page, my feeling is that docs versioning doesn't need to be in place for the 1.0 release date. Instead, it needs to be in place for 1.1, at the latest. @benesch, do you agree?

from docs.

maddyblue avatar maddyblue commented on July 18, 2024

Overall that proposal looks good. One change I'd make regarding the canonical links is to instead make the non-canonical versions include a noindex meta tag, which will prevent google from indexing them, but also continue to work if we delete, create, or rename pages, which would break the canonical links. Although maybe it's ok if the canonical links are broken? I'm not sure how google handles that.

from docs.

sploiselle avatar sploiselle commented on July 18, 2024

Really thoughtful and considerate sketch here. A few more considerations (questions, not answers):

  • Can we easily control backporting/moving content forward with some kind of front-matter tagging? i.e. something like "Version Support: 1.0+" or "1.0, 1.2".
  • Do we want to attempt smart redirections when visitors try to load pages that exist in other versions, but not in this one? e.g. if /docs/deprecated.html got killed in the 1.2 release, do we want to try and serve them the content we know they're looking for? Alternatively, we can keep every page that ever existed in the current repo with a link to the last version it lived in, but that feels tedious.
  • Kind of the converse of the prior point, what if you try to go to 1.0/newfeature.html, which exists only in the 1.1 and forward repos?

from docs.

benesch avatar benesch commented on July 18, 2024

@mjibson, my concern with marking old versions as noindex is that sometimes you might actually want that old version. Perhaps the old version includes a note like "you'll see error foobazle if you try to frobulate the bargoon" and you're searching for "foobazle when frobulating bargoon in cockroachdb". If those old versions aren't indexed, you're out of luck.

Re deletions/renames: I figured we could write a quick script to insert <link rel="canonical" ...> into the generated files iff a file with the same name exists in the current stable version.

@jseldess, yup! We need to have this set up when you want to publish documentation that only applies to the latest unstable version. That'll be sooner than 1.1, I think, but definitely after 1.0.

from docs.

maddyblue avatar maddyblue commented on July 18, 2024

Ok. Having a thing that can make sure the canonical links work seems fine to me.

from docs.

benesch avatar benesch commented on July 18, 2024

@sploiselle, answers inline:

  • Can we easily control backporting/moving content forward with some kind of front-matter tagging? i.e. something like "Version Support: 1.0+" or "1.0, 1.2".

Not easily, I don't think. (Perhaps someone else has a solution?) The trouble stems from small changes to existing features: e.g., when we add/remove a flag to cockroach start, there's a small section of the "Start a Node" documentation that needs to change from version to version.

  • Do we want to attempt smart redirections when visitors try to load pages that exist in other versions, but not in this one? e.g. if /docs/deprecated.html got killed in the 1.2 release, do we want to try and serve them the content we know they're looking for? Alternatively, we can keep every page that ever existed in the current repo with a link to the last version it lived in, but that feels tedious.

That's a good point! We'll be breaking bookmarks when we publish docs for a new version if we've removed/renamed pages. Should be possible to auto-generate these "feature deprecated" pages using whatever pipeline we set up for automatically generating canonical links.

  • Kind of the converse of the prior point, what if you try to go to 1.0/newfeature.html, which exists only in the 1.1 and forward repos?

I'm less worried about this case, because you'll have to manually hack the URL to end up there. We should definitely make sure the version switcher excludes pages that don't exist in that version, though.

@jseldess, to answer your question about backporting, in the easy case, it's quite simple. You essentially open the PR twice: once against the gh-pages branch and once against the release-x.x branch. Here's an example of Marc backporting a fix from master onto release-1.0.

Where it gets tricky is when you've completely rewritten a doc for the new version. Say, hypothetically, we completely rewrite the install instructions page for version 1.1. If we later decide we want to document that both 1.0 and 1.1 require macOS 10.9 and newer, you'd likely have to make the change separately on the 1.0 and 1.1 branches. When the versions have diverged significantly, Git won't be able to automatically determine where to apply the change.

from docs.

jseldess avatar jseldess commented on July 18, 2024

Thanks again for thinking this through, @benesch. I'll set up a meeting early next week for us to nail down the approach. I'll make it @sploiselle, @benesch, @mjibson, and me.

@bdarnell, @mberhault, @petermattis, let me know if you'd like to be there as well.

from docs.

kuanluo avatar kuanluo commented on July 18, 2024

@jseldess, @benesch, @mjibson, @sploiselle
Attached is the favored design for versioning:
docs-versioning-1

When you click on the button, the dropdown opens like the rest of the nav:
docs-versioning-2

from docs.

jseldess avatar jseldess commented on July 18, 2024

Thanks, @kuanluo! Looks great. I'm wondering if we're overloading the drop-down feature, though. Would you be willing to mock a hover feature as well, similar to what Django does, but in the same spot on the left?

screen shot 2017-05-30 at 6 47 28 am

from docs.

jseldess avatar jseldess commented on July 18, 2024

Most recent versioning thoughts are in Docs Versioning.

@benesch, any updates on the plan to try out the single branch with multiple subdirectories approach we discussed a few weeks ago?

@sploiselle, you mentioned being willing to map out all the edge scenarios between versions and how the site should behave. Do you want a separate issue to track that work?

from docs.

sploiselle avatar sploiselle commented on July 18, 2024

Created #1474

from docs.

kuanluo avatar kuanluo commented on July 18, 2024

@jseldess I'm not sure if Django's versioning is better for us. My thinking stemmed mostly from these two reasons:

  • Consistency: Dropdown is a known interaction on docs, and if possible, I'd like to minimize the different interactions we have, especially when we don't quite know how people will interact with this feature yet.
  • Ability to go back to much older versions of docs past 2.4. Django only allows one to go back so far. And dropdown seems to be a common behavior for versioning.

What do you think? Thanks!

from docs.

jseldess avatar jseldess commented on July 18, 2024

@benesch, the only work remaining now is #1546 (moving the sql generator to the cockroach repo), is that right? If so, I'll close this issue and focus on that other one.

from docs.

benesch avatar benesch commented on July 18, 2024

From the eng end, yep! I know @kuanluo wanted Division Of to tweak the mobile styles, though.

from docs.

jseldess avatar jseldess commented on July 18, 2024

Nice. I know DO is already working on the mobile styles.

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.