Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(license): Add license on every post #405

Merged
merged 1 commit into from
Jun 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions _config.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ copyright_since:
# You can specify the text you want to show in footer, HTML tag is supported.
# For example, you can setup ICP license number as:
# '<a href="http://www.miitbeian.gov.cn" rel="nofollow">某ICP备xxxxxxxx号-x</a>'
# Or you can set up a CC license as:
# 'This blog is under a <a href="/creativecommons.html" target="_blank" class="footer-develop-a">CC BY-NC-SA 3.0 Unported License</a>'
footer_text:

# Qrcode for redirect at other device
Expand All @@ -126,6 +124,13 @@ prettify:
enable: false
theme: "vibrant-ink" # default value: "vibrant-ink" # theme-name without '.css'

# Post License
# You can specify the text you want to show in the end of your posts and pages, HTML tag is supported.
# For example, you can setup a CC license as:
# 'This blog is under a <a href="/creativecommons.html" target="_blank">CC BY-NC-SA 3.0 Unported License</a>'
# You can also use Front-Matter `license` to override this setting.
license:

# ---------------------------------------------------------------
# Menu Settings
# ---------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions languages/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ post:
newer: "أحدث"
qrcode: "اقرأ هذا المقال على جهاز آخر"
comments_load_button: "قراءة تعليقات 「تأكد !disq.us & disquscdn.com & disqus.com يمكن تحميل」"
permalink: " هذا الرابط "
share:
article_rss: "مقالات RSS"
comment_rss: "تعليقات RSS"
Expand Down
1 change: 1 addition & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ post:
newer: "Newer"
qrcode: "Read this article on other devices"
comments_load_button: "Read Comments (Make sure disq.us, disquscdn.com and disqus.com can load properly)"
permalink: "Link to this article: "
share:
article_rss: "Article RSS"
comment_rss: "Comment RSS"
Expand Down
1 change: 1 addition & 0 deletions languages/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ post:
newer: "Más nuevo"
qrcode: "Lea este artículo en otro dispositivo"
comments_load_button: "Leer comentarios 「Asegúrese de que 'disq.us & disquscdn.com & disqus.com' se puede cargar」"
permalink: "Link to this article: "
share:
article_rss: "Artículo RSS"
comment_rss: "Comentario RSS"
Expand Down
1 change: 1 addition & 0 deletions languages/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ post:
newer: "Récent"
qrcode: "Lire cet article depuis un autre appareil"
comments_load_button: "Lire les commentaires (Assurez-vous que disq.us, disquscdn.com et disqus.com peuvent être chargés)"
permalink: "ce lien: "
share:
article_rss: "Flux RSS des articles"
comment_rss: "Flux RSS des commentaires"
Expand Down
5 changes: 3 additions & 2 deletions languages/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ post:
newer: "新しい"
qrcode: "他のデバイスでこの記事を読む"
comments_load_button: "論評を読む「 あなたは disqus & disquscdn.com & disqus.com をロードできることを確認します」"
permalink: "このリンク:"
share:
article_rss: "記事 RSS"
comment_rss: "論評 RSS"
toTwitter: "Twitter での共有"
toFacebook: "Share to Facebook"
toFacebook: "Facebook での共有"
toLinkedIn: "LinkedIn での共有"
toTelegram: "Telegram での共有"
toGplus: "Google+ での共有"
toWeibo: "Weibo での共有"
toQQ: "Share to QQ"
toQQ: "QQ での共有"
title:
category: "カテゴリー"
tag: "ラベル"
Expand Down
1 change: 1 addition & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ post:
comments_load_button: "阅读评论(请确保 disqus 可以正常加载)"
comments_fully_load_button: "加载完整评论(请确保 disqus 可以正常加载)"
comments_proxy_load_button: "加载评论基本模式"
permalink: "本文链接:"
share:
article_rss: "文章 RSS"
comment_rss: "评论 RSS"
Expand Down
3 changes: 2 additions & 1 deletion languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ post:
older: "舊篇"
newer: "新篇"
qrcode: "在其他設備中閱讀本文章"
comments_load_button: "閱讀評論 「請確認 disq.us & disquscdn.com & disqus.com 可正常載入」"
comments_load_button: "閱讀評論 「請確認 disq.us & disquscdn.com & disqus.com 可正常載入」"
permalink: "本文鏈接:"
share:
article_rss: "文章 RSS"
comment_rss: "評論 RSS"
Expand Down
26 changes: 26 additions & 0 deletions layout/_partial/post-content.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
<div id="post-content" class="mdl-color-text--grey-700 mdl-card__supporting-text fade out">
<% if(theme.scheme === 'Paradox') { %>
<%- page.content %>
<% if (theme.license || page.license) { %>
<blockquote>
<p>
<% if (page.license) { %>
<%- page.license %>
<% } else { %>
<%- theme.license %>
<% } %>
<br>
<%- __('post.permalink') %> <%= page.permalink %>
</p>
</blockquote>
<% } %>
<% } %>

<% if(theme.scheme === 'Isolation') { %>
Expand All @@ -9,6 +22,19 @@
<%- page.title %>
</p>
<%- page.content %>
<% if (page.license || theme.license) { %>
<blockquote>
<p>
<% if (page.license) { %>
<%- page.license %>
<% } else { %>
<%- theme.license %>
<% } %>
<br>
<%- __('post.permalink') %> <%= page.permalink %>
</p>
</blockquote>
<% } %>
</div>
<% } %>
</div>