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

github.com/aerohub/hugo-faq-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraerohub <aerohub@users.noreply.github.com>2016-09-23 08:52:53 +0300
committeraerohub <aerohub@users.noreply.github.com>2016-09-23 08:52:53 +0300
commit652c6308730f5d306ba3fc4fe4afd3da89139a55 (patch)
tree6f493dcfb69f27015eabbe7eb59481c350262469
parent2eaa8d89525e711450abadeabf14582278e521bb (diff)
Custom styling feature added
-rw-r--r--README.md11
-rw-r--r--exampleSite/config.toml10
-rw-r--r--layouts/index.html5
3 files changed, 23 insertions, 3 deletions
diff --git a/README.md b/README.md
index d4221e2..fcd88ea 100644
--- a/README.md
+++ b/README.md
@@ -2,12 +2,16 @@
You may use this theme for building very simple FAQs or note lists.
-**IMPORTANT!** This theme is just a dummy port of [FAQ Template](http://codyhouse.co/gem/css-faq-template/) by CodyHouse. My only goal was to understand how to build a FAQ page with Hugo. The original template contains no styles for text formatting, so this theme also does. Wanna styles? Just fork the repo and write them! There are original sass and css files in static folder. Don't forget to [share](//github.com/aerohub/hugo-faq-theme/pulls) your work with the community :smile:
+**IMPORTANT!** This theme is just a dummy port of [FAQ Template](http://codyhouse.co/gem/css-faq-template/) by CodyHouse. My only goal was to understand how to build a FAQ page with Hugo. The original template contains no styles for text formatting, so this theme also does. Wanna styles? Just fork the repo and write them! There are original sass and css files in static folder. Use [custom styling](#custom-styling) feature to override original css. Don't forget to [share](//github.com/aerohub/hugo-faq-theme/pulls) your work with the community :smile:
## Screenshot
![Me screenshot](https://raw.githubusercontent.com/aerohub/hugo-faq-theme/master/images/screenshot.png)
+## Demo
+
+You can see it in action on [Hugo Themes site](http://themes.gohugo.io/theme/hugo-faq-theme/).
+
## Contents
- [Installation](#installation)
@@ -15,6 +19,7 @@ You may use this theme for building very simple FAQs or note lists.
- [Copying files](#copying-files)
- [FAQ groups](#faq-groups)
- [Configuring menu](#configuring-menu)
+ - [Custom styling](#custom-styling)
- [Test your site](#test-your-site)
- [Contributing](#contributing)
- [License](#license)
@@ -73,6 +78,10 @@ In the Menu section of your `config.toml` you will find similar structure. The d
- `weight` is for ordering
- `url` is for linking a group (remember `id` from data file?)
+### Custom Styling
+
+To edit the css this theme uses, add your CSS to the assets folder then include it as part one of the `[params]` with the label `custom_css`. More information and an example can be found in the example [`config.toml`](//github.com/aerohub/hugo-faq-theme/blob/master/exampleSite/config.toml) file.
+
### Test your site
In order to see your site in action, run Hugo's built-in local server.
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 4d1adfe..0d8b370 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -35,4 +35,12 @@ SectionPagesMenu = "main"
[[menu.main]]
name = "Delivery"
weight = 60
- url = "#delivery" \ No newline at end of file
+ url = "#delivery"
+
+[params]
+
+ # Custom styling
+ # To customize the styling of this theme, uncomment and edit the following line to point
+ # to your site's css in the assets/ directory.
+
+ custom_css = ["css/blue.css"] \ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
index 15a0e7b..1798289 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -7,7 +7,10 @@
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/reset.css">
- <link rel="stylesheet" href="{{ .Site.BaseURL }}css/blue.css">
+ <link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css">
+ {{ range .Site.Params.custom_css }}
+ <link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}">
+ {{ end }}
<script src="{{ .Site.BaseURL }}js/modernizr.js"></script>
<title>{{ .Site.Title }}</title>
</head>