Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-297

Allow linking to sub-headings in the documentation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.7.0
    • 0.7.0
    • None
    • None

    Description

      Some of the documentation pages are quite long, so for cross-references in the docs, it's useful to be able to link to sub-headings within a page. Jekyll/Redcarpet supports this with the "with_toc_data" option, which we have enabled.

      However, different versions of the Redcarpet gem treat that option differently. The latest version generates an ID based on the text of the heading, for example:

      <h4 id="log4j-configuration">Log4j configuration</h4>
      

      whereas older versions generate an ID which is numbered sequentially within the page:

      <h4 id="toc_0">Log4j configuration</h4>
      

      The new behaviour is probably preferable, as it's less susceptible to being broken if documentation sections are added or reordered. However, this means that we have to ensure that all committers who build the website are using the latest version of the gems.

      The standard way of enforcing version constraints and dependencies for Ruby gems is Bundler. I propose adding a bundler Gemfile to the docs directory, which would make that pretty easy.

      Attachments

        1. SAMZA-297.4.patch
          6 kB
          Martin Kleppmann
        2. SAMZA-297.3.patch
          6 kB
          Martin Kleppmann
        3. SAMZA-297.1.patch
          4 kB
          Martin Kleppmann

        Activity

          People

            martinkl Martin Kleppmann
            martinkl Martin Kleppmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: