Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/parsiya/Hugo-Octopress.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsiya@gmail.com <parsiya@gmail.com>2016-07-31 22:10:48 +0300
committerparsiya@gmail.com <parsiya@gmail.com>2016-07-31 22:10:48 +0300
commitec419361f2d29a3e74ac53e96a883640578a7e5b (patch)
treee666ea80312defb8e785426eefb524bcebb8a760
parent16e73c1fde2317bebfb93b5942b572db4d5831e6 (diff)
Make all config parameters camel case and remove underscores
-rw-r--r--README.md28
-rw-r--r--layouts/404.html8
-rw-r--r--layouts/index.html4
-rw-r--r--layouts/partials/navigation.html4
-rw-r--r--layouts/partials/sidebar.html10
-rw-r--r--sample-config.toml20
6 files changed, 37 insertions, 37 deletions
diff --git a/README.md b/README.md
index ac9af1c..c6ded0a 100644
--- a/README.md
+++ b/README.md
@@ -60,10 +60,10 @@ post = "/blog/:year-:month-:day-:title/"
sidebarRecentLimit = 10
# sidebar customization - passed to markdownify
- sidebar_header = "Sidebar Header"
+ sidebarHeader = "Sidebar Header"
# sidebar text supports markdown
- sidebar_text = """Sidebar text supports is passed to *markdownify* so it supports markdown. Here's a [link to google](https://www.google.com)
+ sidebarText = """Sidebar text supports is passed to *markdownify* so it supports markdown. Here's a [link to google](https://www.google.com)
</br>
Second line
</br>
@@ -72,8 +72,8 @@ post = "/blog/:year-:month-:day-:title/"
# sidebar menu
# if true will add a sidebar menu between sidebar text and recent posts
- sidebar_menu_enabled = true
- sidebar_menu_header = "Sidebar Links"
+ sidebarMenuEnabled = true
+ sidebarMenuHeader = "Sidebar Links"
# if false, all of posts' content will appear on front page (and in pagination) - not recommended
# be sure to use the <!--more--> delimiter
@@ -88,7 +88,7 @@ post = "/blog/:year-:month-:day-:title/"
# text of the Continue Reading label - if not set, it will default to "Read On &rarr;"
# &rarr; == right arrow, but it gets messed up in the string so it is added to hugo-octopress/layouts/index.html manually
# this can be modified in hugo-octopress/layouts/index.html
- continue_reading = "Would you like to know more?"
+ continueReadingText = "Would you like to know more?"
# disqus - simply enter your disqus - using the template from https://gohugo.io/extras/comments/ at /hugo-octopress/layouts/partials/disqus.html that disables disqus when running on localhost (if you are testing it offline remember to comment out the if in the template that checks for localhost)
# the template is injected into the pages in /hugo-octopress/layouts/partials/post-footer.html which is in every post (and not non-post pages like license.html)
@@ -117,9 +117,9 @@ post = "/blog/:year-:month-:day-:title/"
tableOfContents = false
# 404.html header and text -both support markdown
- notfound_header = "There's nothing here"
+ notFoundHeader = "There's nothing here"
- notfound_text = """Please either go back or use the navigation/sidebar menus.
+ notFoundText = """Please either go back or use the navigation/sidebar menus.
"""
# Set to true to hide ReadingTime on posts
@@ -200,7 +200,7 @@ The search engine can also be customized in the `config.toml` file as follows:
[params]
# search engine parameter in the navigation menu
- search_engine_url = "https://www.google.com/search"
+ searchEngineURL = "https://www.google.com/search"
## <a name="sidebarlinks"></a>Sidebar
Sidebar has four parts from top to bottom:
@@ -215,8 +215,8 @@ The sidebar is generated using the partial template at `hugo-octopress/layouts/p
### <a name="sidebartext"></a>Sidebar text
Sidebar text has two parts and both can be configured in the config file. Both values are passed to `markdownify`. For example you can add links and new lines.
-* Sidebar header which appear on top in a `<h1>` tag. Can be configured in the config file through the `sidebar_header` tag.
-* Sidebar text appears under the header and can be configured by modifying the `sidebar_text` tag in the config file.
+* Sidebar header which appear on top in a `<h1>` tag. Can be configured in the config file through the `sidebarHeader` tag.
+* Sidebar text appears under the header and can be configured by modifying the `sidebarText` tag in the config file.
New lines can be added with `</br>` or normal markdown (two spaces at the end of line or two new lines). When adding two new lines, remember to remove the indentation in the config file otherwise the new line will be treated as a codeblock
@@ -239,9 +239,9 @@ If more than links are added, then add a `</br>` between the first four and the
Icons are from [http://fontawesome.io](http://fontawesome.io) by Dave Gandy. To use icons with square dark backgrounds add `-square`. For example `<i class="fa fa-twitter-square fa-3x"></i>`. Size can be from 1 to 5 or `fa-lg` to be adaptive.
### <a name="sidebarmenu"></a>Sidebar menu
-This menu can be enabled by setting the `sidebar_menu_enabled` to `true` in config file. It has two main parts:
+This menu can be enabled by setting the `sidebarMenuEnabled` to `true` in config file. It has two main parts:
-* A header that appears inside the `<h1>` at the top. It can be set in the config file using the `sidebar_menu_header`. This part only supports text.
+* A header that appears inside the `<h1>` at the top. It can be set in the config file using the `sidebarMenuHeader`. This part only supports text.
* A series of links. They can be set in the config file similar to navigation menus using the `[[menu.sidebar]]` tag as follows:
[[menu.sidebar]]
@@ -393,8 +393,8 @@ You can customize the `404.html` page in the config menu. For extensive customiz
There are two optional parameters in the config file and both support markdown:
-* notfound_header: 404 page title
-* notfound_text: 404 page text
+* notFoundHeader: 404 page title
+* notFoundText: 404 page text
If they are not set in the config file, a default page is generated.
diff --git a/layouts/404.html b/layouts/404.html
index 56d3a08..410b0fa 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -8,16 +8,16 @@
<article role="article">
<header>
<h1 class="entry-title">
- {{ if isset .Site.Params "notfound_header" }}
- {{ .Site.Params.notfound_header | markdownify }}
+ {{ if isset .Site.Params "notFoundHeader" }}
+ {{ .Site.Params.notFoundHeader | markdownify }}
{{ else }}
Not Found
{{ end }}
</h1>
</header>
<div id="blog-archives" class="category">
- {{ if isset .Site.Params "notfound_text" }}
- {{ .Site.Params.notfound_text | markdownify }}
+ {{ if isset .Site.Params "notFoundText" }}
+ {{ .Site.Params.notFoundText | markdownify }}
{{ else }}
Please either go back or use the navigation/sidebar menus.
{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
index 591dbe6..5b587a8 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -15,14 +15,14 @@
{{ else if .Description }}
{{ .Description }}
<footer>
- <a href="{{ .Permalink }}" rel="full-article">{{ if isset .Site.Params "continue_reading" }}{{ .Site.Params.continue_reading }} &rarr;{{ else }}Read On &rarr;{{ end }}</a>
+ <a href="{{ .Permalink }}" rel="full-article">{{ if isset .Site.Params "continueReadingText" }}{{ .Site.Params.continueReadingText }} &rarr;{{ else }}Read On &rarr;{{ end }}</a>
</footer>
{{ else }}
<p>{{ .Summary }}</p>
{{ if .Truncated }}
<footer>
- <a href="{{ .Permalink }}" rel="full-article">{{ if isset .Site.Params "continue_reading" }}{{ .Site.Params.continue_reading }} &rarr;{{ else }}Read On &rarr;{{ end }}</a>
+ <a href="{{ .Permalink }}" rel="full-article">{{ if isset .Site.Params "continueReadingText" }}{{ .Site.Params.continueReadingText }} &rarr;{{ else }}Read On &rarr;{{ end }}</a>
</footer>
{{ end }}
diff --git a/layouts/partials/navigation.html b/layouts/partials/navigation.html
index 9a141a7..2e5ae4e 100644
--- a/layouts/partials/navigation.html
+++ b/layouts/partials/navigation.html
@@ -23,8 +23,8 @@
</ul>
-{{ if isset .Site.Params "search_engine_url" }}
-<form action="{{ .Site.Params.search_engine_url }}" method="get" target="_blank">
+{{ if isset .Site.Params "searchEngineURL" }}
+<form action="{{ .Site.Params.searchEngineURL }}" method="get" target="_blank">
<fieldset role="search">
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
<input type="hidden" name="q" value="site:{{ "/" | absURL }}" />
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index dd218af..a22412b 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -3,12 +3,12 @@
<aside class="sidebar thirds">
<section class="first odd">
- {{ with .Site.Params.sidebar_header }}
+ {{ with .Site.Params.sidebarHeader }}
<h1>{{ . | markdownify }}</h1>
{{ end }}
<p>
- {{ with .Site.Params.sidebar_text }}
+ {{ with .Site.Params.sidebarText }}
{{ . | markdownify }}
{{ end }}
</p>
@@ -42,10 +42,10 @@
first we check if it is enabled in config file and then start adding the items
if Site.Params.sidebarNewWindow exists and is set to true then open these links in a new window -->
- {{ if eq .Site.Params.sidebar_menu_enabled true }}
+ {{ if eq .Site.Params.sidebarMenuEnabled true }}
<section class="odd">
- {{ if isset .Site.Params "sidebar_menu_header" }}
- <h1>{{ .Site.Params.sidebar_menu_header }}</h1>
+ {{ if isset .Site.Params "sidebarMenuHeader" }}
+ <h1>{{ .Site.Params.sidebarMenuHeader }}</h1>
{{ end }}
{{ range .Site.Menus.sidebar }}
<li>
diff --git a/sample-config.toml b/sample-config.toml
index 31a6c88..18f7255 100644
--- a/sample-config.toml
+++ b/sample-config.toml
@@ -46,8 +46,8 @@ post = "/blog/:year-:month-:day-:title/" # change the post URL to look like the
# sidebar menus
-# enable with "sidebar_menu_enabled = true" in [oarams]
-# header text is "sidebar_menu_header" in [params]
+# enable with "sidebarMenuEnabled = true" in [oarams]
+# header text is "sidebarMenuHeader" in [params]
[[menu.sidebar]]
Name = "Google"
URL = "https://www.google.com"
@@ -73,12 +73,12 @@ post = "/blog/:year-:month-:day-:title/" # change the post URL to look like the
sidebarRecentLimit = 10
# sidebar customization - passed to markdownify
- sidebar_header = "Sidebar Header"
+ sidebarHeader = "Sidebar Header"
# sidebar text supports markdown
# new lines can be added with </br> or normal markdown (two spaces at the end of line or two new lines).
# when adding two new lines, remember to remove the indentation otherwise the new line will be treated as a codeblock
- sidebar_text = """Sidebar text is passed to *markdownify* so it supports markdown. Here's a [link to google](https://www.google.com)
+ sidebarText = """Sidebar text is passed to *markdownify* so it supports markdown. Here's a [link to google](https://www.google.com)
</br>
Second line
</br>
@@ -87,8 +87,8 @@ post = "/blog/:year-:month-:day-:title/" # change the post URL to look like the
# sidebar menu
# if true will add a sidebar menu between sidebar text and recent posts
- sidebar_menu_enabled = true
- sidebar_menu_header = "Sidebar Links"
+ sidebarMenuEnabled = true
+ sidebarMenuHeader = "Sidebar Links"
# if false, all of the post will appear on front page (and in pagination)
truncate = true
@@ -100,10 +100,10 @@ post = "/blog/:year-:month-:day-:title/" # change the post URL to look like the
subtitle = "Subtitle appears under website title"
# used in the search engine
- search_engine_url = "https://www.google.com/search"
+ searchEngineURL = "https://www.google.com/search"
# Text of the Continue Reading label. &rarr; == right arrow, but it gets messed up in the string so we will add it to index.html manually
- continue_reading = "Would you like to know more?"
+ continueReadingText = "Would you like to know more?"
# Google analytics code
googleAnalytics = "google analytics"
@@ -139,9 +139,9 @@ post = "/blog/:year-:month-:day-:title/" # change the post URL to look like the
# custom_css = ["css/custom.css","css/custom2.css"]
# 404.html header and text -both support markdown
- notfound_header = "There's nothing here"
+ notFoundHeader = "There's nothing here"
- notfound_text = """Please either go back or use the navigation/sidebar menus.
+ notFoundText = """Please either go back or use the navigation/sidebar menus.
"""
# Set to true to hide ReadingTime on posts