Skip to content

Commit cd0c3c6

Browse files
committed
Added styles-injection-possibility via front matter new include loop for collections
1 parent 37c68f3 commit cd0c3c6

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

_includes/head.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,8 @@
5555
{% if page.noindex == true %}<meta name="robots" content="noindex">{% endif %}
5656

5757
<link type="text/plain" rel="author" href="{{ site.url }}/humans.txt" />
58+
59+
{% unless page.style == NULL %}
60+
<style type="text/css">{{ page.style }}</style>
61+
{% endunless %}
5862
</head>

_includes/list-collection.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{% comment %}
2+
*
3+
* This include lets you loop through a collection to list
4+
* all entries in that collection.
5+
*
6+
* If you set »published: false« in front matter of a collection page
7+
* the page gots filtered out via unless
8+
*
9+
* Example: {% include list-collection.html collection='wordpress' %}
10+
*
11+
{% endcomment %}
12+
13+
<ul class="side-nav">
14+
{% for page in site.[include.collection] %}
15+
{% unless page.published == false %}
16+
<li><a href="{{ site.url }}{{ page.url }}">{{ page.title }}</a></li>
17+
{% endunless %}
18+
{% endfor %}
19+
<li>&nbsp;</li>
20+
</ul>

pages/roadmap.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ permalink: "/roadmap/"
2424

2525
## Done
2626

27-
* [<s>Now with optional caption for header</s>]
27+
* <s>Use `style` in front matter to inject css-styles into `<head></s>
28+
* <s>Add include to loop through collections</s>
29+
* <s>Now with optional caption for header</s>
2830
* [<s>Refined humans.txt</s>](http://humanstxt.org/)
2931
* [<s>Produce an introduction video to showcase *Feeling Responsive*</s>](https://www.youtube.com/embed/3b5zCFSmVvU)
3032
* [<s>Additional header with text</s>]({{ site.url }}/headers/)

0 commit comments

Comments
 (0)