Skip to content

Documentation overhaul #1694

Closed
Closed
@Conengmo

Description

@Conengmo

I'm preparing a documentation overhaul.

First some issues I see with our current documentation:

  • Very limited usage guides, mostly API reference.
  • Reliance on example notebooks:
    • In which features are not easily discoverable. A user has to browse them by file name.
    • Hosted on nbviewer.org, not integrated in our documentation.
  • I don't like the theme:
    • In the API reference it looks like a wall of text without clear breaks between classes.
    • The font is small, the look and feel is outdated.
    • The content guide on the right side is not easy to use.
  • A lot of user questions are answered in the Github Issues. That means a user has to search to our issues to find answers to questions that are not in the documentation.

Improvements

  • Use a modern theme.
  • Well structured, easy to navigate.
  • Add a comprehensive usage guide.
  • Include more advanced examples in the documentation, without having to go to nbviewer.org.
  • Include answers to questions asked in Issues, keep updating that.

Documentation parts

  • Getting started. Installation, first example.
  • Usage guide. This is the most high-level, aims to show users all the core features and plugins folium has.
  • Advanced examples. Longer code snippets that show more advanced usage, like overwriting stuff or injecting custom JS.
  • API reference.
  • Ecosystem. Other packages that use folium. Move this part from the readme.
  • Changelog. Render from CHANGES.txt.

Inspiration:

Non-goals

  • Make the documentation versioned.
  • Include Jupyter Lite. I think it's very interesting technology, but:
    • First I'd like to focus on making great basic documentation.
    • It's still in beta.
    • Let's see how others adopt it first.

Approach

Theme

I propose using the WriteTheDocs theme: https://www.writethedocs.org/guide/tools/sphinx-themes/#read-the-docs-theme. I think it looks good. We can pull the repo, not having to include it ourselves.

Code

I've looked into this a little bit: https://docs.readthedocs.io/en/stable/guides/jupyter.html#using-notebooks-in-other-formats

I'm thinking to use MyST Markdown in our documentation. This works well for version control. And Sphinx can automatically execute it and include html output in our docs. I tested that and it works great.

During this project I'll use Jupytext to convert our existing notebooks to MyST Markdown. For example jupytext --to md:myst Quickstart.ipynb.

Existing example notebooks

Technically, these can be deprecated afterwards. The problem is that they have a lot of incoming links. So I suggest we keep them so we don't break stuff for incoming users. But in each one include a link to our proper documentation.

Automated notebook tests

Currently we run Selenium tests on our example notebooks, checking whether they run without issue. I would like to do something similar on the code we include in our documentation. Since the documentation should touch most, if not all of our code, it's a great place to test to avoid regressions.

We can use Jupytext to convert the Myst Markdown to a regular notebook, then use our existing pipeline.

Comments?

Let me know if you have ideas or comments!

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationDocumentation about a certain topic should be added

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions