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(post): control the bold of copyright footer #155

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions _config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ post:
# You can also use Front-Matter `license` to override this setting
# or use Front-Matter `hide_license: true` to hide license on spefic post
license:
# License_strong decides whether the copyright description is strengthen(bold).
# For example, if you set license_strong to true with setting up your license as:
# license: 'This blog is under a CC BY-NC-SA 3.0 Unported License.'
# The license description will be show on page as:
# <strong>This blog is under a CC BY-NC-SA 3.0 Unported License.</strong>
license_strong: true

# Table Of Contents which will be show on right side of the post
toc:
Expand Down
16 changes: 15 additions & 1 deletion layout/_partial/post/footer-info.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<% if (page.hide_license !== true && theme.post.license || page.license) { %>
<blockquote class="post-license">
<% if(theme.post.license_strong != false){ %>
<p>
<strong><%- __('post.author') %>&nbsp;:&nbsp;<%= config.author %></strong>
<br>
Expand All @@ -12,6 +13,19 @@
<br>
<strong><%- __('post.permalink') %>&nbsp;:&nbsp;</strong><a href="<%= page.permalink %>"><%= page.permalink %></a>
</p>
<%} else {%>
<p>
<%- __('post.author') %>&nbsp;:&nbsp;<%= config.author %>
<br>
<% if (page.license) { %>
<%- page.license %>
<% } else { %>
<%- theme.post.license %>
<% } %>
<br>
<%- __('post.permalink') %>&nbsp;:&nbsp;<a href="<%= page.permalink %>"><%= page.permalink %></a>
</p>
<% } %>
</blockquote>
<% } %>

Expand Down Expand Up @@ -55,4 +69,4 @@
</span>
<% } %>

</p>
</p>