Single vs List
Or what to name your content files: foo.md
vs index.md
vs _index.md
.
On this page:
Top level page (example.com/lorem/
)
graph TD
A("example.com/lorem/") --> C
C{"Does this page
have child pages
(ie /lorem/ipsum/)?
"} C --- D[Yes] C --- E[No] E --> F F{"Does this page
have Page Resources
(ie lorem/photo.jpg)?"} F ---G F ---H G["No"] --> indexmd G["No"] --> ipsummd H["Yes"] --> indexmd indexmd("content/lorem/index.md") ipsummd("content/lorem.md") ipsummd -.- slayout indexmd -.- slayout slayout["Default layout file used"] slayout --> single("single.html") D --> lindex("content/lorem/_index.md") lindex -.- llayout["Default layout file used"] llayout --> list("list.html") click indexmd "/circle/" "Example" click ipsummd "/square/" "Example" click lindex "/clouds/" "Example" style lindex stroke-width:4px, stroke:#91C7B1; style indexmd stroke-width:4px, stroke:#91C7B1; style ipsummd stroke-width:4px, stroke:#91C7B1; style A stroke-width:4px, stroke:#6153CC; style single stroke-width:4px, stroke:#336699; style list stroke-width:4px, stroke:#336699;
have child pages
(ie /lorem/ipsum/)?
"} C --- D[Yes] C --- E[No] E --> F F{"Does this page
have Page Resources
(ie lorem/photo.jpg)?"} F ---G F ---H G["No"] --> indexmd G["No"] --> ipsummd H["Yes"] --> indexmd indexmd("content/lorem/index.md") ipsummd("content/lorem.md") ipsummd -.- slayout indexmd -.- slayout slayout["Default layout file used"] slayout --> single("single.html") D --> lindex("content/lorem/_index.md") lindex -.- llayout["Default layout file used"] llayout --> list("list.html") click indexmd "/circle/" "Example" click ipsummd "/square/" "Example" click lindex "/clouds/" "Example" style lindex stroke-width:4px, stroke:#91C7B1; style indexmd stroke-width:4px, stroke:#91C7B1; style ipsummd stroke-width:4px, stroke:#91C7B1; style A stroke-width:4px, stroke:#6153CC; style single stroke-width:4px, stroke:#336699; style list stroke-width:4px, stroke:#336699;
Page nested one level (example.com/lorem/ipsum/
)
This assumes that content/lorem/
is a list page.
graph TD
A("example.com/lorem/ipsum/") --> C
C{"Does this page
have child pages
(ie /lorem/ipsum/dolor/)?
"} C --- D[Yes] C --- E[No] E --> F F{"Does this page have
Page Resources
(ie ipsum/photo.jpg)?"} F ---G F ---H G["No"] --> indexmd G["No"] --> ipsummd H["Yes"] --> indexmd indexmd("content/lorem/ipsum/index.md") ipsummd("content/lorem/ipsum.md") ipsummd -.- slayout indexmd -.- slayout slayout["Default layout file used"] slayout --> single("single.html") D --> lindex("content/lorem/ipsum/_index.md") lindex -.- llayout["Default layout file used"] llayout --> list("list.html") click indexmd "/colors/yellow/" "Example" click ipsummd "/colors/green/" "Example" click lindex "/colors/" "Example" style A stroke-width:4px, stroke:#6153CC; style indexmd stroke-width:4px, stroke:#91C7B1; style ipsummd stroke-width:4px, stroke:#91C7B1; style lindex stroke-width:4px, stroke:#91C7B1; style single stroke-width:4px, stroke:#336699; style list stroke-width:4px, stroke:#336699;
have child pages
(ie /lorem/ipsum/dolor/)?
"} C --- D[Yes] C --- E[No] E --> F F{"Does this page have
Page Resources
(ie ipsum/photo.jpg)?"} F ---G F ---H G["No"] --> indexmd G["No"] --> ipsummd H["Yes"] --> indexmd indexmd("content/lorem/ipsum/index.md") ipsummd("content/lorem/ipsum.md") ipsummd -.- slayout indexmd -.- slayout slayout["Default layout file used"] slayout --> single("single.html") D --> lindex("content/lorem/ipsum/_index.md") lindex -.- llayout["Default layout file used"] llayout --> list("list.html") click indexmd "/colors/yellow/" "Example" click ipsummd "/colors/green/" "Example" click lindex "/colors/" "Example" style A stroke-width:4px, stroke:#6153CC; style indexmd stroke-width:4px, stroke:#91C7B1; style ipsummd stroke-width:4px, stroke:#91C7B1; style lindex stroke-width:4px, stroke:#91C7B1; style single stroke-width:4px, stroke:#336699; style list stroke-width:4px, stroke:#336699;
Some Page Vars
DOT (.) | Page(/single-vs-list.md) |
.File | single-vs-list.md |
.Kind | page |
.Type | page |
.Section | |
.Sections | |
.Parent | Page(/_index.md) |
.IsPage | true |
.IsNode | false |
.Pages | |
.Resources | false |
Content Structure
Homepage
_index.md
- Circle circle/index.md
- Clouds clouds/_index.md
-
Colors
colors/_index.md
- Blue Title colors/blue/index.md
- Green Title colors/green.md
- Orange Title colors/orange/index.md
- Red Title colors/red.md
- Yellow Title colors/yellow/index.md
- Crescent crescent/index.md
- Ellipse ellipse/index.md
-
Fruit
fruit/_index.md
- Banana fruit/banana.md
-
Berries
fruit/berries/_index.md
- Blackberries fruit/berries/blackberries/index.md
- Blueberries fruit/berries/blueberries/index.md
- Raspberries fruit/berries/raspberries.md
- Strawberries fruit/berries/strawberries/index.md
- Citrus fruit/citrus/_index.md
-
Stonefruit
fruit/stonefruit/_index.md
- Apricots fruit/stonefruit/apricots.md
- Nectarines fruit/stonefruit/nectarines.md
- Plums fruit/stonefruit/plums.md
- Layout Lookup Order layout-lookup.md
- Letters letters/_index.md
- Metals metals/_index.md
- Oval oval/index.md
- Page Resources page-resources.md
- Rectangle rectangle.md
- Rhombus rhombus.md
- Single vs List single-vs-list.md
- Square square.md
- Trapezoid trapezoid.md
- Trees trees/_index.md
Sibling Sections (.Parent.Sections)
Page | Title | File |
---|---|---|
Page(/clouds/_index.md) | Clouds | clouds/_index.md |
Page(/colors/_index.md) | Colors | colors/_index.md |
Page(/fruit/_index.md) | Fruit | fruit/_index.md |
Page(/letters/_index.md) | Letters | letters/_index.md |
Page(/metals/_index.md) | Metals | metals/_index.md |
Page(/trees/_index.md) | Trees | trees/_index.md |