diff options
author | Thibaud Lepretre <thibaud.lepretre@gmail.com> | 2016-11-17 01:26:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-17 01:26:47 +0300 |
commit | 551490149daf63ff6e65a3dd209f223d623fbdcf (patch) | |
tree | 7beabeb293f77e1f1626f201dbcea1cbb9f0edc4 | |
parent | 1556ae22bade22f091b13e1771909a77f7ae82c7 (diff) | |
parent | 243b55de55e5d8ca498161000c0ff91648057b4c (diff) |
Merge pull request #47 from kakawait/develop0.1.4-ALPHA
[Release] 0.1.4-ALPHA
-rw-r--r-- | CHANGELOG.md | 34 | ||||
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | bower.json | 2 | ||||
-rw-r--r-- | docs/developer.md | 2 | ||||
-rw-r--r-- | docs/user.md | 2 | ||||
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md | 10 | ||||
-rw-r--r-- | migrations/README.md | 53 | ||||
-rw-r--r-- | migrations/src/0_1_0_to_0_1_1.go | 44 | ||||
-rw-r--r-- | migrations/src/0_1_1_to_0_1_2.go | 41 | ||||
-rw-r--r-- | package.json | 2 |
11 files changed, 45 insertions, 155 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f83f878..afa100f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## [0.1.4-ALPHA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/9) - 16 nov 2016 + +- Remove migration scripts ([#45](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/45)) + ## [0.1.3-ALPHA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/8) - 16 nov 2016 - Remove unused npm deps ([#43](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/43)) @@ -11,8 +15,36 @@ All notable changes to this project will be documented in this file. - Fix *archives* pages generation by creating `archive` taxonomy ([#31](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/31)) - Use `slug` instead of `title` for *permalink* urls ([#33](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/33)) +### Migration + +- [archive page return 404](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/31) + +Add + +```toml +[taxonomies] + archive = "archives" +``` + ## [0.1.1-ALPHA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/6) - 13 nov 2016 - 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)) - **[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)) -- Add parameter to choose between sync/async loading of *Google Analytics* `params.ga.async` ([#21](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/21))
\ No newline at end of file +- Add parameter to choose between sync/async loading of *Google Analytics* `params.ga.async` ([#21](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/21)) + +### Migration + +- [Migrate google analytics](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/21) + +Replace + +```toml +[params] + google_analytics_id = "UA-XXX-X" +``` + +to (top level) + +```toml +googleAnalytics = "UA-XXX-X" +```
\ No newline at end of file @@ -8,11 +8,9 @@ A gorgeous responsive theme for Hugo blog framework. **ATTENTION** during *alpha* or *beta* [versions](https://github.com/kakawait/hugo-tranquilpeak-theme/milestones) breaking changes are possible on config file. -You can track [breaking changes label](https://github.com/kakawait/hugo-tranquilpeak-theme/issues?q=is%3Aissue+is%3Aopen+label%3A%22breaking+changes%22) or simply read [CHANGELOG.md](https://github.com/kakawait/hugo-tranquilpeak-theme/CHANGELOG.md). +You can track [breaking changes label](https://github.com/kakawait/hugo-tranquilpeak-theme/issues?q=is%3Aissue+is%3Aopen+label%3A%22breaking+changes%22). -Moreover you can use `migrators` from `migrators` folders. Migration scripts will produces a new config file with suffix `.new`, it will not override your current config. Indeed migration scripts will erase any comments and formating, that why migration scripts will not override your config. - -Any modifications are printed on output to allow you reproduce/replay migrations on your own config file manually. +How can I migrate my current version? Please read [CHANGELOG.md](https://github.com/kakawait/hugo-tranquilpeak-theme/CHANGELOG.md). ## Credits @@ -36,7 +34,7 @@ Please all the credit should be attributed to [original *Hexo* version](https:// ## General - **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud Leprêtre (kakawait)](https://github.com/kakawait) -- **Version**: 0.1.3-ALPHA (based on Hexo version 1.9.1) +- **Version**: 0.1.4-ALPHA (based on Hexo version 1.9.1) - **Compatibility**: Hugo v0.17 ## Features @@ -1,6 +1,6 @@ { "name": "hugo-tranquilpeak-theme", - "version": "0.1.3-ALPHA", + "version": "0.1.4-ALPHA", "description": "A gorgeous responsive theme for Hexo blog framework", "authors": [ "Thibaud Leprêtre" diff --git a/docs/developer.md b/docs/developer.md index b0aad76..44ceaaf 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -28,7 +28,7 @@ If you want to report a bug or ask a question, [create an issue](https://github. ## General ## - **Author** : Thibaud Leprêtre -- **Version** : 0.1.3-ALPHA (based on Hexo version 1.9.1) +- **Version** : 0.1.4-ALPHA (based on Hexo version 1.9.1) - **Compatibility** : Hugo v0.17 ## Requirements ## diff --git a/docs/user.md b/docs/user.md index 72f5df9..94a97d8 100644 --- a/docs/user.md +++ b/docs/user.md @@ -48,7 +48,7 @@ If you want to report a bug or ask a question, [create an issue](https://github. ## General - **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud Leprêtre (kakawait)](https://github.com/kakawait) -- **Version**: 0.1.3-ALPHA (based on Hexo version 1.9.1) +- **Version**: 0.1.4-ALPHA (based on Hexo version 1.9.1) - **Compatibility**: Hugo v0.17 ## Features diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 8d62872..5ddc6e8 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,5 +1,5 @@ # Tranquilpeak -# Version : 0.1.3-ALPHA +# Version : 0.1.4-ALPHA # Author : Thibaud Leprêtre # I STRONGLY recommend you to use a CDN to speed up loading of pages. diff --git a/exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md b/exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md index c5bd2d1..acb174d 100644 --- a/exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md +++ b/exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md @@ -1,5 +1,5 @@ --- -title: "Welcome to Tranquilpeak 0.1.3" +title: "Welcome to Tranquilpeak 0.1.4" date: 2015-06-15 categories: - tranquilpeak @@ -39,11 +39,9 @@ A gorgeous responsive theme for Hugo blog framework **ATTENTION** during *alpha* or *beta* [versions](https://github.com/kakawait/hugo-tranquilpeak-theme/milestones) breaking changes are possible on config file. -You can track [breaking changes label](https://github.com/kakawait/hugo-tranquilpeak-theme/issues?q=is%3Aissue+is%3Aopen+label%3A%22breaking+changes%22) or simply read [CHANGELOG.md](https://github.com/kakawait/hugo-tranquilpeak-theme/CHANGELOG.md). +You can track [breaking changes label](https://github.com/kakawait/hugo-tranquilpeak-theme/issues?q=is%3Aissue+is%3Aopen+label%3A%22breaking+changes%22). -Moreover you can use `migrators` from `migrators` folders. Migration scripts will produces a new config file with suffix `.new`, it will not override your current config. Indeed migration scripts will erase any comments and formating, that why migration scripts will not override your config. - -Any modifications are printed on output to allow you reproduce/replay migrations on your own config file manually. +How can I migrate my current version? Please read [CHANGELOG.md](https://github.com/kakawait/hugo-tranquilpeak-theme/CHANGELOG.md). ## Credits @@ -67,7 +65,7 @@ Please all the credit should be attributed to [original *Hexo* version](https:// ## General - **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud Leprêtre (kakawait)](https://github.com/kakawait) -- **Version**: 0.1.3-ALPHA (based on Hexo version 1.9.1) +- **Version**: 0.1.4-ALPHA (based on Hexo version 1.9.1) - **Compatibility**: Hugo v0.17 ## Features diff --git a/migrations/README.md b/migrations/README.md deleted file mode 100644 index b5d0511..0000000 --- a/migrations/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# Migrations - -## 0.1.1-ALPHA to 0.1.2-ALPHA - -### References - -- [archive page return 404](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/31) - -### Using migration script - -```bash -./0_1_1_to_0_1_2 /path/to/config.toml -``` - -Should works with `.toml`, `.yml` and `.json` - -### Manually - -Add - -```toml -[taxonomies] - archive = "archives" -``` - -## 0.1.0-ALPHA to 0.1.1-ALPHA - -### References - -- [Migrate google analytics](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/21) - -### Using migration script - -```bash -./0_1_0_to_0_1_1 /path/to/config.toml -``` - -Should works with `.toml`, `.yml` and `.json` - -### Manually - -Replace - -```toml -[params] - google_analytics_id = "UA-XXX-X" -``` - -to (top level) - -```toml -googleAnalytics = "UA-XXX-X" -```
\ No newline at end of file diff --git a/migrations/src/0_1_0_to_0_1_1.go b/migrations/src/0_1_0_to_0_1_1.go deleted file mode 100644 index 0ee5e02..0000000 --- a/migrations/src/0_1_0_to_0_1_1.go +++ /dev/null @@ -1,44 +0,0 @@ -package main - -import ( - "os" - "fmt" - "io/ioutil" - "github.com/mickep76/iodatafmt" -) - -func main() { - if len(os.Args) < 2 { - fmt.Print("Missing first parameter: file config.{toml,json,yml} path") - os.Exit(1) - } - path := os.Args[1] - if _, err := os.Stat(path); os.IsNotExist(err) { - panic(fmt.Errorf("Unable to find config file using path \"%s\", %s", path, err)) - } - f, err := iodatafmt.FileFormat(path) - if err != nil { - panic(fmt.Errorf("Unable to determine format of given config file \"%s\", %s", path, err)) - } - d, err := iodatafmt.Load(path, f) - if err != nil { - panic(fmt.Errorf("Unable to read config from given file \"%s\", %s", path, err)) - } - if val, ok := d.(map[string]interface {})["googleAnalytics"]; ok { - fmt.Printf("googleAnalytics value already exists with: \"%s\"! No migration applied", val) - os.Exit(0) - } - if _, ok := d.(map[string]interface {})["params"]; ok { - if val, ok := d.(map[string]interface {})["params"].(map[string]interface {})["google_analytics_id"]; ok { - fmt.Printf("Migrate\n=======\n\n[params]\n\tgoogle_analytics_id = %s\n\nto\n\ngoogleAnalytics = %s\n\n", val, val) - d.(map[string]interface {})["googleAnalytics"] = val - delete(d.(map[string]interface {})["params"].(map[string]interface {}), "google_analytics_id") - } - } - m, err := iodatafmt.Marshal(d, f) - if err != nil { - panic(fmt.Errorf("Unable to marshal config, %s", err)) - } - ioutil.WriteFile(path + ".new", m, 0644) - fmt.Printf("New configuration has been generated on %s", path + ".new") -} diff --git a/migrations/src/0_1_1_to_0_1_2.go b/migrations/src/0_1_1_to_0_1_2.go deleted file mode 100644 index a311147..0000000 --- a/migrations/src/0_1_1_to_0_1_2.go +++ /dev/null @@ -1,41 +0,0 @@ -package main - -import ( - "os" - "fmt" - "github.com/mickep76/iodatafmt" - "io/ioutil" -) - -func main() { - if len(os.Args) < 2 { - fmt.Print("Missing first parameter: file config.{toml,json,yml} path") - os.Exit(1) - } - path := os.Args[1] - if _, err := os.Stat(path); os.IsNotExist(err) { - panic(fmt.Errorf("Unable to find config file using path \"%s\", %s", path, err)) - } - f, err := iodatafmt.FileFormat(path) - if err != nil { - panic(fmt.Errorf("Unable to determine format of given config file \"%s\", %s", path, err)) - } - d, err := iodatafmt.Load(path, f) - if err != nil { - panic(fmt.Errorf("Unable to read config from given file \"%s\", %s", path, err)) - } - if _, ok := d.(map[string]interface {})["taxonomies"]; ok { - if _, ok := d.(map[string]interface{})["taxonomies"].(map[string]interface{})["archives"]; ok { - fmt.Print("archives taxonomies already exists! No migration applied") - os.Exit(0) - } - fmt.Print("Migrate\n=======\n\n[taxonomies]\n\tarchive = \"archives\"\n\naddded\n\n") - d.(map[string]interface {})["taxonomies"].(map[string]interface{})["archives"] = "archive" - } - m, err := iodatafmt.Marshal(d, f) - if err != nil { - panic(fmt.Errorf("Unable to marshal config, %s", err)) - } - ioutil.WriteFile(path + ".new", m, 0644) - fmt.Printf("New configuration has been generated on %s", path + ".new") -} diff --git a/package.json b/package.json index 1bb8937..766263c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-tranquilpeak-theme", - "version": "0.1.3-ALPHA", + "version": "0.1.4-ALPHA", "description": "A gorgeous responsive theme for Hugo blog framework", "main": "Gruntfile.js", "scripts": { |