Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

Versioned Documentation #71

Closed
4 tasks done
froschdesign opened this issue Dec 1, 2018 · 4 comments
Closed
4 tasks done

Versioned Documentation #71

froschdesign opened this issue Dec 1, 2018 · 4 comments
Assignees
Milestone

Comments

@froschdesign
Copy link
Member

froschdesign commented Dec 1, 2018

Problem

Some component documentations already includes descriptions and pages for different component versions. This ends up in a very long sub-navigation and duplications of navigations entries.

Example

zend-expressive with 3 versions: https://docs.zendframework.com/zend-expressive

Goals for Improvement

  • add a version selector
  • only show pages of the currently selected version in the sub-navigation
  • output a notice if the currently selected version is not the latest
  • backward compatibility:
    • no changes in URLs
    • without any changes (in the MkDocs configuration), the result of the rendering must be the same as before

Suggestion

The current idea is based on an extension of the MkDocs configuration file (mkdocs.yml).

New is the extra level in pages for the version number and the section extra.

Example (excerpt)

docs_dir: docs/book
site_dir: docs/html
pages:
    - Home: index.md
    - v3:
      - "Quick Start": v3/quick-start.md
      - Hydrators:
        - "ArraySerializable": v3/hydrators/array-serializable.md
        - "ObjectProperty": v3/hydrators/object-property.md
        - "Reflection": v3/hydrators/reflection.md
        - "ClassMethods": v3/hydrators/class-methods.md
        - "Delegating": v3/hydrators/delegating.md
        - "Aggregate": v3/hydrators/aggregate.md
      - Strategies:
        - 
      - "Application Integration":
        - "Usage in a zend-mvc-based Application": v3/application-integration/zend-mvc.md
      - Migration:
        - "Migration from version 2": v3/migration.md
    - v2:
      - "Quick Start": v2/quick-start.md
      - Reference:
        - "Filters": v2/filter.md
        - 
    - "_hidden-legacy-page-links":
        - "_quick_start": quick-start.md
        - 
site_name: zend-hydrator
site_description: "Serialize objects to arrays, and vice versa"
repo_url: 'https://github.com/zendframework/zend-hydrator'
markdown_extensions:
  - markdown.extensions.codehilite:
      use_pygments: False
edit_uri: edit/master/${DOCS_DIR}/
extra:
  current_version: v3
  versions:
    - v3
    - v2

Screenshots

screenshot_2018-12-01 home - zend-hydrator
screenshot_2018-12-01 quick start - zend-hydrator

To-do

  • Update the Jinja2 templates
  • Add CSS for version selector
  • Test component with different versions
  • Test component without versions

Comments and suggestions are welcome!

@froschdesign
Copy link
Member Author

@geerteltink
Copy link
Member

Where is the PR so I can merge it now.

@weierophinney
Copy link
Member

Totally want this. 👍

@froschdesign
Copy link
Member Author

Fixed with #87

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants