Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New documentation site #914

Merged
merged 54 commits into from
Feb 8, 2023
Merged

New documentation site #914

merged 54 commits into from
Feb 8, 2023

Conversation

tillprochaska
Copy link
Contributor

@tillprochaska tillprochaska commented Nov 25, 2022

This adds a new documentation site for FollowTheMoney. The site now consists of three separate sections:

Some of the features include:

  • We now have auto-generated pages for every FtM schema and property type (example). These pages include schema/type descriptions, property listings, the first version that included the schema, …

  • RDF XML specs and Python API documentation are generated automatically in GitHub Actions.

  • You can reference schemata, property types and Python classes in Markdown and they will be turned into links automatically:

    `schema:Company`
    `type:identifier`
    `class:followthemoney.proxy.EntityProxy`
  • Search using Algolia DocSearch. I have slightly customized the crawler to work well for out content structure. Includes a full index of all schemata, types, and properties.

A few aspects of this migration I’d appreciate feedback on:

  • I’ve used pdoc to generate Python API docs. Currently, we use Sphinx. I don’t really have any personal preference, pdoc was just easier to set up (requires no configuration). Anyone strong opinions on this? Alternatively, I could setup Sphinx to generate the API docs (but no static documentation pages)

  • We previously used a Sphinx plugin to generated a CLI reference for ftm. Pdoc doesn’t support that, and I’ve taken the easy path and have simply pasted the output of ftm --help here.

  • Instead of embedding the Python API reference directly on relevant pages, I’ve simply linked out to them (example.

  • I was thinking of adding search via Algolia at a later point. This does however require the site to be already online.

  • The site is deployed to GitHub Pages. Only changes on the main branch are deployed, there are no PR previews. This is a downside of GitHub Pages, but it simplifies the setup and allows us to reuse the deployment setup we use for other projects at OCCRP.

To do:

  • Generate and deploy API docs (at least for the Python lib)
  • Remove pre-release @alephdata/followthemoney version once Add property type descriptions to JSON model #913 is merged and released
  • Do not use defaultModel exported by the npm package, but import defaultModel.json from the source directly. Otherwise, the docs would always be outdated by one version.
  • Add explanations for featured, required props
  • Link to YAML schema source
  • Add required property indicator to property listings
  • Include abstract, generated, edge, temporalExtent on schema pages
  • Include matchable, pivot, group on property type pages
  • Show hidden in property listings

To do before merging:

  • Change branch in options.json to main
  • Change deploy condition in Actions workflow (only deploy on push to master)
  • Delete existing docs directory and rename site to docs?
  • Update Makefile (remove namespace target, XML is now built in CI)
  • Figure out if the Read the docs subdomain can be redirected?

@tillprochaska tillprochaska temporarily deployed to github-pages November 25, 2022 13:01 Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages November 25, 2022 18:08 Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages November 30, 2022 09:00 Inactive
@tillprochaska tillprochaska force-pushed the website-astro branch 2 times, most recently from 59b0ab5 to 47c855e Compare November 30, 2022 16:38
@tillprochaska tillprochaska temporarily deployed to github-pages November 30, 2022 17:53 Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages November 30, 2022 18:08 Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages December 6, 2022 17:21 Inactive
@tillprochaska tillprochaska force-pushed the website-astro branch 2 times, most recently from a60c80b to 178d6f4 Compare December 9, 2022 18:23
@tillprochaska tillprochaska temporarily deployed to github-pages December 9, 2022 18:25 — with GitHub Actions Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages December 15, 2022 14:49 — with GitHub Actions Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages December 15, 2022 14:57 — with GitHub Actions Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages December 19, 2022 17:01 — with GitHub Actions Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages December 19, 2022 17:22 — with GitHub Actions Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages December 19, 2022 17:30 — with GitHub Actions Inactive
@tillprochaska tillprochaska force-pushed the website-astro branch 3 times, most recently from 4171cc1 to bd5adcd Compare December 19, 2022 17:52
@tillprochaska tillprochaska temporarily deployed to github-pages December 19, 2022 17:53 — with GitHub Actions Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages December 19, 2022 17:59 — with GitHub Actions Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages December 19, 2022 18:04 — with GitHub Actions Inactive
Visitors are more likely to look up schema docs than property type documentation.
Enabling search includes an inline script with a URL template that fails the links checker. The easy "fix" for now is to simply disable search.
Otherwise, the documentation would be built using a potentially outdated version of the default model.
Prettier formats prose content within JSX elements weirdly.
Searching for "edge" for example would lead to a lot of irrelevant results from the "Semantics" section on schema pages.
@tillprochaska tillprochaska temporarily deployed to github-pages January 4, 2023 20:44 — with GitHub Actions Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages January 4, 2023 20:55 — with GitHub Actions Inactive
@tillprochaska tillprochaska temporarily deployed to github-pages January 4, 2023 21:02 — with GitHub Actions Inactive
@pudo pudo marked this pull request as ready for review February 8, 2023 15:10
@pudo pudo merged commit 9d3fb3c into main Feb 8, 2023
@pudo pudo deleted the website-astro branch February 8, 2023 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants