Skip to content

Commit 58e2764

Browse files
committed
Setting up site structure, and blog layout. Writing first blog post!
1 parent b994275 commit 58e2764

File tree

9 files changed

+113
-4
lines changed

9 files changed

+113
-4
lines changed

_config.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,19 @@ exclude:
6868
- LICENSE
6969
- README.md
7070
- CNAME
71+
72+
# Setting default metadata
73+
defaults:
74+
-
75+
scope:
76+
path: '' # All files
77+
type: pages
78+
values:
79+
layout: page
80+
-
81+
scope:
82+
path: ''
83+
type: posts
84+
values:
85+
type: post
86+
permalink: /blog/:year/:month/:day/:title/

_includes/header.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
<header>
2-
<h1>Drupal Pattern Lab</h1>
2+
<h1><a href="/">Drupal Pattern Lab</a></h1>
3+
<nav>
4+
<a href="/">Home</a>
5+
{% for page in site.pages %}
6+
<a href="{{ page.url }}">{{ page.title }}</a>
7+
{% endfor %}
8+
</nav>
39
</header>

_includes/recent-posts.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<aside>
2+
<h4>Recent Posts</h4>
3+
<ul>
4+
{% for post in site.posts %}
5+
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
6+
{% endfor %}
7+
</ul>
8+
<a href="/blog">See All</a>
9+
</aside>

_layouts/default.html

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1-
{% include header.html %}
2-
{{ content }}
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>{% if page.title %}{{ page.title }} | {% endif %}{{ site.name }}</title>
6+
<meta name="description" content="{{ site.description }}">
7+
<meta name="viewport" content="width=device-width,initial-scale=1">
8+
</head>
9+
<body>
10+
<div class="site">
11+
<header class="site__header">
12+
{% include header.html %}
13+
</header>
14+
<div class="site__content">
15+
{{ content }}
16+
</div>
17+
</div>
18+
</body>
19+
</html>

_layouts/page.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
layout: default
3+
---
4+
<article>
5+
{% if page.title %}<h2>{{ page.title }}</h2>{% endif %}
6+
{{ content }}
7+
</article>
8+
<section>
9+
{% include recent-posts.html %}
10+
</section>

_layouts/post.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
layout: default
3+
---
4+
<article>
5+
<header>
6+
{% if page.title %}<h2>{{ page.title }}</h2>{% endif %}
7+
<ul>
8+
{% if page.author %}<li>by {{ page.author }}</li>{% endif %}
9+
<li>{{ page.date }}</li>
10+
</ul>
11+
</header>
12+
{{ content }}
13+
</article>

_posts/2017-04-28-hello-world.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Hello World! Announcing the Drupal Pattern Lab working group.
3+
author: Evan Lovely
4+
---
5+
6+
This last week at [DrupalCon Baltimore][dcon] a group of people passionate about using [Pattern Lab](http://patternlab.io) in our Drupal projects met and shared successes, dreams, and challenges. Some approaches have been shared, but many were re-inventing the wheel and tackling the same problems from different angles. Notable of those was the [Four Kitchens](http://fourkitchens.com) crew (Evan Willhite, Brian Lewis, and Randy Oest) with their [Emulsify theme](http://emulsify.info), [Salem Ghoweri](https://twitter.com/salem_ghoweri) of Senior Front-end Architect at Pegasystems, and yours truly: [Evan Lovely](http://evanlovely.com) of [Phase2](http://phase2technology.com), creator of [Pattern Lab Starter](https://github.com/phase2/pattern-lab-starter).
7+
8+
It was suggested that instead of one company investing in another companies approach & tooling to create a non-affiliated open source group and tie it to a GitHub organization composed of the interested members. And so: the GitHub org [Drupal Pattern Lab](https://github.com/drupal-pattern-lab) was born!
9+
10+
We hope to improve the existing tools and installations available for working with Pattern Lab as it relates to Drupal projects and to provide clear instructions for getting started and best practices for working through the different challenges with this approach. Additionally, we hope to highlight the incredible benefits associated with this fantastic approach as we have all seen great success and vast improvements using these approaches. This site aims to be the place for that info.
11+
12+
It's still **very** early in this for us (our GitHub org is about 4 days old); but here's some links to get started:
13+
14+
- We chat in the `#pattern-lab` channel in the [Drupal Twig Slack group](https://drupaltwig-slack.herokuapp.com).
15+
- Our [roadmap is gettting started here](https://github.com/drupal-pattern-lab/roadmap/projects/1); ask questions and provide feedback that way.
16+
- The [repo for this site is here](https://github.com/drupal-pattern-lab/drupal-pattern-lab.github.io) and all improvements are welcome!
17+
18+
[dcon]: http://baltimore2017.drupal.org

blog/index.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Blog
3+
layout: default
4+
---
5+
<h2>Blog</h2>
6+
<section>
7+
{% for post in site.posts %}
8+
<article>
9+
<header>
10+
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
11+
<ul>
12+
{% if post.author %}<li>by {{ post.author }}</li>{% endif %}
13+
<li>{{ post.date }}</li>
14+
</ul>
15+
</header>
16+
<p> {{ post.excerpt }} </p>
17+
<p><a href="{{ post.url }}">Read More</a></p>
18+
</article>
19+
<hr>
20+
{% endfor %}
21+
</section>

index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
layout: default
32
---
43

54
There is a lot happening in the Pattern Lab and Drupal 8 integration world. Here's some starting links to get going:

0 commit comments

Comments
 (0)