diff options
author | IChou <me@ichou.cn> | 2018-06-17 21:15:07 +0300 |
---|---|---|
committer | IChou <me@ichou.cn> | 2018-06-17 21:15:07 +0300 |
commit | 4e1c132758711482215fbba69cabc992492695bc (patch) | |
tree | 164230952df85d1a0a02a4c0345fdda809abe76b | |
parent | 2d886473436c2c90dc7dd658a9e795143c3f244b (diff) | |
parent | 68891d32943acd69c0cb0a61d877f24824b40177 (diff) |
Merge branch 'master' of github.com:IvanChou/hugo-theme-vec
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | archetypes/default.md | 2 | ||||
-rw-r--r-- | exampleSite/config.toml | 10 | ||||
-rw-r--r-- | layouts/index.html | 16 |
4 files changed, 31 insertions, 13 deletions
@@ -18,6 +18,22 @@ git clone https://github.com/IvanChou/hugo-theme-vec vec See the [official docs](http://gohugo.io/themes/installing) for more information. +## Quickstart Guide + +Make sure you have : + +1. Hugo installed +2. Test poject setup with hugo. Instructions on [hugo quickstart guide](https://gohugo.io/overview/quickstart/). +3. Cloned this repo in the themes folder. + +The [exampleSite](exampleSite) folder contains a sample site to quickly get started. + +Copy over the contents of ```config.toml``` and copy the [content](exampleSite/content) and [static](exampleSite/static) folders to your main folder. + +Build using ```hugo server --buildDrafts``` + +To create a post use ```hugo new post/post-title.md``` + ## Configuration You should config your site's `config.toml` file like: diff --git a/archetypes/default.md b/archetypes/default.md index 9fbecf2..d491519 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -3,4 +3,6 @@ toc = false draft = true comments = false slug = "" +title = "{{ replace .TranslationBaseName "-" " " | title }}" +date = {{ .Date }} +++
\ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index f18d1f3..92404e9 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -20,16 +20,16 @@ googleAnalytics = "UA-57408564-1" name = "faq" weight = 2 url = "/faq" - + [params] Keywords = "key, 关键字, キーワード" Description = "There are some words to describe your site" - Avater = "img/avatar.jpg" - SelfIntro = "Just a worm, seek for true, live in shadow, no more..." + Avatar = "img/avatar.jpg" + SelfIntro = "Just a worm, seek for true, live in shadow, no more..." Email = "yiichou@gmail.com" - + GithubID = "Your Github ID" TwitterID = "Your Twitter ID" FacebookID = "Your Facebook ID" LinkedInID = "Your LinkedIn ID" - GoogleplusID = "Your Googleplus ID"
\ No newline at end of file + GoogleplusID = "Your Googleplus ID" diff --git a/layouts/index.html b/layouts/index.html index 5eba00c..9d736b1 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,20 +2,20 @@ <html lang="{{ .Site.LanguageCode }}"> <head> <title> {{ .Site.Title }} </title> - + {{ with .Site.Params.Keywords }}<meta name="keywords" content="{{.}}">{{ end }} {{ with .Site.Params.Description }}<meta name="description" content="{{.}}">{{ end }} - + {{ partial "head.html" . }} - + </head> <body class="index"> {{ partial "header.html" . }} - + <section class="user-profile"> <figure class="user-avatar"> - <img alt="avater" src="{{ .Site.Params.Avater }}"> + <img alt="avatar" src="{{ .Site.Params.Avatar }}"> <figcaption class="user-socials"> {{ with .Site.Params.TwitterID }} <a href="https://twitter.com/{{.}}" title="Twitter"><i class="fab fa-twitter-square" aria-hidden="true"></i></a> @@ -32,14 +32,14 @@ {{ with .Site.Params.LinkedInID }} <a href="http://linkedin.com/in/{{.}}" title="LinkedIn"><i class="fab fa-linkedin-square" aria-hidden="true"></i></a> {{ end }} - + </figcaption> </figure> <p class="user-motivation">{{ .Site.Params.SelfIntro }}</p> </section> - + {{ partial "footer.html" . }} {{ partial "analytics.html" . }} </body> -</html>
\ No newline at end of file +</html> |