Skip to content

Commit

Permalink
use isMarkdown to make sure markdown is formated
Browse files Browse the repository at this point in the history
  • Loading branch information
aloxe committed Dec 20, 2024
1 parent 4db0555 commit 821bc09
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/_assets/public/admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ collections:
name: "layout"
widget: "hidden"
default: "base"
- label: "isMarkdown"
name: "isMarkdown"
widget: "hidden"
default: true
- label: "Title"
name: "title"
widget: "string"
Expand All @@ -54,6 +58,10 @@ collections:
name: "layout"
widget: "hidden"
default: "base"
- label: "isMarkdown"
name: "isMarkdown"
widget: "hidden"
default: true
- label: "Title"
name: "title"
widget: "string"
Expand Down
4 changes: 4 additions & 0 deletions src/pages/examples/images/global/cows.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
layout: base
title: Cows
subtitle: Yet another example page
ismarkdown: true
---

## Picture of cows

This is an example page with an image of cows. The image file is not a global file but it is located higher in the section of the current page.
Expand All @@ -11,7 +13,9 @@ It can be used with the path from the root of pages but will not be able to be u

`![drooderfiets and cows](/examples/cows.jpg)`


Also it will not be visible in the CMS when editing the current page.


![drooderfiets and cows](/examples/cows.jpg)

1 change: 1 addition & 0 deletions src/pages/examples/images/global/grasshoper.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ layout: base
title: Grasshoper
subtitle: drooderfiets and grasshopper
description: An example page with a grasshopper from general folder
ismarkdown: true
---
## Picture with a grasshopper

Expand Down
4 changes: 3 additions & 1 deletion src/pages/examples/images/global/heron.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ layout: base
title: Heron
subtitle: drooderfiets and heron
description: An example page with a heron from general folder
ismarkdown: true
---
This is an example page with the image of a heron that was uploaded in the global media folder (Uncategorized). The resulting Markdown code is:
## Picture of a heron
This is an example page with the image of a heron that was uploaded in a subfolder of the global media folder (Uncategorized). It is accessible from any page. The resulting Markdown code is:

`![drooderfiets and grasshopper](/img/animals/heron.jpg)`

Expand Down
1 change: 1 addition & 0 deletions src/pages/examples/images/global/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: base
title: Global images
subtitle: Yet another example page
ismarkdown: true
---
This is the head of section global

1 change: 1 addition & 0 deletions src/pages/examples/images/local/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: base
title: Local images
subtitle: Yet another example page
ismarkdown: true
---
## This is section A of Part 1

10 changes: 10 additions & 0 deletions src/pages/examples/images/local/sheep.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
layout: base
title: Sheep
subtitle: Yet another example page
ismarkdown: true
---
## A picture of sheep

This is an example page with photo of sheep that sits in the same folder as the current page.

It is possible to display the image giving the entire path to the file as bellow.

`![drooderfiets and sheep](/examples/images/local/sheep.jpg)`


While this may help you understand where the file is, it is less practical in the CMS as the image will not be visible in the editor. Though it will still display in the page.

![drooderfiets and sheep](/examples/images/local/sheep.jpg)

2 changes: 2 additions & 0 deletions src/pages/examples/images/local/wasps.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
layout: base
title: Wasps
subtitle: Yet another example page
ismarkdown: true
---
## A picture with wasps

This is an example page with a photo of wasps that sits in the same folder as the current page. The resulting Markdown code is:

`![drooderfiets and wasps](wasps.jpg)`


![drooderfiets and wasps](wasps.jpg)

1 change: 1 addition & 0 deletions src/pages/examples/pages/1st-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: base
title: First page
subtitle: Finally I am not single
ismarkdown: true
---
First Page in Part 2

1 change: 1 addition & 0 deletions src/pages/examples/pages/2nd-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: base
title: Second page
subtitle: Finally I am not single
ismarkdown: true
---
Second Page in Part 2

1 change: 1 addition & 0 deletions src/pages/examples/pages/3rd-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: base
title: Third page
subtitle: Finally I am not single
ismarkdown: true
---
Third Page in Part 2

0 comments on commit 821bc09

Please sign in to comment.