From 5cc35b7a47787ea2d5f1c24e029caae8b8157fef Mon Sep 17 00:00:00 2001 From: Edinei Cavalcanti Date: Sun, 18 Oct 2020 17:55:16 +0000 Subject: [PATCH] Partinal head --- src/blog/index.html | 46 +++----------------------------------- src/index.html | 48 ++++------------------------------------ src/palestras/index.html | 46 +++----------------------------------- src/podcasts/index.html | 46 +++----------------------------------- src/shared/head.html | 42 +++++++++++++++++++++++++++++++++++ 5 files changed, 55 insertions(+), 173 deletions(-) create mode 100644 src/shared/head.html diff --git a/src/blog/index.html b/src/blog/index.html index 695ccb5d..9a53d772 100644 --- a/src/blog/index.html +++ b/src/blog/index.html @@ -1,48 +1,8 @@ - - - <%=htmlWebpackPlugin.options.title%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + <% var templateHead = require("html-loader!../shared/head.html"); %> <%= templateHead + .split('${title}').join(htmlWebpackPlugin.options.title) .split('${keywords}').join(htmlWebpackPlugin.options.keywords) + .split('${description}').join(htmlWebpackPlugin.options.description) .split('${author}').join(htmlWebpackPlugin.options.author) %>
diff --git a/src/index.html b/src/index.html index 5ea1d197..57a43fd0 100644 --- a/src/index.html +++ b/src/index.html @@ -1,48 +1,8 @@ - - - <%=htmlWebpackPlugin.options.title%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + <% var templateHead = require("html-loader!./shared/head.html"); %> <%= templateHead + .split('${title}').join(htmlWebpackPlugin.options.title) .split('${keywords}').join(htmlWebpackPlugin.options.keywords) + .split('${description}').join(htmlWebpackPlugin.options.description) .split('${author}').join(htmlWebpackPlugin.options.author) %>
@@ -133,7 +93,7 @@

Social Networks

- <% var template = require("html-loader!./shared/menu.html"); %> <%= template.split('${homeActive}').join('class="uk-active"') + <% var templateMenu = require("html-loader!./shared/menu.html"); %> <%= templateMenu .split('${homeActive}').join('class="uk-active"') .split('${blogActive}').join('') .split('${palestrasActive}').join('') .split('${podcastActive}').join('') %>
diff --git a/src/palestras/index.html b/src/palestras/index.html index 0b47da2d..6b824538 100644 --- a/src/palestras/index.html +++ b/src/palestras/index.html @@ -1,48 +1,8 @@ - - - <%=htmlWebpackPlugin.options.title%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + <% var templateHead = require("html-loader!../shared/head.html"); %> <%= templateHead + .split('${title}').join(htmlWebpackPlugin.options.title) .split('${keywords}').join(htmlWebpackPlugin.options.keywords) + .split('${description}').join(htmlWebpackPlugin.options.description) .split('${author}').join(htmlWebpackPlugin.options.author) %>
diff --git a/src/podcasts/index.html b/src/podcasts/index.html index 5f76e650..0b413e5d 100644 --- a/src/podcasts/index.html +++ b/src/podcasts/index.html @@ -1,48 +1,8 @@ - - - <%=htmlWebpackPlugin.options.title%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + <% var templateHead = require("html-loader!../shared/head.html"); %> <%= templateHead + .split('${title}').join(htmlWebpackPlugin.options.title) .split('${keywords}').join(htmlWebpackPlugin.options.keywords) + .split('${description}').join(htmlWebpackPlugin.options.description) .split('${author}').join(htmlWebpackPlugin.options.author) %>
diff --git a/src/shared/head.html b/src/shared/head.html new file mode 100644 index 00000000..fa9e262b --- /dev/null +++ b/src/shared/head.html @@ -0,0 +1,42 @@ + + + ${title} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +