From 6fd9f505d589502c603d5e0f115259ad9c52cf4a Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Tue, 3 Sep 2019 17:06:29 +0100 Subject: [PATCH] Revert "fix: move /about/ page to homepage" Revert 2cd9094dc56b9f3937a6ba58f24f9a52941f609e and d732bcc88b6579f0fbe6dd3c102badbb16c3e1ba --- _config.yml | 7 +++---- scripts/sitemap/.sitemap.xml | 2 +- source/_redirects | 4 ++-- source/about/index.md | 4 ++++ source/index.md | 3 --- themes/typing/layout/about.ejs | 22 ++++++++++++++++++++++ themes/typing/layout/index.ejs | 23 +---------------------- themes/typing/layout/layout.ejs | 3 ++- 8 files changed, 35 insertions(+), 33 deletions(-) create mode 100644 source/about/index.md delete mode 100644 source/index.md create mode 100644 themes/typing/layout/about.ejs mode change 100644 => 120000 themes/typing/layout/index.ejs diff --git a/_config.yml b/_config.yml index 091e9ad..7c534f7 100644 --- a/_config.yml +++ b/_config.yml @@ -98,8 +98,8 @@ theme_config: # Header menu: - Home: / - Blog: /blog/ + Home: /blog/ + About: /about/ Feed: /atom.xml GitLab: https://gitlab.com/curben/blog @@ -119,7 +119,6 @@ theme_config: # If "icons: true" link names will interpreted as fontawesome icon names # Use the forkawesome icon names (https://forkaweso.me/Fork-Awesome/icons/) without the fa- prefix links: - Home: / - Blog: /blog/ + Home: /blog/ Feed: /atom.xml GitLab: https://gitlab.com/curben/blog diff --git a/scripts/sitemap/.sitemap.xml b/scripts/sitemap/.sitemap.xml index 9c233cd..246cfd2 100644 --- a/scripts/sitemap/.sitemap.xml +++ b/scripts/sitemap/.sitemap.xml @@ -13,7 +13,7 @@ {# home page #} - {{ config.url + '/' | uriencode }} + {{ config.url + '/' + config.archive_dir + '/' | uriencode }} {{ sNow }} daily 1.0 diff --git a/source/_redirects b/source/_redirects index 214d9e6..2b4bc47 100644 --- a/source/_redirects +++ b/source/_redirects @@ -1,5 +1,5 @@ -# Move about page to homepage -/about/ / 302 +# Temporarily set the homepage to /blog +/ /blog/ 302 # Redirect post to /blog/ /:year/:month/:date/:slug /blog/:year/:month/:date/:slug/ 301 diff --git a/source/about/index.md b/source/about/index.md new file mode 100644 index 0000000..6209fb2 --- /dev/null +++ b/source/about/index.md @@ -0,0 +1,4 @@ +--- +title: About +layout: about +--- diff --git a/source/index.md b/source/index.md deleted file mode 100644 index f6278f0..0000000 --- a/source/index.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -layout: index ---- diff --git a/themes/typing/layout/about.ejs b/themes/typing/layout/about.ejs new file mode 100644 index 0000000..e2a85c0 --- /dev/null +++ b/themes/typing/layout/about.ejs @@ -0,0 +1,22 @@ +
+
+
+

<%= theme.nickname %>

+
+

<%- markdown(theme.description) %>

+
+
+
+
+
+ diff --git a/themes/typing/layout/index.ejs b/themes/typing/layout/index.ejs deleted file mode 100644 index e2a85c0..0000000 --- a/themes/typing/layout/index.ejs +++ /dev/null @@ -1,22 +0,0 @@ -
-
-
-

<%= theme.nickname %>

-
-

<%- markdown(theme.description) %>

-
-
-
-
-
- diff --git a/themes/typing/layout/index.ejs b/themes/typing/layout/index.ejs new file mode 120000 index 0000000..ff16854 --- /dev/null +++ b/themes/typing/layout/index.ejs @@ -0,0 +1 @@ +archive.ejs \ No newline at end of file diff --git a/themes/typing/layout/layout.ejs b/themes/typing/layout/layout.ejs index 6048e81..9f4984b 100644 --- a/themes/typing/layout/layout.ejs +++ b/themes/typing/layout/layout.ejs @@ -1,7 +1,8 @@ <%- partial('_partial/head') %> - <% if (is_home()) { %> + <%/* set /about page to use "home" page layout */%> + <% if (is_current('about/index.html')) { %> <% if (theme.dark) { %> <% } else { %>