Skip to content

Commit

Permalink
Load the Content API module as local asset instead of making an exter…
Browse files Browse the repository at this point in the history
…nal request
  • Loading branch information
eddiesigner committed Apr 18, 2020
1 parent b6c95dc commit c9dab14
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 42 deletions.
2 changes: 2 additions & 0 deletions assets/js/vendor/content-api.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion default.hbs
Expand Up @@ -72,7 +72,7 @@

{{!-- Common scripts shared between pages --}}
<script crossorigin="anonymous" src="https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver%2CPromise%2CArray.prototype.includes%2CString.prototype.endsWith%2CString.prototype.startsWith%2CObject.assign%2CNodeList.prototype.forEach"></script>
<script defer src="https://unpkg.com/@tryghost/content-api@1.2.7/umd/content-api.min.js"></script>
<script defer src="{{asset "js/vendor/content-api.min.js"}}"></script>
<script defer src="{{asset "js/manifest.js"}}"></script>
<script defer src="{{asset "js/vendor.js"}}"></script>
<script defer src="{{asset "js/app.js"}}"></script>
Expand Down
2 changes: 1 addition & 1 deletion locales/zh-hans.json
Expand Up @@ -37,4 +37,4 @@
"of": " / ",
"with the email address": "在此邮箱",
"with this tag": "包含此标签"
}
}
78 changes: 39 additions & 39 deletions locales/zh-hant.json
@@ -1,40 +1,40 @@
{
"% min read": "閱讀預計需要%分鐘",
"% posts": "%篇文章",
"1 min read": "閱讀預計需要1分鐘",
"1 post": "1 篇文章",
"Among with": "<br>和 ",
"Among with no break line": "",
"Apparently there are no posts at the moment, check again later.": "當前沒有文章,請稍後再看.",
"Back to home": "返回首頁",
"Email cannot be blank.": "Email 地址不能為空.",
"Featured": "精選",
"Get the latest posts delivered right to your inbox.": "將最新的文章發送到你的收件箱.",
"Go to the home page": "前往首頁",
"JavaScript license information": "JavaScript license 信息",
"No posts": "沒有文章",
"No posts found": "未找到文章",
"No recent articles found :(": "找不到最近更新的內容 :(",
"No results for your search, try something different.": "搜索不到內容,請嘗試其他關鍵詞.",
"No tags found :(": "找不到標籤 :(",
"Page": "",
"Page not found": "未找到頁面",
"Posted by": "作者: ",
"Published with": "自豪地使用 ",
"Recent articles": "最近更新",
"Recommended for you": "向你推薦",
"Stay up to date! Get all the latest & greatest posts delivered straight to your inbox.": "事不宜遲!將最新和最好的文章直接發送到你的收件箱.",
"Subscribe": "訂閱",
"Subscribe to": "訂閱",
"Subscribe to our newsletter": "訂閱我們的新內容",
"Subscribed!": "訂閱成功!",
"Tags": "標籤",
"Toggle dark mode": "切換到暗色模式",
"Type to search": "輸入搜索內容",
"Unfortunately the page you were looking for could not be found.": "非常抱歉,頁面找不到了.",
"You've successfully subscribed to": "你已經成功訂閱了",
"Your email address": "你的 Email 地址",
"of": " / ",
"with the email address": "在此郵箱",
"with this tag": "包含此標籤"
}
"% min read": "閱讀預計需要%分鐘",
"% posts": "%篇文章",
"1 min read": "閱讀預計需要1分鐘",
"1 post": "1 篇文章",
"Among with": "<br>和 ",
"Among with no break line": "",
"Apparently there are no posts at the moment, check again later.": "當前沒有文章,請稍後再看.",
"Back to home": "返回首頁",
"Email cannot be blank.": "Email 地址不能為空.",
"Featured": "精選",
"Get the latest posts delivered right to your inbox.": "將最新的文章發送到你的收件箱.",
"Go to the home page": "前往首頁",
"JavaScript license information": "JavaScript license 信息",
"No posts": "沒有文章",
"No posts found": "未找到文章",
"No recent articles found :(": "找不到最近更新的內容 :(",
"No results for your search, try something different.": "搜索不到內容,請嘗試其他關鍵詞.",
"No tags found :(": "找不到標籤 :(",
"Page": "",
"Page not found": "未找到頁面",
"Posted by": "作者: ",
"Published with": "自豪地使用 ",
"Recent articles": "最近更新",
"Recommended for you": "向你推薦",
"Stay up to date! Get all the latest & greatest posts delivered straight to your inbox.": "事不宜遲!將最新和最好的文章直接發送到你的收件箱.",
"Subscribe": "訂閱",
"Subscribe to": "訂閱",
"Subscribe to our newsletter": "訂閱我們的新內容",
"Subscribed!": "訂閱成功!",
"Tags": "標籤",
"Toggle dark mode": "切換到暗色模式",
"Type to search": "輸入搜索內容",
"Unfortunately the page you were looking for could not be found.": "非常抱歉,頁面找不到了.",
"You've successfully subscribed to": "你已經成功訂閱了",
"Your email address": "你的 Email 地址",
"of": " / ",
"with the email address": "在此郵箱",
"with this tag": "包含此標籤"
}
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -54,5 +54,5 @@
"desktop": "assets/screenshot-desktop.jpg",
"mobile": "assets/screenshot-mobile.jpg"
},
"version": "0.6.7"
"version": "0.6.8"
}
2 changes: 2 additions & 0 deletions src/js/vendor/content-api.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/webpack.mix.js
Expand Up @@ -29,6 +29,7 @@ mix.js('js/helpers.js', 'js/')
processCssUrls: false
})
.copy('sass/fonts/icomoon/*.*', '../assets/fonts/')
.copy('js/vendor/content-api.min.js', '../assets/js/vendor/')
.browserSync({
proxy: "localhost:2368",
files: [
Expand Down

0 comments on commit c9dab14

Please sign in to comment.