Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Generate docs from specfiles #61

Merged
merged 2 commits into from
Dec 3, 2021
Merged

Generate docs from specfiles #61

merged 2 commits into from
Dec 3, 2021

Conversation

mudler
Copy link
Contributor

@mudler mudler commented Nov 30, 2021

Needs: rancher/elemental-toolkit#907
Part of: rancher/elemental-toolkit#757

This PR introduce a script which generates layout/structure to be parsed from our docs to be displayed in the website. It parses the cos-toolkit repository packages and scans for README.md files present in the package path (where build.yaml and definition.yaml reside).

If it's a collection, it still reads for README files, but allows also to generate per-package documentation by checking the presence of README-cat-name.md in the package path, if present it will create a new grouped page and put the packages of the collection under it.

In order to preserve readability on cos-toolkit side, the page header of a collection cannot be generated cleanly, so a README-head.md file is required with the specific docsy fields, e.g:

---
title: "Collection name"
linkTitle: "Collection title"
date: 2021-12-02
description: >
  Collection description
---

WIP as I'm currently moving other docs over the repo, so we have more contextual docs

@mudler mudler force-pushed the packages_docs branch 3 times, most recently from 3d23e6d to c92ed60 Compare December 2, 2021 10:30
@mudler mudler marked this pull request as ready for review December 2, 2021 10:42
Copy link
Contributor

@Itxaka Itxaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@davidcassany
Copy link
Contributor

I like the idea, nice! yes, a README file per package looks like a good a nice easy too read approach.

This PR introduce a script which generates layout/structure to be parsed
from our docs to be displayed in the website. It parses the cos-toolkit
repository packages and scans for `README.md` files present in the
package path (where `build.yaml` and `definition.yaml` reside).

If it's a collection, it still reads for README files, but allows also
to generate per-package documentation by checking the presence of
`README-cat-name.md` in the package path, if present it will create a
new grouped page and put the packages of the collection under it.

In order to preserve readability on cos-toolkit side, the page header of
a collection cannot be generated cleanly, so a `README-head.md` file is
required with the specific docsy fields, e.g:

```yaml
---
title: "Collection name"
linkTitle: "Collection title"
date: 2021-12-02
description: >
  Collection description
---
```

Needs: rancher/elemental-toolkit#907
Part of: rancher/elemental-toolkit#757

Add makefile target and hook into CI

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
@mudler mudler changed the title WIP: Generate docs from specfiles Generate docs from specfiles Dec 3, 2021
@mudler
Copy link
Contributor Author

mudler commented Dec 3, 2021

I'll follow up with PRs updating the docs, merging this

@mudler mudler merged commit d486796 into master Dec 3, 2021
@mudler mudler deleted the packages_docs branch December 3, 2021 09:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants