From d9383354bff0c2f720535f9d27cd43720be4b135 Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Sun, 27 Jan 2019 16:23:28 +0000 Subject: [PATCH] Add sitemap and fully automate article creation Article pages now insert the cover images automatically & an excerpt is used instead of a description for the page description. --- _includes/head.html | 2 +- _layouts/article.html | 8 ++ _posts/2019-01-01-article-name.md | 16 +-- _site/articles/2019/01/01/article-name.html | 45 ++---- _site/articles/2019/01/01/article_name.html | 144 -------------------- _site/articles/2019/01/02/article-name.html | 144 -------------------- _site/index.html | 68 +-------- _site/sitemap.xml | 27 ++++ sitemap.xml | 25 ++++ 9 files changed, 82 insertions(+), 397 deletions(-) delete mode 100644 _site/articles/2019/01/01/article_name.html delete mode 100644 _site/articles/2019/01/02/article-name.html create mode 100644 _site/sitemap.xml create mode 100644 sitemap.xml diff --git a/_includes/head.html b/_includes/head.html index aefccf3..bdf47c2 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -20,7 +20,7 @@ {{ page.title }} | Reading School - + diff --git a/_layouts/article.html b/_layouts/article.html index c854fcc..59881bc 100644 --- a/_layouts/article.html +++ b/_layouts/article.html @@ -15,6 +15,14 @@

{{ page.title }}

+

+ + | by {{ page.authors }} +

+
+ +
{{ page.image-caption }}
+
{{ content }}
diff --git a/_posts/2019-01-01-article-name.md b/_posts/2019-01-01-article-name.md index 7860783..35cca1e 100644 --- a/_posts/2019-01-01-article-name.md +++ b/_posts/2019-01-01-article-name.md @@ -1,18 +1,10 @@ --- -title: Title1 -description: An article description1 -layout: article -categories: articles +title: Title date: 2019-01-01 7:01 authors: Name +image-caption: A brass statue of a child, in a garden +layout: article +categories: articles --- -

- - | by {{ page.authors }} -

-
- -
A brass statue of a child, in a garden
-
Content diff --git a/_site/articles/2019/01/01/article-name.html b/_site/articles/2019/01/01/article-name.html index a69ddb0..8cd823a 100644 --- a/_site/articles/2019/01/01/article-name.html +++ b/_site/articles/2019/01/01/article-name.html @@ -14,15 +14,16 @@ - + - Title1 | Reading School - + Title | Reading School + @@ -73,30 +74,12 @@

Articles

- - - Title1 - - - - - Title1 - - - Title1 + Title
-
-

Authors

- - - Name - - -
@@ -122,16 +105,16 @@
-

Title1

+

Title

- - | by Name -

-
- -
A brass statue of a child, in a garden
-
-

Content

+ + | by Name + +
+ +
A brass statue of a child, in a garden
+
+

Content

diff --git a/_site/articles/2019/01/01/article_name.html b/_site/articles/2019/01/01/article_name.html deleted file mode 100644 index 28a17cd..0000000 --- a/_site/articles/2019/01/01/article_name.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Title1 | Reading School - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Just to let you know, we use cookies on our site.

-

OK

-
- - - - - -
- - -
-
-
-
- menu - BBC Young Reporter | Reading School -
- -
-
- - -
-
-

Title1

-

- - | by Name -

-
- -
A brass statue of a child, in a garden
-
-

Content

- -
-
- - -
- - diff --git a/_site/articles/2019/01/02/article-name.html b/_site/articles/2019/01/02/article-name.html deleted file mode 100644 index 437ccbd..0000000 --- a/_site/articles/2019/01/02/article-name.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Title1 | Reading School - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Just to let you know, we use cookies on our site.

-

OK

-
- - - - - -
- - -
-
-
-
- menu - BBC Young Reporter | Reading School -
- -
-
- - -
-
-

Title1

-

- - | by Name -

-
- -
A brass statue of a child, in a garden
-
-

Content

- -
-
- - -
- - diff --git a/_site/index.html b/_site/index.html index 1fb94ed..9af7197 100644 --- a/_site/index.html +++ b/_site/index.html @@ -22,7 +22,7 @@ BBC Young Reporter | Reading School - + @@ -73,30 +73,12 @@

Articles

- - - Title1 - - - - - Title1 - - - Title1 + Title
-
-

Authors

- - - Name - - -
@@ -123,54 +105,10 @@
-
-
-
-

Title1

-

- - | by Name -

-
-
-
- -
-
-
- - - -
-
-
-

Title1

-

- - | by Name -

-
-
-
- -
-
-
- - -
-

Title1

+

Title

| by Name diff --git a/_site/sitemap.xml b/_site/sitemap.xml new file mode 100644 index 0000000..dbc6304 --- /dev/null +++ b/_site/sitemap.xml @@ -0,0 +1,27 @@ + + + + + / + 2019-01-27 + daily + 0.5 + + + + /sitemap.xml + 2019-01-27 + daily + 0.5 + + + + + + /articles/2019/01/01/article-name.html + 2019-01-27 + daily + 0.5 + + + diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..78f7a83 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,25 @@ +--- +layout: none +search: exclude +--- + + + + {% for page in site.pages %} + + {{ page.url }} + {{ site.time | date: '%Y-%m-%d' }} + daily + 0.5 + + {% endfor %} + + {% for post in site.posts %} + + {{ post.url }} + {{ site.time | date: '%Y-%m-%d' }} + daily + 0.5 + + {% endfor %} +