python / python/docs-community
Enhancing the switchers setup
まだ誰も着手していません。
- 主要言語
- Makefile
- スター
- 55
- フォーク
- 26
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Currently the contributions to python-docs-theme are made hard because of the language and version switchers.
I made review a bit easier by adding a github action to build the doc and provide it as a built artifact, so reviewers can just download and test locally.
But still the enhancement of the doc is made hard, for example https://github.com/python/python-docs-theme/pull/46 has been slowed down because of this (sry @obulat).
Solution 1
I once had an idea to enhance the situation: we could provide an "API" on the form of a simple .js file at the root of docs.python.org listing the available versions and languages.
pros:
- It removes the switchers ugly hack in docsbuild-scripts.
- It make the theme easy to test locally: just drop a versions.js at the root with some sample data.
- A project using our theme with no need for switchers will not use a
version.jsfile and have no switchers. - A project using our theme with the need for switchers could set them up easily (add a
version.jsfile).
cons:
- This is already the case, but we should be aware of the SEO penality that we could have if we redrow the page after load to render the switchers.
- The impementation will probably be tied to our specific hiearchy:
/{LANG}/{VERSION}/with the language being optional, defaulting toenglish. - It may not follow the current state of the art of doing this, as I did not reviewd how other themes do this, how readthedocs does it, how for example https://docs.djangoproject.com/en/3.1/ does it.
Other ideas, and feedback welcome.
cc @pradyunsg @obulat
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提案されているルートレベルの versions.js API と、issue で参照されている docsbuild-scripts build_docs.py の switcher コードから始め、リンク先のアプローチと既存の GitHub Action artifact workflow を比較します。Done は、方針が決定されローカルでテスト可能な switcher セットアップであるべきですが、issue では具体的な実装や受け入れ基準を定義していません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- github-actions, javascript, python
- 領域
- documentation, tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100