Skip to content

Commit

Permalink
Add/subfolder example (#59)
Browse files Browse the repository at this point in the history
* adding a better example for how to derive a subfolder index
Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch authored Oct 5, 2021
1 parent 296b31d commit 06dfd73
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Critical items to know are:
- changed behaviour

## [master](https://github.com/vsoch/docsy-jekyll/tree/master)
- adding more verbose example for subfolders (0.0.24)
- sidebar fix to support multiple top level menus (0.0.23)
- added support for github_branch (default 'master') in config (0.0.22)
- adding support in footer to icon and link to linkedin url (0.0.21)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.23
0.0.24
8 changes: 7 additions & 1 deletion _docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ Documentation pages should be written in the `docs` folder of the repository,
and you are allowed to use whatever level of nesting (subfolders) that
works for you! It's a Jekyll [collection](https://jekyllrb.com/docs/collections/), which means that you
can add other content (images, scripts) and it will be included for linking to.
To create subfolders with files, you can simply create new markdon files. For example:

- `_docs/subfolder/example-page.md` renders to `http://localhost:4000/docsy-jekyll/docs/subfolder/example-page/`
- `_docs/subfolder.md` renders to `http://localhost:4000/docsy-jekyll/docs/subfolder/`

And the page you are reading now renders from `_docs/getting-started.md`

#### Organization

Expand Down Expand Up @@ -78,7 +84,7 @@ getting started page for sherlock:
```

[Here](example-page) is an example link to a relative path of a file (`example-page.md`)
in the same directory, and from that page you can test linking to a subfoldr.
in the same directory, and from that page you can test linking to a subfolder.
In the case of not having a subfolder, we could write the link out directly:

```
Expand Down
9 changes: 9 additions & 0 deletions _docs/subfolder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: The Subfolder Page
description: An example of a subfolder page.
---

# A Subfolder Page.

This is an example of a page that doesn't have a permalink defined, and
is not included in the table of contents (`_data/toc.yml`).
2 changes: 1 addition & 1 deletion _docs/subfolder/example-page.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: A Nested Page
description: An example of a a nested page in a subfolder.
description: An example of a nested page in a subfolder.
---

# A Nested Page
Expand Down

0 comments on commit 06dfd73

Please sign in to comment.