From b7bbf27ead54d8979d421076f3902b9ab1ed1764 Mon Sep 17 00:00:00 2001 From: Maximilian Held Date: Tue, 25 Mar 2014 18:16:22 +0100 Subject: [PATCH 1/2] include sample link url, post --- _layouts/post.html | 6 +++++- _posts/2013-08-12-sample-link-post.md | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 _posts/2013-08-12-sample-link-post.md diff --git a/_layouts/post.html b/_layouts/post.html index 06d8bccb..b0eb7c2c 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -36,7 +36,11 @@
-

{{ page.title }}

+ {% if page.link %} +

{{ page.title }}

+ {% else %} +

{{ page.title }}

+ {% endif %}
{{ content }} diff --git a/_posts/2013-08-12-sample-link-post.md b/_posts/2013-08-12-sample-link-post.md new file mode 100644 index 00000000..b9db0eea --- /dev/null +++ b/_posts/2013-08-12-sample-link-post.md @@ -0,0 +1,10 @@ +--- +layout: post +title: "Sample Link Post" +description: "Example and code for using link posts." +tags: [sample post, link post] +link: http://mademistakes.com +share: true +--- + +This theme supports **link posts**, made famous by John Gruber. To use, just add `link: http://url-you-want-linked` to the post's YAML front matter and you're done. \ No newline at end of file From 7b17dc35b66a51d5176370bd4b4d7ce01bafc1ca Mon Sep 17 00:00:00 2001 From: Maximilian Held Date: Tue, 25 Mar 2014 18:55:34 +0100 Subject: [PATCH 2/2] include link posts in post index, with external url, timestamp --- _layouts/post-index.html | 10 ++++++++-- _posts/2013-08-12-sample-link-post.md | 6 +++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/_layouts/post-index.html b/_layouts/post-index.html index dc70107e..83b94ddf 100644 --- a/_layouts/post-index.html +++ b/_layouts/post-index.html @@ -47,8 +47,14 @@ {% endif %} {% endunless %} {% endfor %}
diff --git a/_posts/2013-08-12-sample-link-post.md b/_posts/2013-08-12-sample-link-post.md index b9db0eea..f7711aab 100644 --- a/_posts/2013-08-12-sample-link-post.md +++ b/_posts/2013-08-12-sample-link-post.md @@ -7,4 +7,8 @@ link: http://mademistakes.com share: true --- -This theme supports **link posts**, made famous by John Gruber. To use, just add `link: http://url-you-want-linked` to the post's YAML front matter and you're done. \ No newline at end of file +This theme supports **link posts**, made famous by John Gruber. To use, just add `link: http://url-you-want-linked` to the post's YAML front matter and you're done. + +> And this is how a quote looks. + +Some [link](http://www.mademistakes.com) can also be shown. \ No newline at end of file