-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alan Freitas
committed
Dec 22, 2020
1 parent
10a95b9
commit 55f6caa
Showing
18 changed files
with
247 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
nav: | ||
- Introduction: index.md | ||
- Guidelines: guidelines.md | ||
- Contributors: contributors.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
layout: default | ||
title: Hiding sections | ||
nav_order: 2 | ||
has_children: false | ||
parent: Options | ||
has_toc: false | ||
--- | ||
# Hiding sections | ||
|
||
Use the comments `<!-- START mdsplit-ignore -->` and `<!-- END mdsplit-ignore -->` to ignore sections from | ||
your `README.md`. For instance: | ||
|
||
=== "Markdown" | ||
|
||
```md | ||
<!-- START mdsplit-ignore --> | ||
# Section to ignore | ||
|
||
`mdsplit` will remove this whole section from your documentation. | ||
|
||
<!-- END mdsplit-ignore --> | ||
``` | ||
|
||
or | ||
|
||
=== "Markdown" | ||
|
||
```md | ||
# Section to ignore | ||
|
||
<!-- START mdsplit-ignore --> | ||
`mdsplit` will remove this paragraph from your documentation. | ||
<!-- END mdsplit-ignore --> | ||
``` | ||
|
||
If you ignore the complete section, `mdsplit` will create no file for that section. | ||
|
||
If you're reading this from [`README.md`](https://github.com/alandefreitas/mdsplit/blob/master/README.md) you will see this section has a subsection that will be completely | ||
ignored in the documentation. | ||
|
||
|
||
|
||
|
||
<!-- Generated with mdsplit: https://github.com/alandefreitas/mdsplit --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
layout: default | ||
title: Quick Start | ||
nav_order: 2 | ||
has_children: false | ||
has_toc: false | ||
--- | ||
# Quick Start | ||
|
||
Go to your repository settings and turn on GitHub Pages on the branch gh-pages. | ||
|
||
![Turn on GitHub Pages](images/turonpages.png) | ||
|
||
Copy the [`mkdocs.yml`](https://github.com/alandefreitas/mdsplit/blob/master/mkdocs.yml) file to your repository: | ||
|
||
??? info "See contents" | ||
|
||
=== "mkdocs.yml" | ||
|
||
```yaml hl_lines="1 2 3 4 6 30" | ||
--8<-- "mkdocs.yml" | ||
``` | ||
|
||
Copy the [`.github/workflows/docs.yml`](https://github.com/alandefreitas/mdsplit/blob/master/mkdocs.yml) file to your repository: | ||
|
||
??? info "See contents" | ||
|
||
=== "docs.yml" | ||
|
||
```yaml hl_lines="21 22 31-44 48" | ||
--8<-- ".github/workflows/docs.yml" | ||
``` | ||
|
||
In a few seconds, your README.md file will become a beautiful documentation. | ||
|
||
|
||
|
||
<!-- Generated with mdsplit: https://github.com/alandefreitas/mdsplit --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
nav: | ||
- Splitting Locally: splitting-locally.md | ||
- Testing Locally: testing-locally.md | ||
- Github Actions: github-actions.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
layout: default | ||
title: Github Actions | ||
nav_order: 3 | ||
has_children: false | ||
parent: Step-by-Step | ||
has_toc: false | ||
--- | ||
# Github Actions | ||
|
||
You can integrate `mdsplit` with GitHub actions to regenerate the documentation whenever you change your `README.md` | ||
file. | ||
|
||
Use this workflow to get started: | ||
|
||
=== ".github/workflows/docs.yml" | ||
|
||
```yaml hl_lines="21 22 31-44 48" | ||
--8<-- ".github/workflows/docs.yml" | ||
``` | ||
|
||
Replace the settings with your repository information. | ||
|
||
Most steps in this workflow are optional: | ||
|
||
* The step `technote-space/toc-generator@v2` creates a table of contents for your README.md file | ||
* The second step downloads and builds the master version of mdsplit. This is the version we use in this repository, but | ||
you probably want to use a more stable version in your own repository. To do that, comment this step and use the third | ||
and forth steps instead. | ||
* The third and fourth steps (commented out) download the latest release version of mdsplit. That's probably what you | ||
want for your repository. Uncomment these steps to do that. | ||
* The next steps are pushing the docs to your master branch. Make any adjustments you might need. | ||
* The last steps are taking the docs from your master branch and publishing them to your gh-pages branch. | ||
|
||
|
||
|
||
<!-- Generated with mdsplit: https://github.com/alandefreitas/mdsplit --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
layout: default | ||
title: Splitting Locally | ||
nav_order: 1 | ||
has_children: false | ||
parent: Step-by-Step | ||
has_toc: false | ||
--- | ||
# Splitting Locally | ||
|
||
After [installing](../installing/binaries.md) `mdsplit`, run | ||
|
||
```bash | ||
mdsplit -r username/repository | ||
``` | ||
|
||
from your project root directory to generate your documentation. | ||
|
||
`mdsplit` will split your `README.md` file into smaller files and save the results to the `docs` directory. | ||
|
||
!!! note This is directory from where mkdocs will later build your documentation. | ||
|
||
|
||
|
||
<!-- Generated with mdsplit: https://github.com/alandefreitas/mdsplit --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
layout: default | ||
title: Testing Locally | ||
nav_order: 2 | ||
has_children: false | ||
parent: Step-by-Step | ||
has_toc: false | ||
--- | ||
# Testing Locally | ||
|
||
You might want to test your documentation locally before pushing it to your repository. | ||
|
||
Install mkdocs with | ||
|
||
```bash | ||
pip install mkdocs-material | ||
``` | ||
|
||
After generating the docs with mdsplit, run the mkdocs server with | ||
|
||
```bash | ||
mkdocs serve | ||
``` | ||
|
||
Or build the static documentation with | ||
|
||
```bash | ||
mkdocs serve | ||
``` | ||
|
||
Use this mkdocs configuration file to get started: | ||
|
||
=== "mkdocs.yml" | ||
|
||
```yaml hl_lines="1 2 3 4 6 30" | ||
--8<-- "mkdocs.yml" | ||
``` | ||
|
||
Replace the settings with your repository information. | ||
|
||
|
||
|
||
<!-- Generated with mdsplit: https://github.com/alandefreitas/mdsplit --> |