Repository navigation
Docs site: Training section generated from the training folder - #50
Merged
Merged
Conversation
scripts/docs/build_training_site.py writes the section into website/generated/training/ (gitignored) at every site build, and a new `training` docs instance serves it at /training/. The series README is the index; each session README is the session overview, without the Roles and Definition of ready sections. Each notebook is a page with its committed outputs, an Open in Colab button, and a link to the file on GitHub; Colab section links and links between notebooks resolve to the site pages. Inline scripts are removed from outputs, and their styles go to one generated stylesheet, because the HTML minifier rewrites inline style text and breaks hydration. A client module fills the detail panel of verified chat answers on hover. The navbar has a Training item, and site search covers the section. The notebook titles in both README tables link to the notebook files. Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
…r each session training/preface.md describes why the series exists, what statisticians, researchers, managers, and developers each take from it, the three levels of engagement (reading, running without a key, running live or on new documents), and what each notebook of session 01 adds. The series README links to it, and the site generator places it after the Training index. Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
… notebook The preface moves from the series to session 01 and is rewritten from the session's content. It describes the kind of application the session builds, what researchers, people who manage documents and data, people who commission or oversee applications, and developers take from it, the three levels of engagement, and why each notebook is part of the session. The session README links to it, and the site shows it first in the session's sidebar. Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
…of the session The preface now sets out the problem of fluent answers without evidence, the application around the model, three ideas (grounding, the structure of failure, and the separation of writing from checking), the readers by background and technical level, and the place of each notebook in the argument. Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
…face Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
…horter sections Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
… 01 next steps Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
…session names in the sidebar Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
…ources found by file Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
…llection page replaces Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
…ects for moved pages Signed-off-by: Aivin Solatorio <avsolatorio@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds a Training section to the docs site at
/training/. The section is generated from thetraining/folder at every site build, and the folder stays the source. It also adds an authoring guide for later sessions, and the generator checks a session folder against that guide.What the section contains
slides/canva.json.How it is built
scripts/docs/build_training_site.pywrites the pages intowebsite/generated/training/, which is gitignored.npm run convert-notebooksruns it, so the GitHub Pages workflow picks it up without changes.trainingdocs instance serves the folder with an autogenerated sidebar. The navbar has a Training item, and site search covers the section.resources/becomes a page. The pages follow the order of the links inresources/README.md, and a file's name is its page's URL.assets/documents/has aroles.json. The page uses aDocumentViewerReact component that follows the site theme.#scrollTo=section-N) become heading anchors, including links between notebooks.Authoring guide and checks
training/AUTHORING.mddescribes the folder layout, file names, and title formats of a session and the page that each file becomes. It also covers the formats ofcanva.jsonandroles.json, the writing rules for prefaces and notebooks, and a checklist before a pull request. The "Adding a session" section of the series README links to it.#scrollTolinks to missing cells, Colab links to missing files, pages without a title, a Canva link that is not a public view link, and documents missing fromroles.jsonor missing required front matter.--strictturns the warnings into an error. Session 01 passes with no warnings, and a test folder with fifteen planted problems produced fifteen warnings.Redirects and published routes
website/published-routes.txtlists every page route the site has published. It was seeded from a build ofmain, which is the live site, and extended with the routes of this branch.website/redirects.jsonmaps old routes to new ones. A plugin,website/plugins/published-routes.mjs, writes a redirect page at each old route after the build. The redirect keeps the query string and the#anchor.published-routes.txtis a warning locally and an error in CI.npm run routes:updateadds the routes of the last build.main.website/README.md, under "Changing or removing a page", and the training authoring guide refers to it./training/session-01/documents.html. With it, the old address opens the Document collection page on a static server, and the#coffeeanchor selects the same document.Source changes
resources/evaluation-examples.mdis renamedtesting-on-fixed-questions.mdto match its title and page URL.build_training_pages.pytoassets/documents/roles.json.documents.htmlpage is removed. The Document collection page replaces it, and the old address redirects there.Checks
npm run buildpasses with no broken links and no broken anchors in the section. The only anchor warnings are the existing ones for the Hub items in the navbar.scripts/docs/check_cookbooks.pyreports no errors.