Skip to content

Commit 06dfd73

Browse files
authored
Add/subfolder example (#59)
* adding a better example for how to derive a subfolder index Signed-off-by: vsoch <[email protected]>
1 parent 296b31d commit 06dfd73

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Critical items to know are:
1414
- changed behaviour
1515

1616
## [master](https://github.com/vsoch/docsy-jekyll/tree/master)
17+
- adding more verbose example for subfolders (0.0.24)
1718
- sidebar fix to support multiple top level menus (0.0.23)
1819
- added support for github_branch (default 'master') in config (0.0.22)
1920
- adding support in footer to icon and link to linkedin url (0.0.21)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.23
1+
0.0.24

_docs/getting-started.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ Documentation pages should be written in the `docs` folder of the repository,
5050
and you are allowed to use whatever level of nesting (subfolders) that
5151
works for you! It's a Jekyll [collection](https://jekyllrb.com/docs/collections/), which means that you
5252
can add other content (images, scripts) and it will be included for linking to.
53+
To create subfolders with files, you can simply create new markdon files. For example:
54+
55+
- `_docs/subfolder/example-page.md` renders to `http://localhost:4000/docsy-jekyll/docs/subfolder/example-page/`
56+
- `_docs/subfolder.md` renders to `http://localhost:4000/docsy-jekyll/docs/subfolder/`
57+
58+
And the page you are reading now renders from `_docs/getting-started.md`
5359

5460
#### Organization
5561

@@ -78,7 +84,7 @@ getting started page for sherlock:
7884
```
7985

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

8490
```

_docs/subfolder.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: The Subfolder Page
3+
description: An example of a subfolder page.
4+
---
5+
6+
# A Subfolder Page.
7+
8+
This is an example of a page that doesn't have a permalink defined, and
9+
is not included in the table of contents (`_data/toc.yml`).

_docs/subfolder/example-page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: A Nested Page
3-
description: An example of a a nested page in a subfolder.
3+
description: An example of a nested page in a subfolder.
44
---
55

66
# A Nested Page

0 commit comments

Comments
 (0)