Skip to content

Commit d21743d

Browse files
Update tips.md
1 parent 6e27f9b commit d21743d

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

cheatsheets/jekyll/tips.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Using Jekyll Sitemap plugin, the `sitemap.xml` file is created on prod and dev b
4343

4444
Set default layout for all pages. Is this needed - isn't default the default? See artists-portfolio repo.
4545

46-
```
46+
```yaml
4747
defaults:
4848
- scope:
4949
path: ""
@@ -55,6 +55,30 @@ defaults:
5555
values:
5656
text_width: false
5757
```
58-
<!--stackedit_data:
59-
eyJoaXN0b3J5IjpbMTU1MjU5OTg1MF19
60-
-->
58+
59+
Here, the `index.md` pages at all levels get certain layout. And everything else defaults to `page` layout. Anything else is set on a page itself.
60+
61+
```yaml
62+
defaults:
63+
- scope:
64+
path: "**/index.md"
65+
values:
66+
layout: "listing"
67+
- scope:
68+
path: ""
69+
values:
70+
layout: "page"
71+
```
72+
73+
## Markdown in HTML
74+
75+
In a `.html` layout file, you can use `markdownify` to turn markdown into HTML.
76+
77+
```markdown
78+
<footer>
79+
80+
{{ 'Github repo: [MichaelCurrin/cheatsheets ![Repo stars](https://img.shields.io/github/stars/MichaelCurrin/cheatsheets?style=social)](https://github.com/MichaelCurrin/cheatsheets)' | markdownify }}
81+
82+
</footer>
83+
```
84+

0 commit comments

Comments
 (0)