mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2025-02-28 08:21:52 -05:00
Merge branch '2.1' into site
This commit is contained in:
commit
bc717eafe2
@ -127,16 +127,17 @@ body.sidebar-footer {
|
|||||||
@media only screen and (min-width: 750px) {
|
@media only screen and (min-width: 750px) {
|
||||||
aside.sidebar { @include collapse-sidebar; }
|
aside.sidebar { @include collapse-sidebar; }
|
||||||
}
|
}
|
||||||
|
#main, #content, .sidebar {
|
||||||
|
@extend .group;
|
||||||
|
}
|
||||||
@media only screen and (min-width: 768px) {
|
@media only screen and (min-width: 768px) {
|
||||||
body { -webkit-text-size-adjust: auto; }
|
body { -webkit-text-size-adjust: auto; }
|
||||||
body > header { font-size: $header-font-size * 1.2; }
|
body > header { font-size: $header-font-size * 1.2; }
|
||||||
#main {
|
#main {
|
||||||
@extend .group;
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
#content {
|
#content {
|
||||||
@extend .group;
|
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
margin-right: $sidebar-width-medium;
|
margin-right: $sidebar-width-medium;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -149,7 +150,6 @@ body.sidebar-footer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
aside.sidebar {
|
aside.sidebar {
|
||||||
@extend .group;
|
|
||||||
width: $sidebar-width-medium - $sidebar-pad-medium*2;
|
width: $sidebar-width-medium - $sidebar-pad-medium*2;
|
||||||
padding: 0 $sidebar-pad-medium $sidebar-pad-medium;
|
padding: 0 $sidebar-pad-medium $sidebar-pad-medium;
|
||||||
background: none;
|
background: none;
|
||||||
@ -180,7 +180,6 @@ body.sidebar-footer {
|
|||||||
padding: 1.2em $sidebar-pad-wide $sidebar-pad-wide;
|
padding: 1.2em $sidebar-pad-wide $sidebar-pad-wide;
|
||||||
.collapse-sidebar & {
|
.collapse-sidebar & {
|
||||||
padding: { left: $pad-wide; right: $pad-wide; }
|
padding: { left: $pad-wide; right: $pad-wide; }
|
||||||
@extend .group;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -190,3 +189,4 @@ body.sidebar-footer {
|
|||||||
ul, ol { margin-left: 0; }
|
ul, ol { margin-left: 0; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,13 @@ $heading-font-family: "PT Serif", "Georgia", "Helvetica Neue", Arial, sans-serif
|
|||||||
$header-title-font-family: $heading-font-family !default;
|
$header-title-font-family: $heading-font-family !default;
|
||||||
$header-subtitle-font-family: $heading-font-family !default;
|
$header-subtitle-font-family: $heading-font-family !default;
|
||||||
|
|
||||||
|
$h1: 2.2em !default;
|
||||||
|
$h2: 1.5em !default;
|
||||||
|
$h3: 1.3em !default;
|
||||||
|
$h4: 1em !default;
|
||||||
|
$h5: .9em !default;
|
||||||
|
$h6: .8em !default;
|
||||||
|
|
||||||
// Fonts
|
// Fonts
|
||||||
.heading {
|
.heading {
|
||||||
font-family: $heading-font-family;
|
font-family: $heading-font-family;
|
||||||
@ -15,7 +22,7 @@ $header-subtitle-font-family: $heading-font-family !default;
|
|||||||
.mono { font-family: $mono; }
|
.mono { font-family: $mono; }
|
||||||
|
|
||||||
body > header h1 {
|
body > header h1 {
|
||||||
font-size: 2.2em;
|
font-size: $h1;
|
||||||
@extend .heading;
|
@extend .heading;
|
||||||
font-family: $header-title-font-family;
|
font-family: $header-title-font-family;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
@ -31,15 +38,6 @@ body {
|
|||||||
color: $text-color;
|
color: $text-color;
|
||||||
@extend .serif;
|
@extend .serif;
|
||||||
}
|
}
|
||||||
h1 {
|
|
||||||
font-size: 2.2em;
|
|
||||||
line-height: 1.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (min-width: 992px) {
|
|
||||||
body { font-size: 1.15em; }
|
|
||||||
h1 { font-size: 2.6em; line-height: 1.2em; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#{headings()}{
|
#{headings()}{
|
||||||
@extend .heading;
|
@extend .heading;
|
||||||
@ -47,21 +45,30 @@ h1 {
|
|||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: $h1;
|
||||||
|
line-height: 1.2em;
|
||||||
|
}
|
||||||
h2, section h1 {
|
h2, section h1 {
|
||||||
font-size: 1.5em;
|
font-size: $h2;
|
||||||
}
|
}
|
||||||
h3, section h2, section section h1 {
|
h3, section h2, section section h1 {
|
||||||
font-size: 1.3em;
|
font-size: $h3;
|
||||||
}
|
}
|
||||||
h4, section h3, section section h2, section section section h1 {
|
h4, section h3, section section h2, section section section h1 {
|
||||||
font-size: 1em;
|
font-size: $h4;
|
||||||
}
|
}
|
||||||
h5, section h4, section section h3 {
|
h5, section h4, section section h3 {
|
||||||
font-size: .9em;
|
font-size: $h5;
|
||||||
}
|
}
|
||||||
h6, section h5, section section h4, section section section h3 {
|
h6, section h5, section section h4, section section section h3 {
|
||||||
font-size: .8em;
|
font-size: $h6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (min-width: 992px) {
|
||||||
|
body { font-size: 1.15em; }
|
||||||
|
}
|
||||||
|
|
||||||
p, blockquote, ul, ol { margin-bottom: 1.5em; }
|
p, blockquote, ul, ol { margin-bottom: 1.5em; }
|
||||||
|
|
||||||
ul { list-style-type: disc;
|
ul { list-style-type: disc;
|
||||||
|
@ -1,43 +1,20 @@
|
|||||||
// Here you can easily change your sites's color scheme.
|
// Here you can easily change your sites's color scheme.
|
||||||
// To give it a try, uncomment some of the lines below rebuild your blog, and see how it works.
|
// To give it a try, uncomment some of the lines below rebuild your blog, and see how it works.
|
||||||
// If you need a handy color picker try http://hslpicker.com
|
|
||||||
|
|
||||||
//$header-bg: #263347;
|
//$header-bg: #263347;
|
||||||
//$subtitle-color: lighten($header-bg, 58);
|
//$subtitle-color: lighten($header-bg, 58);
|
||||||
//$nav-bg: desaturate(lighten(#8fc17a, 18), 5);
|
//$nav-bg: desaturate(lighten(#8fc17a, 18), 5);
|
||||||
//$nav-bg-front: image-url('noise.png');
|
|
||||||
//$nav-bg-back: linear-gradient(lighten($nav-bg, 8), $nav-bg, darken($nav-bg, 11));
|
|
||||||
//$sidebar-bg: desaturate(#eceff5, 8);
|
//$sidebar-bg: desaturate(#eceff5, 8);
|
||||||
//$sidebar-link-color: saturate(#526f9a, 10);
|
//$sidebar-link-color: saturate(#526f9a, 10);
|
||||||
//$sidebar-link-color-hover: darken(#7ab662, 9);
|
//$sidebar-link-color-hover: darken(#7ab662, 9);
|
||||||
//$footer-bg: #ccc !default;
|
|
||||||
//$footer-bg-front: image-url('noise.png');
|
|
||||||
//$footer-bg-back: linear-gradient(lighten($footer-bg, 8), $footer-bg, darken($footer-bg, 11));
|
|
||||||
|
|
||||||
|
|
||||||
/* To use the light Solarized highlighting theme uncomment the following line */
|
//To use the light Solarized highlighting theme uncomment this block
|
||||||
//$solarized: light;
|
//$base03: $base3;
|
||||||
|
//$base02: $base2;
|
||||||
/* If you want to tweak the Solarized colors you can do that here */
|
//$base01: $base1;
|
||||||
//$base03: #002b36; //darkest blue
|
//$base00: $base0;
|
||||||
//$base02: #073642; //dark blue
|
//$base0: $base00;
|
||||||
//$base01: #586e75; //darkest gray
|
//$base1: $base01;
|
||||||
//$base00: #657b83; //dark gray
|
//$base2: $base02;
|
||||||
//$base0: #839496; //medium gray
|
//$base3: $base03;
|
||||||
//$base1: #93a1a1; //medium light gray
|
|
||||||
//$base2: #eee8d5; //cream
|
|
||||||
//$base3: #fdf6e3; //white
|
|
||||||
//$solar-yellow: #b58900;
|
|
||||||
//$solar-orange: #cb4b16;
|
|
||||||
//$solar-red: #dc322f;
|
|
||||||
//$solar-magenta: #d33682;
|
|
||||||
//$solar-violet: #6c71c4;
|
|
||||||
//$solar-blue: #268bd2;
|
|
||||||
//$solar-cyan: #2aa198;
|
|
||||||
//$solar-green: #859900;
|
|
||||||
|
|
||||||
|
|
||||||
/* Non highlighted code colors */
|
|
||||||
//$pre-bg: $base03;
|
|
||||||
//$pre-border: darken($base02, 5);
|
|
||||||
//$pre-color: $base1;
|
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
// Here you can easily change your sites's layout.
|
// Here you can easily change your sites's layout.
|
||||||
// To give it a try, uncomment some of the lines below, make changes, rebuild your blog, and see how it works.
|
// To give it a try, uncomment some of the lines below, make changes, rebuild your blog, and see how it works.
|
||||||
|
|
||||||
//$header-font-size: 1em;
|
$max-width: 1069px;
|
||||||
//$header-padding-top: 1.5em;
|
|
||||||
//$header-padding-bottom: 1.5em;
|
|
||||||
|
|
||||||
//$max-width: 1350px;
|
|
||||||
//$indented-lists: true;
|
//$indented-lists: true;
|
||||||
|
|
||||||
// Padding used for layout margins
|
// Padding used for layout margins
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#content > div { &, > article { padding-top: 0; } }
|
#content > div { &, > article { padding-top: 0; } }
|
||||||
}
|
}
|
||||||
#blog-archives {
|
#blog-archives {
|
||||||
|
color: $text-color-light;
|
||||||
article {
|
article {
|
||||||
padding: 1em 0 1em;
|
padding: 1em 0 1em;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -9,25 +10,31 @@
|
|||||||
&:last-child {
|
&:last-child {
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
footer { padding: 0; margin: 0;}
|
footer {
|
||||||
|
padding: 0; margin: 0;
|
||||||
|
font-size: .85em;
|
||||||
|
line-height: 1em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
h1 { color: $text-color; margin-bottom: .3em; }
|
|
||||||
h2 { display: none; }
|
h2 { display: none; }
|
||||||
h1 {
|
.entry-title {
|
||||||
font-size: 1.5em;
|
color: $text-color; margin-bottom: .3em;
|
||||||
|
font-size: $h3;
|
||||||
a {
|
a {
|
||||||
@include hover-link;
|
@include hover-link;
|
||||||
color: inherit;
|
|
||||||
&:hover { color: $link-color-hover; }
|
&:hover { color: $link-color-hover; }
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
article[data-linklog] .entry-title {
|
||||||
|
font-size: $h4;
|
||||||
|
a { text-decoration: underline; }
|
||||||
|
}
|
||||||
a.category, time {
|
a.category, time {
|
||||||
@extend .sans;
|
@extend .sans;
|
||||||
color: $text-color-light;
|
color: $text-color-light;
|
||||||
}
|
}
|
||||||
color: $text-color-light;
|
|
||||||
.entry-content { display: none; }
|
.entry-content { display: none; }
|
||||||
time {
|
time {
|
||||||
font-size: .9em;
|
font-size: .9em;
|
||||||
@ -36,10 +43,13 @@
|
|||||||
.month { text-transform: uppercase; }
|
.month { text-transform: uppercase; }
|
||||||
}
|
}
|
||||||
p { margin-bottom: 1em; }
|
p { margin-bottom: 1em; }
|
||||||
&, .entry-content { a { @include link-colors(inherit, $link-color-hover); }}
|
|
||||||
a:hover { color: $link-color-hover; }
|
a:hover { color: $link-color-hover; }
|
||||||
|
|
||||||
@media only screen and (min-width: 550px) {
|
@media only screen and (min-width: 550px) {
|
||||||
article { margin-left: 5em; }
|
article {
|
||||||
|
padding: { left: 4.5em; bottom: .7em;}
|
||||||
|
margin-left: 5em;
|
||||||
|
}
|
||||||
h2 {
|
h2 {
|
||||||
margin-bottom: .3em;
|
margin-bottom: .3em;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
@ -55,12 +65,7 @@
|
|||||||
top: 1.8em;
|
top: 1.8em;
|
||||||
}
|
}
|
||||||
.year { display: none; }
|
.year { display: none; }
|
||||||
article {
|
a.category { line-height: 1.1em; }
|
||||||
padding:{left: 4.5em; bottom: .7em;}
|
|
||||||
}
|
|
||||||
a.category {
|
|
||||||
line-height: 1.1em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#content > .category {
|
#content > .category {
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
#content .blog-index {
|
||||||
|
padding: { top: 0; bottom: 0; }
|
||||||
|
article { padding-top: 2em; }
|
||||||
|
}
|
||||||
|
|
||||||
article {
|
article {
|
||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
a { @extend .force-wrap; }
|
a { @extend .force-wrap; }
|
||||||
@ -7,33 +12,100 @@ article {
|
|||||||
padding-bottom: 1em;
|
padding-bottom: 1em;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
background: $img-border bottom left repeat-x;
|
background: $img-border bottom left repeat-x;
|
||||||
h1 {
|
|
||||||
margin: 0;
|
|
||||||
a { text-decoration: none;
|
|
||||||
&:hover { text-decoration: underline; } }
|
|
||||||
}
|
|
||||||
p {
|
|
||||||
font-size: .9em;
|
|
||||||
color: $text-color-light;
|
|
||||||
margin: 0;
|
|
||||||
&.meta {
|
|
||||||
@extend .sans;
|
|
||||||
text-transform: uppercase;
|
|
||||||
position: absolute; top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media only screen and (min-width: 768px) {
|
@media only screen and (min-width: 768px) {
|
||||||
margin-bottom: 1.5em;
|
margin-bottom: 1.5em;
|
||||||
padding-bottom: 1em;
|
padding-bottom: 1em;
|
||||||
background: $img-border bottom left repeat-x;
|
background: $img-border bottom left repeat-x;
|
||||||
}
|
}
|
||||||
|
.blog-index & { background: none; padding-bottom: 0; }
|
||||||
|
p {
|
||||||
|
font-size: .9em;
|
||||||
|
margin: 0;
|
||||||
|
color: $text-color-light;
|
||||||
|
&.meta { @extend .sans; position: absolute; top: 0; }
|
||||||
|
}
|
||||||
|
time { text-transform: uppercase; }
|
||||||
}
|
}
|
||||||
|
.entry-title {
|
||||||
|
margin: 0;
|
||||||
|
a { text-decoration: none;
|
||||||
|
&:hover { text-decoration: underline; }
|
||||||
|
}
|
||||||
|
.blog-index & {
|
||||||
|
font-size: $h1;
|
||||||
|
a { color: inherit; &:hover { color: $link-color-hover; } }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a[rel=bookmark] { text-decoration: none; }
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
padding-top: 0.8em;
|
padding-top: 0.8em;
|
||||||
background: $img-border top left repeat-x;
|
background: $img-border top left repeat-x;
|
||||||
}
|
}
|
||||||
.entry-content & h2:first-child, header + h2 { padding-top: 0; }
|
|
||||||
h2:first-child, header + h2 { background: none; }
|
h2:first-child, header + h2 { background: none; }
|
||||||
|
|
||||||
|
.entry-content & h2:first-child, header + h2 { padding-top: 0; }
|
||||||
|
|
||||||
|
&.linklog {
|
||||||
|
.entry-title {
|
||||||
|
font-size: $h1;
|
||||||
|
a { text-decoration: underline; }
|
||||||
|
}
|
||||||
|
.blog-index & .entry-title { font-size: $h2; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.linklog-marker {
|
||||||
|
color: $text-color-light;
|
||||||
|
font-size: .8em;
|
||||||
|
line-height: 1em;
|
||||||
|
position: relative; top: -.15em;
|
||||||
|
}
|
||||||
|
|
||||||
|
> footer {
|
||||||
|
@extend .sans;
|
||||||
|
padding-bottom: 2.5em;
|
||||||
|
margin-top: 2em;
|
||||||
|
.blog-index & { margin-top: 1em; }
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
.meta {
|
||||||
|
margin-bottom: .8em;
|
||||||
|
font-size: .85em;
|
||||||
|
clear: both;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.byline + time:before, time +time:before, .comments:before, .byline ~ .categories:before {
|
||||||
|
@extend .separator;
|
||||||
|
}
|
||||||
|
p:last-child { margin-bottom: 0; }
|
||||||
|
.comments-link {
|
||||||
|
font-size: .8em;
|
||||||
|
color: inherit;
|
||||||
|
&:hover, &:focus { color: $link-color-hover; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a[rel=full-article] {
|
||||||
|
background: darken($main-bg, 5);
|
||||||
|
display: inline-block;
|
||||||
|
padding: .4em .8em;
|
||||||
|
margin-right: .5em;
|
||||||
|
text-decoration: none;
|
||||||
|
color: mix($text-color, $text-color-light);
|
||||||
|
@extend .serif;
|
||||||
|
@include transition(background-color .5s);
|
||||||
|
&:hover {
|
||||||
|
background: $link-color-hover;
|
||||||
|
text-shadow: none;
|
||||||
|
color: $main-bg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-index & + article {
|
||||||
|
background: $img-border top left repeat-x;
|
||||||
|
}
|
||||||
|
|
||||||
.feature {
|
.feature {
|
||||||
padding-top: .5em;
|
padding-top: .5em;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
@ -42,6 +114,7 @@ article {
|
|||||||
font-size: 2.0em; font-style: italic;
|
font-size: 2.0em; font-style: italic;
|
||||||
line-height: 1.3em;
|
line-height: 1.3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
img, video, .flash-video {
|
img, video, .flash-video {
|
||||||
@extend .flex-content;
|
@extend .flex-content;
|
||||||
@extend .basic-alignment;
|
@extend .basic-alignment;
|
||||||
@ -66,54 +139,6 @@ article {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> footer {
|
|
||||||
padding-bottom: 2.5em;
|
|
||||||
margin-top: 2em;
|
|
||||||
@extend .sans;
|
|
||||||
p.meta {
|
|
||||||
margin-bottom: .8em;
|
|
||||||
font-size: .85em;
|
|
||||||
clear: both;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.byline + time:before, time +time:before, .comments:before, .byline ~ .categories:before {
|
|
||||||
@extend .separator;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
article + article {
|
|
||||||
.blog-index & {
|
|
||||||
background: $img-border top left repeat-x;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#content .blog-index {
|
|
||||||
padding: { top: 0; bottom: 0; }
|
|
||||||
article { padding-top: 2em; }
|
|
||||||
article header { background: none; padding-bottom: 0; }
|
|
||||||
article h1 {
|
|
||||||
font-size: 2.2em;
|
|
||||||
a { color: inherit; &:hover { color: $link-color-hover; } }
|
|
||||||
}
|
|
||||||
a[rel=full-article] {
|
|
||||||
background: darken($main-bg, 5);
|
|
||||||
display: inline-block;
|
|
||||||
padding: .4em .8em;
|
|
||||||
margin-right: .5em;
|
|
||||||
text-decoration: none;
|
|
||||||
color: mix($text-color, $text-color-light);
|
|
||||||
@extend .serif;
|
|
||||||
@include transition(background-color .5s);
|
|
||||||
&:hover {
|
|
||||||
background: $link-color-hover;
|
|
||||||
text-shadow: none;
|
|
||||||
color: $main-bg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
footer {
|
|
||||||
@extend .sans;
|
|
||||||
margin-top: 1em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.separator {
|
.separator {
|
||||||
|
@ -13,7 +13,7 @@ body > nav {
|
|||||||
.search {
|
.search {
|
||||||
padding: .3em .5em 0;
|
padding: .3em .5em 0;
|
||||||
font-size: .85em;
|
font-size: .85em;
|
||||||
@extend .sans;
|
font-family: $sans;
|
||||||
line-height: 1.1em;
|
line-height: 1.1em;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
@include border-radius(.5em);
|
@include border-radius(.5em);
|
||||||
@ -54,7 +54,7 @@ body > nav {
|
|||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
@include link-colors($nav-color, $nav-color-hover, $visited: $nav-color);
|
@include link-colors($nav-color, $nav-color-hover, $visited: $nav-color);
|
||||||
@extend .sans;
|
font-family: $sans;
|
||||||
text-shadow: lighten($nav-bg, 12) 0 1px;
|
text-shadow: lighten($nav-bg, 12) 0 1px;
|
||||||
float: left;
|
float: left;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -134,3 +134,4 @@ body > nav {
|
|||||||
a[rel=subscribe-rss]{ @include mask-subscription-nav('rss.png'); }
|
a[rel=subscribe-rss]{ @include mask-subscription-nav('rss.png'); }
|
||||||
a[rel=subscribe-email]{ @include mask-subscription-nav('email.png'); }
|
a[rel=subscribe-email]{ @include mask-subscription-nav('email.png'); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
{% capture category %}{{ post.categories | size }}{% endcapture %}
|
{% capture category %}{{ post.categories | size }}{% endcapture %}
|
||||||
<h1><a href="{{ root_url }}{{ post.url }}">{{post.title}}</a></h1>
|
{% include post/title.html %}
|
||||||
<time datetime="{{ post.date | datetime | date_to_xmlschema }}" pubdate>{{ post.date | date: "<span class='month'>%b</span> <span class='day'>%d</span> <span class='year'>%Y</span>"}}</time>
|
<time datetime="{{ post.date | datetime | date_to_xmlschema }}" pubdate>{{ post.date | date: "<span class='month'>%b</span> <span class='day'>%d</span> <span class='year'>%Y</span>"}}</time>
|
||||||
{% if category != '0' %}
|
|
||||||
<footer>
|
<footer>
|
||||||
|
{% if linklog %}
|
||||||
|
<a rel="bookmark" href="{{ permalink }}">{{ site.permalink_label }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if category != '0' %}
|
||||||
|
{% if linklog %} • {% endif %}
|
||||||
<span class="categories">posted in {{ post.categories | category_links }}</span>
|
<span class="categories">posted in {{ post.categories | category_links }}</span>
|
||||||
|
{% endif %}
|
||||||
</footer>
|
</footer>
|
||||||
{% endif %}
|
|
||||||
|
@ -1,28 +1,22 @@
|
|||||||
{% unless page.no_header %}
|
{% unless page.no_header %}
|
||||||
<header>
|
<header>
|
||||||
{% if index %}
|
{% include post/title.html %}
|
||||||
<h1 class="entry-title"><a href="{{ root_url }}{{ post.url }}">{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}</a></h1>
|
|
||||||
{% else %}
|
|
||||||
<h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h1>
|
|
||||||
{% endif %}
|
|
||||||
{% unless page.meta == false %}
|
{% unless page.meta == false %}
|
||||||
<p class="meta">
|
<p class="meta">
|
||||||
{% include post/date.html %}{{ time }}
|
{% include post/date.html %}{{ time }}
|
||||||
{% if site.disqus_short_name and page.comments != false and site.disqus_show_comment_count == true %}
|
• <a rel="bookmark" href="{{ permalink }}">{{ site.permalink_label }}</a>
|
||||||
| <a href="{% if index %}{{ root_url }}{{ post.url }}{% endif %}#disqus_thread">Comments</a>
|
|
||||||
{% endif %}
|
|
||||||
</p>
|
</p>
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
</header>
|
</header>
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
{% if index %}
|
|
||||||
<div class="entry-content">{{ content | excerpt }}</div>
|
|
||||||
{% capture excerpted %}{{ content | has_excerpt }}{% endcapture %}
|
|
||||||
{% if excerpted == 'true' %}
|
|
||||||
<footer>
|
|
||||||
<a rel="full-article" href="{{ root_url }}{{ post.url }}">{{ site.excerpt_link }}</a>
|
|
||||||
</footer>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
<div class="entry-content">{{ content }}</div>
|
<div class="entry-content">{{ content }}</div>
|
||||||
|
{% if index %}
|
||||||
|
<footer>
|
||||||
|
{% if site.disqus_short_name and page.comments != false and site.disqus_show_comment_count == true %}
|
||||||
|
<p><a class="comments-link" href="{% if index %}{{ permalink }}{% endif %}#disqus_thread">View comments »</a></p>
|
||||||
|
{% endif %}
|
||||||
|
{% if excerpted != 'false' %}
|
||||||
|
<p><a rel="full-article" href="{{ permalink }}">{{ site.excerpt_link }}</a></p>
|
||||||
|
{% endif %}
|
||||||
|
</footer>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
9
.themes/classic/source/_includes/feed_entry.xml
Normal file
9
.themes/classic/source/_includes/feed_entry.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{% assign linklog = false %}
|
||||||
|
{% if post.external-url %}{% capture linklog %}{{ post.external-url | prepend_url: site.url }}{% endcapture %}{% endif %}
|
||||||
|
{% capture title_url %}{% if linklog %}{{ linklog }}{% else %}{{ site.url }}{{ post.url }}{% endif %}{% endcapture %}
|
||||||
|
{% capture title %}{% if linklog and site.linklog_marker_position_feed == 'before' %}{% unless linklog %}{{ site.standard_post_marker }}{% endunless %}{{ site.linklog_marker }} {% endif %}{{ post.title }}{% if linklog and site.linklog_marker_position_feed == 'after' %} {{ site.linklog_marker }}{% endif %}{% endcapture %}
|
||||||
|
{% capture content %}{% if site.excerpt_in_feed %}{{ post.content | excerpt | expand_urls: site.url }}<p><a rel="bookmark" href="{{ site.url }}{{ post.url }}">{{ site.excerpt_link }}</a></p>{% else %}{{ post.content | expand_urls: site.url }}<p><a rel="bookmark" href="{{ site.url }}{{ post.url }}">{{ site.permalink_label_feed }}</a></p>{% endif %}{% endcapture %}
|
||||||
|
<title type="html"><![CDATA[{{ title | cdata_escape }}]]></title>
|
||||||
|
<link href="{{ title_url }}"/>
|
||||||
|
<updated>{{ post.date | date_to_xmlschema }}</updated>
|
||||||
|
<id>{{ site.url }}{{ post.id }}</id>
|
5
.themes/classic/source/_includes/post/title.html
Normal file
5
.themes/classic/source/_includes/post/title.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<h1 class="entry-title">
|
||||||
|
{% if linklog and site.linklog_marker and site.linklog_marker_position == 'before' %}{{ linklog_marker }}{% endif %}
|
||||||
|
{% if index or linklog %}<a href="{{ title_url }}">{% endif %}{% if site.titlecase %}{{ article_title | titlecase }}{% else %}{{ article_title }}{% endif %}{% if index or linklog %}</a>{% endif %}
|
||||||
|
{% if linklog and site.linklog_marker and site.linklog_marker_position == 'after' %}{{ linklog_marker }}{% endif %}
|
||||||
|
</h1>
|
14
.themes/classic/source/_includes/post/variables.html
Normal file
14
.themes/classic/source/_includes/post/variables.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{% assign linklog = false %}
|
||||||
|
{% assign index = false %}
|
||||||
|
|
||||||
|
{% if page.external-url %}
|
||||||
|
{% capture linklog %}{{ page.external-url }}{% endcapture %}
|
||||||
|
{% elsif post.external-url %}
|
||||||
|
{% capture linklog %}{{ post.external-url }}{% endcapture %}
|
||||||
|
{% endif %}
|
||||||
|
{% if post.url %}{% assign index = true %}{% endif %}
|
||||||
|
{% capture permalink %}{{ root_url }}{% if index %}{{ post.url }}{% else %}{{ page.url }}{% endif %}{% endcapture %}
|
||||||
|
{% capture title_url %}{% if linklog %}{{ linklog }}{% else %}{{ permalink }}{% endif %}{% endcapture %}
|
||||||
|
{% capture article_title %}{% if index %}{% unless linklog %}{{ site.standard_post_marker }}{% endunless %}{{ post.title }}{% else %}{% unless linklog %}{{ site.standard_post_marker }}{% endunless %}{{ page.title }}{% endif %}{% endcapture %}
|
||||||
|
{% capture linklog_marker %}<span class='linklog-marker'>{{ site.linklog_marker }}</span>{% endcapture %}
|
||||||
|
{% capture content %}{% if index %}{% capture excerpted %}{{ post.content | has_excerpt }}{% endcapture %}{% if excerpted != 'false' %}{{ post.content | excerpt }}{% else %}{{ post.content }}{% endif %}{% else %}{{ content }}{% endif %}{% endcapture %}
|
@ -16,12 +16,10 @@ layout: nil
|
|||||||
<generator uri="http://octopress.org/">Octopress</generator>
|
<generator uri="http://octopress.org/">Octopress</generator>
|
||||||
|
|
||||||
{% for post in site.categories[page.category] limit: 5 %}
|
{% for post in site.categories[page.category] limit: 5 %}
|
||||||
<entry>
|
<entry>
|
||||||
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
|
{% include feed_entry.xml %}
|
||||||
<link href="{{ site.url }}{{ post.url }}"/>
|
<content type="html"><![CDATA[{{ content | markdownify | cdata_escape }}]]></content>
|
||||||
<updated>{{ post.date | date_to_xmlschema }}</updated>
|
</entry>
|
||||||
<id>{{ site.url }}{{ post.id }}</id>
|
|
||||||
<content type="html"><![CDATA[{{ post.content | expand_urls: site.url | markdownify | cdata_escape }}]]></content>
|
|
||||||
</entry>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</feed>
|
</feed>
|
||||||
|
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
layout: page
|
layout: page
|
||||||
footer: false
|
footer: false
|
||||||
|
body_id: archive
|
||||||
---
|
---
|
||||||
|
|
||||||
<div id="blog-archives" class="category">
|
<div id="blog-archives" class="category">
|
||||||
@ -10,7 +11,8 @@ footer: false
|
|||||||
{% assign year = this_year %}
|
{% assign year = this_year %}
|
||||||
<h2>{{ year }}</h2>
|
<h2>{{ year }}</h2>
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
<article>
|
{% include post/variables.html %}
|
||||||
|
<article {% if linklog %}class='linklog'{% endif %}>
|
||||||
{% include archive_post.html %}
|
{% include archive_post.html %}
|
||||||
</article>
|
</article>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -4,7 +4,8 @@ single: true
|
|||||||
---
|
---
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<article class="hentry" role="article">
|
{% include post/variables.html %}
|
||||||
|
<article class="hentry" role="article" {% if linklog %}class="linklog"{% endif %}>
|
||||||
{% include article.html %}
|
{% include article.html %}
|
||||||
<footer>
|
<footer>
|
||||||
<p class="meta">
|
<p class="meta">
|
||||||
@ -41,3 +42,4 @@ single: true
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</aside>
|
</aside>
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ layout: nil
|
|||||||
---
|
---
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||||
|
|
||||||
<title><![CDATA[{{ site.title }}]]></title>
|
<title><![CDATA[{{ site.title }}]]></title>
|
||||||
<link href="{{ site.url }}/atom.xml" rel="self"/>
|
<link href="{{ site.url }}/atom.xml" rel="self"/>
|
||||||
<link href="{{ site.url }}/"/>
|
<link href="{{ site.url }}/"/>
|
||||||
@ -16,12 +15,9 @@ layout: nil
|
|||||||
<generator uri="http://octopress.org/">Octopress</generator>
|
<generator uri="http://octopress.org/">Octopress</generator>
|
||||||
|
|
||||||
{% for post in site.posts limit: 20 %}
|
{% for post in site.posts limit: 20 %}
|
||||||
<entry>
|
<entry>
|
||||||
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
|
{% include feed_entry.xml %}
|
||||||
<link href="{{ site.url }}{{ post.url }}"/>
|
<content type="html"><![CDATA[{{ content | cdata_escape }}]]></content>
|
||||||
<updated>{{ post.date | date_to_xmlschema }}</updated>
|
</entry>
|
||||||
<id>{{ site.url }}{{ post.id }}</id>
|
|
||||||
<content type="html"><![CDATA[{{ post.content | expand_urls: site.url | cdata_escape }}]]></content>
|
|
||||||
</entry>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</feed>
|
</feed>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
layout: page
|
layout: page
|
||||||
title: Blog Archive
|
title: Blog Archive
|
||||||
footer: false
|
footer: false
|
||||||
|
body_id: archive
|
||||||
---
|
---
|
||||||
|
|
||||||
<div id="blog-archives">
|
<div id="blog-archives">
|
||||||
@ -11,7 +12,8 @@ footer: false
|
|||||||
{% assign year = this_year %}
|
{% assign year = this_year %}
|
||||||
<h2>{{ year }}</h2>
|
<h2>{{ year }}</h2>
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
<article>
|
{% include post/variables.html %}
|
||||||
|
<article {% if linklog %}data-linklog{% endif %}>
|
||||||
{% include archive_post.html %}
|
{% include archive_post.html %}
|
||||||
</article>
|
</article>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -3,10 +3,9 @@ layout: default
|
|||||||
---
|
---
|
||||||
|
|
||||||
<div class="blog-index">
|
<div class="blog-index">
|
||||||
{% assign index = true %}
|
|
||||||
{% for post in paginator.posts %}
|
{% for post in paginator.posts %}
|
||||||
{% assign content = post.content %}
|
{% include post/variables.html %}
|
||||||
<article>
|
<article {% if linklog %}class="linklog"{% endif %}>
|
||||||
{% include article.html %}
|
{% include article.html %}
|
||||||
</article>
|
</article>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -39,7 +39,7 @@ GEM
|
|||||||
rubypython (0.5.1)
|
rubypython (0.5.1)
|
||||||
blankslate (>= 2.1.2.3)
|
blankslate (>= 2.1.2.3)
|
||||||
ffi (~> 1.0.7)
|
ffi (~> 1.0.7)
|
||||||
sass (3.1.5)
|
sass (3.1.18)
|
||||||
sinatra (1.2.6)
|
sinatra (1.2.6)
|
||||||
rack (~> 1.1)
|
rack (~> 1.1)
|
||||||
tilt (>= 1.2.2, < 2.0)
|
tilt (>= 1.2.2, < 2.0)
|
||||||
|
15
Rakefile
15
Rakefile
@ -59,8 +59,8 @@ desc "Watch the site and regenerate when it changes"
|
|||||||
task :watch do
|
task :watch do
|
||||||
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
||||||
puts "Starting to watch source with Jekyll and Compass."
|
puts "Starting to watch source with Jekyll and Compass."
|
||||||
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
|
system "compass compile --css-dir #{source_dir}/stylesheets"
|
||||||
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll --auto")
|
jekyllPid = Process.spawn("jekyll --auto")
|
||||||
compassPid = Process.spawn("compass watch")
|
compassPid = Process.spawn("compass watch")
|
||||||
|
|
||||||
trap("INT") {
|
trap("INT") {
|
||||||
@ -75,8 +75,8 @@ desc "preview the site in a web browser"
|
|||||||
task :preview do
|
task :preview do
|
||||||
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
||||||
puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}"
|
puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}"
|
||||||
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
|
system "compass compile --css-dir #{source_dir}/stylesheets"
|
||||||
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll --auto")
|
jekyllPid = Process.spawn("jekyll --auto")
|
||||||
compassPid = Process.spawn("compass watch")
|
compassPid = Process.spawn("compass watch")
|
||||||
rackupPid = Process.spawn("rackup --port #{server_port}")
|
rackupPid = Process.spawn("rackup --port #{server_port}")
|
||||||
|
|
||||||
@ -106,6 +106,7 @@ task :new_post, :title do |t, args|
|
|||||||
post.puts "title: \"#{title.gsub(/&/,'&')}\""
|
post.puts "title: \"#{title.gsub(/&/,'&')}\""
|
||||||
post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
|
post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
|
||||||
post.puts "comments: true"
|
post.puts "comments: true"
|
||||||
|
post.puts "external-url: "
|
||||||
post.puts "categories: "
|
post.puts "categories: "
|
||||||
post.puts "---"
|
post.puts "---"
|
||||||
end
|
end
|
||||||
@ -199,6 +200,12 @@ task :update_source, :theme do |t, args|
|
|||||||
cp "#{source_dir}.old/favicon.png", source_dir
|
cp "#{source_dir}.old/favicon.png", source_dir
|
||||||
mv "#{source_dir}/index.html", "#{blog_index_dir}", :force=>true if blog_index_dir != source_dir
|
mv "#{source_dir}/index.html", "#{blog_index_dir}", :force=>true if blog_index_dir != source_dir
|
||||||
cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir && File.exists?("#{source_dir}.old/index.html")
|
cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir && File.exists?("#{source_dir}.old/index.html")
|
||||||
|
if File.exists?("#{source_dir}/archives/index.html")
|
||||||
|
rm "#{source_dir}/archives/index.html"
|
||||||
|
mv "#{source_dir}/blog/archives/index.html", "#{source_dir}/archives/index.html"
|
||||||
|
rm_r "#{source_dir}/blog/archives"
|
||||||
|
rm_r "#{source_dir}/blog" if Dir.entries("#{source_dir}/blog").join == "..."
|
||||||
|
end
|
||||||
puts "## Updated #{source_dir} ##"
|
puts "## Updated #{source_dir} ##"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ date_format: "ordinal"
|
|||||||
# RSS / Email (optional) subscription links (change if using something like Feedburner)
|
# RSS / Email (optional) subscription links (change if using something like Feedburner)
|
||||||
subscribe_rss: /atom.xml
|
subscribe_rss: /atom.xml
|
||||||
subscribe_email:
|
subscribe_email:
|
||||||
|
category_feeds: false
|
||||||
# RSS feeds can list your email address if you like
|
# RSS feeds can list your email address if you like
|
||||||
email: brandon@imathis.com
|
email: brandon@imathis.com
|
||||||
|
|
||||||
@ -41,6 +42,13 @@ paginate: 10 # Posts per page on the blog index
|
|||||||
pagination_dir: blog # Directory base for pagination URLs eg. /blog/page/2/
|
pagination_dir: blog # Directory base for pagination URLs eg. /blog/page/2/
|
||||||
recent_posts: 5 # Posts in the sidebar Recent Posts section
|
recent_posts: 5 # Posts in the sidebar Recent Posts section
|
||||||
excerpt_link: "Read on →" # "Continue reading" link text at the bottom of excerpted articles
|
excerpt_link: "Read on →" # "Continue reading" link text at the bottom of excerpted articles
|
||||||
|
excerpt_in_feed: false # Truncate excerpted articles in the atom feed
|
||||||
|
permalink_label: "∞"
|
||||||
|
permalink_label_feed: "∞ Permalink"
|
||||||
|
linklog_marker: "→"
|
||||||
|
linklog_marker_position: after
|
||||||
|
linklog_marker_position_feed: after
|
||||||
|
standard_post_marker:
|
||||||
|
|
||||||
titlecase: true # Converts page and post titles to titlecase
|
titlecase: true # Converts page and post titles to titlecase
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ module Jekyll
|
|||||||
@name = 'index.html'
|
@name = 'index.html'
|
||||||
self.process(@name)
|
self.process(@name)
|
||||||
# Read the YAML data from the layout page.
|
# Read the YAML data from the layout page.
|
||||||
self.read_yaml(File.join(base, '_layouts'), 'category_index.html')
|
self.read_yaml(File.join(base, '_layouts'), 'category_feed.xml')
|
||||||
self.data['category'] = category
|
self.data['category'] = category
|
||||||
# Set the title for this page.
|
# Set the title for this page.
|
||||||
title_prefix = site.config['category_title_prefix'] || 'Category: '
|
title_prefix = site.config['category_title_prefix'] || 'Category: '
|
||||||
@ -94,11 +94,13 @@ module Jekyll
|
|||||||
self.pages << index
|
self.pages << index
|
||||||
|
|
||||||
# Create an Atom-feed for each index.
|
# Create an Atom-feed for each index.
|
||||||
feed = CategoryFeed.new(self, self.source, category_dir, category)
|
if self.config['category_feeds']
|
||||||
feed.render(self.layouts, site_payload)
|
feed = CategoryFeed.new(self, self.source, category_dir, category)
|
||||||
feed.write(self.dest)
|
feed.render(self.layouts, site_payload)
|
||||||
# Record the fact that this page has been added, otherwise Site::cleanup will remove it.
|
feed.write(self.dest)
|
||||||
self.pages << feed
|
# Record the fact that this page has been added, otherwise Site::cleanup will remove it.
|
||||||
|
self.pages << feed
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Loops through the list of category pages and processes each one.
|
# Loops through the list of category pages and processes each one.
|
||||||
|
@ -79,6 +79,17 @@ module OctopressLiquidFilters
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Prepend a local url with a file path
|
||||||
|
# remote urls and urls beginning with ! will be ignored
|
||||||
|
def prepend_url(input, path='')
|
||||||
|
path += '/' unless path.match /\/$/
|
||||||
|
if input.match /^!/
|
||||||
|
input.gsub(/^(!)(.+)/, '\2')
|
||||||
|
else
|
||||||
|
input.gsub(/^(\/)?([^:]+?)$/, "#{path}"+'\2')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Improved version of Liquid's truncate:
|
# Improved version of Liquid's truncate:
|
||||||
# - Doesn't cut in the middle of a word.
|
# - Doesn't cut in the middle of a word.
|
||||||
# - Uses typographically correct ellipsis (…) insted of '...'
|
# - Uses typographically correct ellipsis (…) insted of '...'
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
# Monkeypatch for Jekyll
|
|
||||||
# Introduce distinction between preview/productive site generation
|
|
||||||
# so posts with YAML attribute `published: false` can be previewed
|
|
||||||
# on localhost without being published to the productive environment.
|
|
||||||
|
|
||||||
module Jekyll
|
|
||||||
|
|
||||||
class Site
|
|
||||||
# Read all the files in <source>/<dir>/_posts and create a new Post
|
|
||||||
# object with each one.
|
|
||||||
#
|
|
||||||
# dir - The String relative path of the directory to read.
|
|
||||||
#
|
|
||||||
# Returns nothing.
|
|
||||||
def read_posts(dir)
|
|
||||||
base = File.join(self.source, dir, '_posts')
|
|
||||||
return unless File.exists?(base)
|
|
||||||
entries = Dir.chdir(base) { filter_entries(Dir['**/*']) }
|
|
||||||
|
|
||||||
# first pass processes, but does not yet render post content
|
|
||||||
entries.each do |f|
|
|
||||||
if Post.valid?(f)
|
|
||||||
post = Post.new(self, self.source, dir, f)
|
|
||||||
|
|
||||||
# Monkeypatch:
|
|
||||||
# On preview environment (localhost), publish all posts
|
|
||||||
if ENV.has_key?('OCTOPRESS_ENV') && ENV['OCTOPRESS_ENV'] == 'preview' && post.data.has_key?('published') && post.data['published'] == false
|
|
||||||
post.published = true
|
|
||||||
# Set preview mode flag (if necessary), `rake generate` will check for it
|
|
||||||
# to prevent pushing preview posts to productive environment
|
|
||||||
File.open(".preview-mode", "w") {}
|
|
||||||
end
|
|
||||||
|
|
||||||
if post.published && (self.future || post.date <= self.time)
|
|
||||||
self.posts << post
|
|
||||||
post.categories.each { |c| self.categories[c] << post }
|
|
||||||
post.tags.each { |c| self.tags[c] << post }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
self.posts.sort!
|
|
||||||
|
|
||||||
# limit the posts if :limit_posts option is set
|
|
||||||
self.posts = self.posts[-limit_posts, limit_posts] if limit_posts
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -32,7 +32,7 @@ module Jekyll
|
|||||||
|
|
||||||
def render(context)
|
def render(context)
|
||||||
output = super
|
output = super
|
||||||
if output.join =~ /\{"\s*(.+)\s*"\}/
|
if output.join =~ /\{"\s*(.+?)\s*"\}/m
|
||||||
#@quote = $1
|
#@quote = $1
|
||||||
@quote = RubyPants.new($1).to_html
|
@quote = RubyPants.new($1).to_html
|
||||||
#@quote = CGI.escape($1)
|
#@quote = CGI.escape($1)
|
||||||
|
32
plugins/puts.rb
Normal file
32
plugins/puts.rb
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# Title: Puts Tag for Jekyll
|
||||||
|
# Author: Brandon Mathis http://brandonmathis.com
|
||||||
|
# Description: Puts is a liquid tag block which outputs its contents to the terminal
|
||||||
|
#
|
||||||
|
# Example Usage:
|
||||||
|
# Lets say you've assigned some variable you need to test.
|
||||||
|
# {% assign noun = "toaster" %}
|
||||||
|
#
|
||||||
|
# Drop it in a puts block along with a way to identify it in the output.
|
||||||
|
# {% puts %}
|
||||||
|
# Look out he's got a {{ noun }}.
|
||||||
|
# {% endputs %}
|
||||||
|
#
|
||||||
|
# Outputs:
|
||||||
|
# >>> {% puts %} <<<
|
||||||
|
# Look out he's got a toaster.
|
||||||
|
#
|
||||||
|
|
||||||
|
module Jekyll
|
||||||
|
class Puts < Liquid::Block
|
||||||
|
def initialize(tag_name, markup, tokens)
|
||||||
|
super
|
||||||
|
end
|
||||||
|
|
||||||
|
def render(context)
|
||||||
|
puts ">>> {% puts %} <<<"
|
||||||
|
puts super.map(&:strip).join
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Liquid::Template.register_tag('puts', Jekyll::Puts)
|
Loading…
x
Reference in New Issue
Block a user