Skip to content

Commit 1556ae2

Browse files
authored
Merge pull request #44 from kakawait/develop
[Release] 0.1.3-ALPHA
2 parents 44a8961 + f22a118 commit 1556ae2

File tree

13 files changed

+104
-24
lines changed

13 files changed

+104
-24
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [0.1.2-ALPHA] 16 nov 2016
5+
## [0.1.3-ALPHA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/8) - 16 nov 2016
6+
7+
- Remove unused npm deps ([#43](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/43))
8+
9+
## [0.1.2-ALPHA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/7) - 16 nov 2016
610

711
- Fix *archives* pages generation by creating `archive` taxonomy ([#31](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/31))
812
- Use `slug` instead of `title` for *permalink* urls ([#33](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/33))
913

10-
## [0.1.1-ALPHA] 13 nov 2016
14+
## [0.1.1-ALPHA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/6) - 13 nov 2016
1115

1216
- Upgrade *Google Analytics* script to do not use anymore `ga.js` which is now deprecated ([#21](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/21))
1317
- **[Breaking changes]** Changes *Google Analytics* config key from `params.google_analytics_id` to official `googleAnalytics` ([#21](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/21))

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Please all the credit should be attributed to [original *Hexo* version](https://
3636
## General
3737

3838
- **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud Leprêtre (kakawait)](https://github.com/kakawait)
39-
- **Version**: 0.1.2-ALPHA (based on Hexo version 1.9.1)
39+
- **Version**: 0.1.3-ALPHA (based on Hexo version 1.9.1)
4040
- **Compatibility**: Hugo v0.17
4141

4242
## Features

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hugo-tranquilpeak-theme",
3-
"version": "0.1.2-ALPHA",
3+
"version": "0.1.3-ALPHA",
44
"description": "A gorgeous responsive theme for Hexo blog framework",
55
"authors": [
66
"Thibaud Leprêtre"

docs/developer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you want to report a bug or ask a question, [create an issue](https://github.
2828
## General ##
2929

3030
- **Author** : Thibaud Leprêtre
31-
- **Version** : 0.1.2-ALPHA (based on Hexo version 1.9.1)
31+
- **Version** : 0.1.3-ALPHA (based on Hexo version 1.9.1)
3232
- **Compatibility** : Hugo v0.17
3333

3434
## Requirements ##

docs/user.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ If you want to report a bug or ask a question, [create an issue](https://github.
4848
## General
4949

5050
- **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud Leprêtre (kakawait)](https://github.com/kakawait)
51-
- **Version**: 0.1.2-ALPHA (based on Hexo version 1.9.1)
51+
- **Version**: 0.1.3-ALPHA (based on Hexo version 1.9.1)
5252
- **Compatibility**: Hugo v0.17
5353

5454
## Features

exampleSite/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Tranquilpeak
2-
# Version : 0.1.2-ALPHA
2+
# Version : 0.1.3-ALPHA
33
# Author : Thibaud Leprêtre
44

55
# I STRONGLY recommend you to use a CDN to speed up loading of pages.

exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Welcome to Tranquilpeak 0.1.2"
2+
title: "Welcome to Tranquilpeak 0.1.3"
33
date: 2015-06-15
44
categories:
55
- tranquilpeak
@@ -67,7 +67,7 @@ Please all the credit should be attributed to [original *Hexo* version](https://
6767
## General
6868

6969
- **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud Leprêtre (kakawait)](https://github.com/kakawait)
70-
- **Version**: 0.1.2-ALPHA (based on Hexo version 1.9.1)
70+
- **Version**: 0.1.3-ALPHA (based on Hexo version 1.9.1)
7171
- **Compatibility**: Hugo v0.17
7272

7373
## Features

exampleSite/content/post/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%86%E3%82%B9%E3%83%88.md renamed to exampleSite/content/post/日本語テスト.md

File renamed without changes.

migrations/src/0_1_0_to_0_1_1.go

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package main
2+
3+
import (
4+
"os"
5+
"fmt"
6+
"io/ioutil"
7+
"github.com/mickep76/iodatafmt"
8+
)
9+
10+
func main() {
11+
if len(os.Args) < 2 {
12+
fmt.Print("Missing first parameter: file config.{toml,json,yml} path")
13+
os.Exit(1)
14+
}
15+
path := os.Args[1]
16+
if _, err := os.Stat(path); os.IsNotExist(err) {
17+
panic(fmt.Errorf("Unable to find config file using path \"%s\", %s", path, err))
18+
}
19+
f, err := iodatafmt.FileFormat(path)
20+
if err != nil {
21+
panic(fmt.Errorf("Unable to determine format of given config file \"%s\", %s", path, err))
22+
}
23+
d, err := iodatafmt.Load(path, f)
24+
if err != nil {
25+
panic(fmt.Errorf("Unable to read config from given file \"%s\", %s", path, err))
26+
}
27+
if val, ok := d.(map[string]interface {})["googleAnalytics"]; ok {
28+
fmt.Printf("googleAnalytics value already exists with: \"%s\"! No migration applied", val)
29+
os.Exit(0)
30+
}
31+
if _, ok := d.(map[string]interface {})["params"]; ok {
32+
if val, ok := d.(map[string]interface {})["params"].(map[string]interface {})["google_analytics_id"]; ok {
33+
fmt.Printf("Migrate\n=======\n\n[params]\n\tgoogle_analytics_id = %s\n\nto\n\ngoogleAnalytics = %s\n\n", val, val)
34+
d.(map[string]interface {})["googleAnalytics"] = val
35+
delete(d.(map[string]interface {})["params"].(map[string]interface {}), "google_analytics_id")
36+
}
37+
}
38+
m, err := iodatafmt.Marshal(d, f)
39+
if err != nil {
40+
panic(fmt.Errorf("Unable to marshal config, %s", err))
41+
}
42+
ioutil.WriteFile(path + ".new", m, 0644)
43+
fmt.Printf("New configuration has been generated on %s", path + ".new")
44+
}

0 commit comments

Comments
 (0)