Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: explain: pagy + retype, add contribution instructions #572

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ See also the [How To Page](https://ddnexus.github.io/pagy/docs/how-to)
- [How To (quick recipes)](https://ddnexus.github.io/pagy/docs/how-to/)
- [Changelog](https://ddnexus.github.io/pagy/changelog)
- [Deprecations](https://ddnexus.github.io/pagy/changelog#deprecations)
- [How Pagy's Docs work?](https://github.com/ddnexus/pagy/blob/master/docs/README.md)

</details>

Expand Down
24 changes: 24 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### Documentation Contributions

Documentation contributions or suggestions are welcome.

1. Download [`retype`](https://retype.com/guides/cli/)
2. `retype start` in the pagy root directory.

And your docs should appear in a browser.

#### Primer on how Pagy's Documentation works

Pagy's documentation is built on [retype](https://retype.com/).

All of [retype's configuration](https://retype.com/configuration/project/) is located in the [`retype.yml` file](https://github.com/ddnexus/pagy/blob/master/retype.yml).

Pagy uses a [github action](https://github.com/ddnexus/pagy/blob/master/.github/workflows/retype-action.yml) to trigger the build process i.e. the docs need to be "built". Why? Because the docs are written in [markdown format](https://en.wikipedia.org/wiki/Markdown) - however, markdown is not sufficient to deliver html to your browser. Retype does the hard work of converting that markdown into html with styling.

Once built, then [Github pages](https://pages.github.com/) delivers it to you. But we must tell Github to deliver the html that has been created. Where is the html located? The html - i.e. the "built" site - is located in the root directory of the [`docs-site` branch](https://github.com/ddnexus/pagy/tree/docs-site) of the Pagy repository. The admin of the repository can set the branch that is used in the settings section of the repository.

More details on the docs are available on the [retype website](https://retype.com/guides/github-actions/).

The Pagy repository is using the Open Source version, subject to certain limitations (i.e. total page count). [Pro version](https://retype.com/pro/) opens up other benefits. Credit to: [Retypeapp](https://github.com/retypeapp) and
[@geoffreymcgill](https://github.com/geoffreymcgill) and possibly others behind the scenes.

1 change: 1 addition & 0 deletions retype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ exclude:
- e2e/README.md
- test/README.md
- lib/**/README.md
- docs/README.md

edit:
repo: "https://github.com/ddnexus/pagy"
Expand Down