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

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+
}

migrations/src/0_1_1_to_0_1_2.go

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package main
2+
3+
import (
4+
"os"
5+
"fmt"
6+
"github.com/mickep76/iodatafmt"
7+
"io/ioutil"
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 _, ok := d.(map[string]interface {})["taxonomies"]; ok {
28+
if _, ok := d.(map[string]interface{})["taxonomies"].(map[string]interface{})["archives"]; ok {
29+
fmt.Print("archives taxonomies already exists! No migration applied")
30+
os.Exit(0)
31+
}
32+
fmt.Print("Migrate\n=======\n\n[taxonomies]\n\tarchive = \"archives\"\n\naddded\n\n")
33+
d.(map[string]interface {})["taxonomies"].(map[string]interface{})["archives"] = "archive"
34+
}
35+
m, err := iodatafmt.Marshal(d, f)
36+
if err != nil {
37+
panic(fmt.Errorf("Unable to marshal config, %s", err))
38+
}
39+
ioutil.WriteFile(path + ".new", m, 0644)
40+
fmt.Printf("New configuration has been generated on %s", path + ".new")
41+
}

package.json

Lines changed: 2 additions & 11 deletions
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 Hugo blog framework",
55
"main": "Gruntfile.js",
66
"scripts": {
@@ -47,14 +47,5 @@
4747
"load-grunt-tasks": "~0.2.0",
4848
"rand-token": "^0.2.1"
4949
},
50-
"dependencies": {
51-
"async": "^1.5.2",
52-
"jsdom": "^8.1.0",
53-
"jquery": "^2.2.4",
54-
"marked": "^0.3.5",
55-
"mkdirp": "^0.5.1",
56-
"moment": "^2.13.0",
57-
"prompt": "^1.0.0",
58-
"strip-indent": "^1.0.1"
59-
}
50+
"dependencies": {}
6051
}

tasks/config/sails-linker.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = function(grunt) {
66
options: {
77
startTag: '<!--SCRIPTS-->',
88
endTag: '<!--SCRIPTS END-->',
9-
fileRef: function (filepath) {
9+
fileRef: function(filepath) {
1010
var tmpl = '<script src="%s" type="text/javascript"></script>';
1111
return util.format(tmpl, filepath.substring(filepath.indexOf("/")));
1212
},
@@ -20,7 +20,7 @@ module.exports = function(grunt) {
2020
options: {
2121
startTag: '<!--STYLES-->',
2222
endTag: '<!--STYLES END-->',
23-
fileRef: function (filepath) {
23+
fileRef: function(filepath) {
2424
var tmpl = '<link rel="stylesheet" href="%s" />';
2525
return util.format(tmpl, filepath.substring(filepath.indexOf("/")));
2626
},
@@ -34,7 +34,7 @@ module.exports = function(grunt) {
3434
options: {
3535
startTag: '<!--SCRIPTS-->',
3636
endTag: '<!--SCRIPTS END-->',
37-
fileRef: function (filepath) {
37+
fileRef: function(filepath) {
3838
var tmpl = '<script src="%s" type="text/javascript"></script>';
3939
return util.format(tmpl, filepath.substring(filepath.indexOf("/")));
4040
},
@@ -48,7 +48,7 @@ module.exports = function(grunt) {
4848
options: {
4949
startTag: '<!--STYLES-->',
5050
endTag: '<!--STYLES END-->',
51-
fileRef: function (filepath) {
51+
fileRef: function(filepath) {
5252
var tmpl = '<link rel="stylesheet" href="%s" />';
5353
return util.format(tmpl, filepath.substring(filepath.indexOf("/")));
5454
},

0 commit comments

Comments
 (0)