From bd70cb57a6d8ad4f9c3c40a201db487f7ccbc1d9 Mon Sep 17 00:00:00 2001 From: Sr WoOoW Date: Wed, 2 Sep 2015 20:30:31 +0200 Subject: [PATCH 1/2] go go go more speed for my hexo blog ! --- _config.yml.example | 1 + languages/es.yml | 30 ++++++++++++++++++++ layout/_partial/after-footer.ejs | 2 +- layout/_partial/google_site_verification.ejs | 4 +++ layout/_partial/head.ejs | 4 +-- 5 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 languages/es.yml create mode 100644 layout/_partial/google_site_verification.ejs diff --git a/_config.yml.example b/_config.yml.example index 386f892..ce8985c 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -41,6 +41,7 @@ links: Hexo: http://hexo.io # Miscellaneous +google_site_verification: google_analytics: favicon: favicon.png twitter: diff --git a/languages/es.yml b/languages/es.yml new file mode 100644 index 0000000..964f169 --- /dev/null +++ b/languages/es.yml @@ -0,0 +1,30 @@ +#By SrWoOoW +index: + home: 'Inicio' + search: 'Buscar' + archive: 'Archivo' + category: 'Categoria' + uncategorized: 'Sin categoría' + tag: 'Etiqueta' +nav: + next: 'Siguiente ' + prev: 'Anterior' + older: 'Más viejo' + newer: 'Más nuevo' +widget: + recents: 'Recientes' + archives: 'Archivos' + categories: 'Categorias' + links: 'Links' + tags: 'Etiquetas' + tag_cloud: 'Nube de etiquetas' +article: + comments: 'Comentarios' + share: 'Compartir' + catalogue: 'Catálogo' +profile: + follow: 'SEGUIR' + post: 'Entrada' + tag: 'Etiqueta' + posts: 'Entradas' + tags: 'Etiquetas' diff --git a/layout/_partial/after-footer.ejs b/layout/_partial/after-footer.ejs index 8cafae8..4b8a5ab 100644 --- a/layout/_partial/after-footer.ejs +++ b/layout/_partial/after-footer.ejs @@ -24,7 +24,7 @@ <% } %> - + <% if (theme.fancybox){ %> <%- css('fancybox/jquery.fancybox') %> diff --git a/layout/_partial/google_site_verification.ejs b/layout/_partial/google_site_verification.ejs new file mode 100644 index 0000000..ef41626 --- /dev/null +++ b/layout/_partial/google_site_verification.ejs @@ -0,0 +1,4 @@ +<% if (theme.google_site_verification){ %> + + +<% } %> diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 10f4ce8..c90bcea 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -28,8 +28,8 @@ <% if (theme.favicon){ %> <% } %> - - + + <%- css('css/style') %> <%- css('font-awesome/css/font-awesome.min') %> <%- partial('google-analytics') %> From 9b060f1e819d71b16eb088ea1ee79083e1ef1373 Mon Sep 17 00:00:00 2001 From: Sr WoOoW Date: Thu, 3 Sep 2015 17:01:24 +0200 Subject: [PATCH 2/2] v2 can change the cdn --- _config.yml.example | 3 +++ layout/_partial/after-footer.ejs | 2 +- layout/_partial/cdn_after_footer.ejs | 5 +++++ layout/_partial/cdn_head.ejs | 7 +++++++ layout/_partial/google_site_verification.ejs | 1 - layout/_partial/head.ejs | 4 ++-- 6 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 layout/_partial/cdn_after_footer.ejs create mode 100644 layout/_partial/cdn_head.ejs diff --git a/_config.yml.example b/_config.yml.example index ce8985c..bf18639 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -40,6 +40,9 @@ contacts: links: Hexo: http://hexo.io +# CDN +cdn: useso #If your site loads slowly change it to "google" , because "useso" is slow out of China + # Miscellaneous google_site_verification: google_analytics: diff --git a/layout/_partial/after-footer.ejs b/layout/_partial/after-footer.ejs index 4b8a5ab..0ebafce 100644 --- a/layout/_partial/after-footer.ejs +++ b/layout/_partial/after-footer.ejs @@ -24,7 +24,7 @@ <% } %> - +<%- partial('cdn_after_footer') %> <% if (theme.fancybox){ %> <%- css('fancybox/jquery.fancybox') %> diff --git a/layout/_partial/cdn_after_footer.ejs b/layout/_partial/cdn_after_footer.ejs new file mode 100644 index 0000000..9286bb4 --- /dev/null +++ b/layout/_partial/cdn_after_footer.ejs @@ -0,0 +1,5 @@ +<% if (theme.cdn == "google"){ %> + +<% } else if (theme.cdn == "useso"){ %> + +<% } %> diff --git a/layout/_partial/cdn_head.ejs b/layout/_partial/cdn_head.ejs new file mode 100644 index 0000000..31fc9b6 --- /dev/null +++ b/layout/_partial/cdn_head.ejs @@ -0,0 +1,7 @@ +<% if (theme.cdn == "google"){ %> + + +<% } else if (theme.cdn == "useso"){ %> + + +<% } %> diff --git a/layout/_partial/google_site_verification.ejs b/layout/_partial/google_site_verification.ejs index ef41626..cd0b1bf 100644 --- a/layout/_partial/google_site_verification.ejs +++ b/layout/_partial/google_site_verification.ejs @@ -1,4 +1,3 @@ <% if (theme.google_site_verification){ %> - <% } %> diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index c90bcea..3772eea 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -28,11 +28,11 @@ <% if (theme.favicon){ %> <% } %> - - + <%- partial('cdn_head') %> <%- css('css/style') %> <%- css('font-awesome/css/font-awesome.min') %> <%- partial('google-analytics') %> + <%- partial('google_site_verification') %> <% if( theme.customstylesheet ){ %> <%- css('css/'+theme.customstylesheet) %> <% } %>