diff --git a/build/src/pug/_inc/mixin/_meta.pug b/build/src/pug/_inc/mixin/_meta.pug index 909b485..3c9aa52 100644 --- a/build/src/pug/_inc/mixin/_meta.pug +++ b/build/src/pug/_inc/mixin/_meta.pug @@ -15,7 +15,7 @@ mixin metaList(pageSummaryObj) meta(property="og:description", content= pageSummaryObj.description) meta(property="og:type", content= pageSummaryObj.type) meta(property="og:locale", content="ja_JP") - meta(property="og:url", content= siteSetting.rootUrl + pageSummaryObj.pageUrl) + meta(property="og:url", content= siteSetting.rootUrl + pathSetting.pageUrl()) meta(property="og:image", content= pageSummaryObj.ogImageUrl) if siteSetting.fbAppID meta(property="fb:app_id", content= siteSetting.fbAppID) diff --git a/build/src/pug/_inc/mixin/_shareButton.pug b/build/src/pug/_inc/mixin/_shareButton.pug index 58dda14..85ec362 100644 --- a/build/src/pug/_inc/mixin/_shareButton.pug +++ b/build/src/pug/_inc/mixin/_shareButton.pug @@ -5,7 +5,7 @@ mixin shareButton(serviceName, type = 'official') official: ``, custom: { - href: `http://b.hatena.ne.jp/add?mode=confirm&url=${ siteSetting.rootUrl + pageSummary.pageUrl }`, + href: `http://b.hatena.ne.jp/add?mode=confirm&url=${ siteSetting.rootUrl + pathSetting.pageUrl() }`, onclick: `window.open(this.href, 'HATEBUwindow', 'width=520, height=480, menubar=no, toolbar=no, scrollbars=yes'); return false;`, target: "_blank", rel: "noopener noreferrer" @@ -18,7 +18,7 @@ mixin shareButton(serviceName, type = 'official') `, custom: { - href: 'https://timeline.line.me/social-plugin/share?url=' + encodeURIComponent(siteSetting.rootUrl + pageSummary.pageUrl), + href: 'https://timeline.line.me/social-plugin/share?url=' + encodeURIComponent(siteSetting.rootUrl + pathSetting.pageUrl()), onclick: `window.open(this.href, 'LINEwindow', 'width=700, height=650, menubar=no, toolbar=no, scrollbars=yes'); return false;`, target: "_blank", rel: "noopener noreferrer" @@ -31,7 +31,7 @@ mixin shareButton(serviceName, type = 'official') custom: { href: (function shareURL() { const tweetParameter = { - url: 'url=' + encodeURIComponent(siteSetting.rootUrl + pageSummary.pageUrl) + '&', + url: 'url=' + encodeURIComponent(siteSetting.rootUrl + pathSetting.pageUrl()) + '&', // via: 'via=' + encodeURIComponent(siteSetting.twitterUserName[0]) + '&', related: 'related=' + encodeURIComponent(siteSetting.twitterUserName) + '&', hashtag: 'hashtags=' + encodeURIComponent(siteSetting.hashtag) + '&', @@ -61,9 +61,9 @@ mixin shareButton(serviceName, type = 'official') js.src = "//connect.facebook.net/ja_JP/sdk.js#xfbml=1&version=v2.10"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); -
`, + `, custom: { - href: 'https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(siteSetting.rootUrl + pageSummary.pageUrl), + href: 'https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(siteSetting.rootUrl + pathSetting.pageUrl()), onclick: `window.open(this.href, 'FBwindow', 'width=680, height=640, menubar=no, toolbar=no, scrollbars=yes'); return false;`, target: "_blank", rel: "noopener noreferrer" diff --git a/build/src/pug/_inc/modules/_head.pug b/build/src/pug/_inc/modules/_head.pug index fb5b6fa..a98c274 100644 --- a/build/src/pug/_inc/modules/_head.pug +++ b/build/src/pug/_inc/modules/_head.pug @@ -10,7 +10,7 @@ html(lang= siteSetting.siteLang prefix="og: http://ogp.me/ns#") block pageMeta link(rel="icon" ,href= pathSetting.image + '/siteImage/favicon.ico') link(rel="apple-touch-icon" ,href= pathSetting.image + '/siteImage/apple-touch-icon.png') - link(rel="canonical" ,href= siteSetting.rootUrl+pageSummary.pageUrl) + link(rel="canonical" ,href= siteSetting.rootUrl + pathSetting.pageUrl()) //- Load Compiled CSS link(rel="stylesheet",href= pathSetting.css + '/style.css') //- Load Compiled JS from moduleBundler diff --git a/build/src/pug/_inc/settings/_pathSetting.pug b/build/src/pug/_inc/settings/_pathSetting.pug index a3f1e5d..de14da6 100644 --- a/build/src/pug/_inc/settings/_pathSetting.pug +++ b/build/src/pug/_inc/settings/_pathSetting.pug @@ -12,4 +12,5 @@ include /_inc/settings/_projectNamePath.pug }, css: _projectNamePath + '/assets/css', //- {string} js: _projectNamePath + '/assets/js', //- {string} + pageUrl: () => { return _projectNamePath + pageSummary.pageUrl }, //- insert _projectNamePath in pageSummary.pageUrl }