Skip to content

switch off of jekyll #1716

@benesch

Description

@benesch

It's become increasingly clear to me that we're at the limits of what Jekyll can handle for a documentation website. These are the big problems in my mind:

  • Cross-references are based on page names and section headers. Changing a page name or a section header will break every internal link that points at that page or section. We luckily use HTMLProofer to detect this breakage, but every HTMLProofer run takes about ~10m, so hunting down broken links requires a long feedback cycle.

  • No support for book-like hierarchy, with chapters, sections, and subsections. I think @knz in particular would give anything for this layout (Proposal for a new sidebar organisation for sql docs. #1021).

  • No PDF output (Generate PDF docs #1484).

  • No plain text output (Investigate options to output plain text #1717)

  • Inconvenient interleaving of content and style. It's very confusing but also dangerous for maintainability to have HTML and CSS inline with the documentation text. This also contributes to the two problems immediately above.

  • Markdown is poorly-specified. Switching Markdown processors caused all sorts of unnecessary breakage because Markdown doesn't have a formal grammar to e.g. clarify when to indent a paragraph beneath a list or how many |s you need to start a table.

  • Slow compiles. The current site takes 8s to generate, and every new version will add about 4s to the build time. jekyll serve --incremental knocks that down to ~.2s, but only works in simple cases where you change e.g. foo.md and want to see foo.html. If you change a base layout, included file, or sidebar data, Jekyll will have to do a full rebuild, taking another 8s, if it even realizes that.

  • Unable to provide code examples with syntax highlighting inside a table. No multiple paragraphs.

  • Unable to display math equations (will be necessary once we start documenting resource costs)

Here's my proposal: use Sphinx. It neatly solves all my grievances. In order:

  • Supports proper cross-references that are independent of the page and section titles.

  • Understands hierarchy.

  • Can generate PDFs.

  • Supports inline math equations, inline block diagrams

  • Supports arbitrary markup inside table cells

  • Supports the definition of arbitrary new markup syntax that can be mapped to HTML/CSS using an external transformation.

  • Also supports a well-specified markup language called reStructured Text. (Sphinx actually supports multiple markup languages including markdown, AFAIK)

  • Compiles reasonably fast. The Python docs tree, which is much, much larger than ours (though not for long, I hope!), takes 2m to generate—but only the first time. After that, Sphinx is able to do an incremental build in ~7s, which includes properly regenerating dependent pages, like indices, and not just the one page that changed.

Changing our documentation generator would obviously have a massive impact on @jseldess, @sploiselle, and @Amruta-Ranade, and I don't mean to step on any toes! Just wanted to get a discussion started somewhere more permanent than Slack. I know Sphinx has been mentioned several times in passing, but I wanted to formalize the arguments for it.

The biggest downsides I see of a Sphinx transition:

  • Actually doing the transition. Oof. This smells like a post-1.2 project at best.

  • Disrupting everyone's workflow. rST, in particular, is a bit of a special snowflake. It's great once you know it, but it doesn't have the nearly non-existent learning curve that Markdown has.

FWIW, now that I've written all this up, I'm 👎 on switching to Hugo. Of the grievances above, I think it only fixes the slow compiles.

/cc @bdarnell @mjibson @knz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions