GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Move indexsidebar.html and switchers.js to docsbuild-scripts · Issue #90 · python/docsbuild-scripts

Move indexsidebar.html and switchers.js to docsbuild-scripts #90

New issue
Copy link
New issue
Copy link
Closed
#91
Closed
Move indexsidebar.html and switchers.js to docsbuild-scripts#90
#91
Copy link

Description

@JulienPalard
JulienPalard
opened on Jun 4, 2020
Issue body actions

The idea is that the cpython Doc/ repository should just care about building the documentation, not linking to other builds and languages from docs.python.org.

Building multiple versions, multiple languages, and linking them together is the role of docsbuild-scripts.

This would also avoid the need to update switchers.js and indexsidebar.html on every cpython branch for every new cpython release and every new language.

What would need to change:

  • Drop switchers=1 from cpython/Doc/Makefile
  • Drop if switchers block in cpython/tools/templates/layout.html. it already has an alternative. Add an id to the <li> so it can be easily found by the new switchers.js as the placeholders are dropped.
  • Move switchers.js to docsbuild-scripts and make it use the <li> new id instead of placeholders if they are not found, and maybe fallback to find the place from other ways so it can work on old branches without commiting to them.
  • Write a generic "indexsidebar.html" for local builds, to be commited in cpython, and move the "cross-linked" version of indexsidebar in docsbuild-scripts.
  • Move {% trans %} tags in dummy.html so they can still be translated even if versionned in docsbuild-scripts (it's the only remaining part in cpython, hope it won't change too often).

We then need a clean way for docsbuild-scripts to edit the HTML to make it load switchers.js.

Reacted by Zachary Ware and Ned Deily

Activity

  1. ned-deily commented on Jun 5, 2020

    @ned-deily
    ned-deily
    on Jun 5, 2020
    Member
    More actions

    I like this idea a lot.

    I'm not sure what you are suggesting replacing the index sidebar with
    for the standalone build. But perhaps rather than the current links to
    and status of recent branches, it could have a few generic links to
    the docs on the website, something like:

    stable -> https://docs.python.org/
    in development -> https://docs.python.org/dev/
    all versions -> https://www.python.org/doc/versions/
    more resources -> https://www.python.org/doc/

  2. JulienPalard
    changed the title [-][idea] Move indexsidebar.html and switchers.js to docsbuild-scripts[/-] [+]Move indexsidebar.html and switchers.js to docsbuild-scripts[/+] on Jun 6, 2020
  3. JulienPalard commented on Jun 6, 2020

    @JulienPalard
    JulienPalard
    on Jun 6, 2020
    MemberAuthor
    More actions

    It's in production now.

    Still to do:

    • Review https://www.python.org/dev/peps/pep-0101/ to remove steps like Doc/tools/static/switchers.js must be updated.
    • Clean the master branch to remove everything about switchers and add @ned-deily proposed links to the sidebar instead of hardcoded links to other versions
    • Add translations (trans tags from docsbuild-scripts) to the Doc/tools/templates/dummy.html, so they get catched by translation teams.
    Reacted by Ned Deily and Maciej Olko
  4. JulienPalard
    closed this as completedin #91on Jun 18, 2020
  5. JulienPalard
    reopened this on Jun 18, 2020
  6. JulienPalard commented on Nov 17, 2020

    @JulienPalard
    JulienPalard
    on Nov 17, 2020
    MemberAuthor
    More actions

    Done.

  7. JulienPalard
    closed this as completedon Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.