Skip to content

Commit 7adb54a

Browse files
committed
Setup blog
1 parent 24748a8 commit 7adb54a

File tree

8 files changed

+89
-3
lines changed

8 files changed

+89
-3
lines changed

_config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ github_username: yarnpkg
1313

1414
exclude:
1515
- README.md
16+
- crowdin.yaml
17+
- Gemfile
18+
- Gemfile.lock
19+
- Makefile
1620

1721
gems:
1822
- jekyll-redirect-from
@@ -37,3 +41,7 @@ sass:
3741

3842
redcarpet:
3943
extensions: [with_toc_data]
44+
45+
# Blog Settings
46+
permalink: /blog/:year/:month/:day/:title
47+
paginate: 1

_data/i18n/en.yml

+1
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,4 @@ docs_cli_team: yarn team
9696
docs_cli_uninstall: yarn uninstall
9797
docs_cli_upgrade: yarn upgrade
9898
docs_cli_why: yarn why
99+
blog: Blog

_includes/footer.html

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<hr class="feature-divider">
2+
13
<div class="container">
24
<footer>
35
<p>

_layouts/page.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
<div class="hero">
88
<div class="container">
9-
<h1 class="hero-text display-4">{{i18n[page.id]}}</h1>
9+
{% if page.layout == "post" %}
10+
<h1 class="hero-text display-4">{{page.title}}</h1>
11+
{% else %}
12+
<h1 class="hero-text display-4">{{i18n[page.id]}}</h1>
13+
{% endif %}
1014
</div>
1115
</div>
1216

_layouts/pages/homepage.html

-2
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,3 @@ <h2>{{i18n.homepage_featurette_misc_title}}</h2>
123123
</div>
124124
</div>
125125
</div>
126-
127-
<hr class="feature-divider">

_layouts/post.html

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
layout: page
3+
---
4+
5+
<p class="text-muted">
6+
Posted {{page.date | date: "%b %-d, %Y"}} by
7+
{% if page.author_url %}
8+
<a href="{{page.author_url}}">{{page.author}}</a>
9+
{% else %}
10+
{{page.author}}
11+
{% endif %}
12+
{% if page.meta %} · {{page.meta}}{% endif %}
13+
</p>
14+
15+
<div class="row">
16+
<div class="col-md-8">
17+
{{content}}
18+
</div>
19+
</div>

_posts/2015-10-03-introducing-yarn.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout : post
3+
title : "Introducing Yarn"
4+
author : James Kyle
5+
author_url : "https://twitter.com/thejameskyle"
6+
date : 2015-10-03 10:00:00
7+
categories : announcements
8+
share_text : "Introducing Yarn: The fast and reliable package manager for JavaScript."
9+
---
10+
11+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
12+
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
13+
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
14+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
15+
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
16+
culpa qui officia deserunt mollit anim id est laborum.
17+
18+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
19+
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
20+
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
21+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
22+
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
23+
culpa qui officia deserunt mollit anim id est laborum.
24+
25+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
26+
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
27+
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
28+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
29+
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
30+
culpa qui officia deserunt mollit anim id est laborum.
31+
32+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
33+
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
34+
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
35+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
36+
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
37+
culpa qui officia deserunt mollit anim id est laborum.

blog.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
id: blog
3+
layout: page
4+
permalink: /blog/
5+
---
6+
7+
<div class="blog">
8+
{% for post in site.posts %}
9+
<div class="blog-post">
10+
<h2><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h2>
11+
12+
<p class="small text-muted">Posted {{ post.date | date: "%b %-d, %Y" }} by {{ post.author }}{% if post.meta %} · {{ post.meta }}{% endif %}</p>
13+
14+
<p class="blog-excerpt">{{ post.excerpt | remove: '<p>' | remove: '</p>' }}</p>
15+
</div>
16+
{% endfor %}
17+
</div>

0 commit comments

Comments
 (0)