Skip to content
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
10 changes: 5 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ footer:

# -------------------------------------------------------------
# Any custom text can be defined here.
#custom_text: Hosted by <a target="_blank" rel="external nofollow" href="https://pages.coding.me"><b>Coding Pages</b></a>
#custom_text: Hosted by <a href="https://pages.coding.me" class="theme-link" rel="noopener" target="_blank">Coding Pages</a>

# Creative Commons 4.0 International License.
# https://creativecommons.org/share-your-work/licensing-types-examples
Expand Down Expand Up @@ -350,8 +350,8 @@ related_posts:
# Dependencies: https://github.com/hexojs/hexo-deployer-git
post_edit:
enable: false
url: https://github.com/theme-next/theme-next.org/_posts/tree/master/ # Link for view source.
# url: https://github.com/theme-next/theme-next.org/_posts/edit/master/ # Link for fork & edit.
url: https://github.com/user-name/repo-name/tree/branch-name/subdirectory-name/ # Link for view source.
#url: https://github.com/user-name/repo-name/edit/branch-name/subdirectory-name/ # Link for fork & edit.


# ---------------------------------------------------------------
Expand Down Expand Up @@ -557,7 +557,7 @@ gitment:
proxy_gateway: # Address of api proxy, See: https://github.com/aimingoo/intersect
redirect_protocol: # Protocol of redirect_uri with force_redirect_protocol when mint enabled

# Gitalk
# Gitalk
# Demo: https://gitalk.github.io
# Reference: https://asdfv1929.github.io/2018/01/20/gitalk/, https://liujunzhou.cn/2018/8/10/gitalk-error/#more
gitalk:
Expand Down Expand Up @@ -1054,7 +1054,7 @@ vendors:

# Internal version: 0.7.3
# See: https://github.com/emn178/js-md5/
# Example:
# Example:
# md5: https://cdn.jsdelivr.net/npm/js-md5@0.7.3/src/md5.min.js
md5:

Expand Down
4 changes: 2 additions & 2 deletions layout/_layout.swig
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div class="header-inner">{% include '_partials/header/index.swig' %}</div>
</header>

{{ partial('_third-party/github-banner.swig', {}, {cache: theme.cache.enable}) }}
{{ partial('_partials/github-banner.swig', {}, {cache: theme.cache.enable}) }}

<main id="main" class="main">
<div class="main-inner">
Expand Down Expand Up @@ -80,7 +80,7 @@
</span>
</div>
{% endif %}

{% if theme.baidushare and theme.baidushare.type === "slide" %}
<div>
{% include '_partials/share/baidushare.swig' %}
Expand Down
17 changes: 7 additions & 10 deletions layout/_macro/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@
{{ next_url(post.path, post.title | default(__('post.untitled')), {class: 'post-title-link', itemprop: url }) }}
{% else -%}
{{- post.title -}}
{% if theme.post_edit.enable -%}
{% set editIcon = '<i class="fa fa-pencil"></i>' -%}
{{ next_url(theme.post_edit.url + post.source.slice(7), editIcon, {class: 'post-edit-link', title: __('post.edit') }) }}
{%- endif %}
{% include '../_partials/post-edit.swig' %}
{% endif %}
{% endif %}
</{% if theme.seo %}h2{% else %}h1{% endif %}>
Expand Down Expand Up @@ -347,7 +344,7 @@
</div>

{% if theme.related_posts.enable and (theme.related_posts.display_in_home or not is_index) %}
{% include 'post-related.swig' with { post: post } %}
{% include '../_partials/post/post-related.swig' with { post: post } %}
{% endif %}

{#####################}
Expand All @@ -356,24 +353,24 @@

{% if theme.wechat_subscriber.enabled and not is_index %}
<div>
{% include 'wechat-subscriber.swig' %}
{% include '../_partials/post/wechat-subscriber.swig' %}
</div>
{% endif %}

{% if page.reward === undefined and theme.reward.enable %}
{% set reward_able = true %}
{% set reward_able = true %}
{% else %}
{% set reward_able = page.reward %}
{% set reward_able = page.reward %}
{% endif %}
{% if reward_able and (theme.reward.alipay or theme.reward.wechatpay or theme.reward.bitcoin) and not is_index %}
<div>
{% include 'reward.swig' %}
{% include '../_partials/post/reward.swig' %}
</div>
{% endif %}

{% if theme.creative_commons.license and theme.creative_commons.post and not is_index %}
<div>
{% include '../_partials/post-copyright.swig' with { post: post } %}
{% include '../_partials/post/post-copyright.swig' with { post: post } %}
</div>
{% endif %}

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<header class="post-header">

<{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title" itemprop="name headline">{{ page.title }}</{% if theme.seo %}h2{% else %}h1{% endif %}>
<{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title" itemprop="name headline">
{{- page.title -}}
{% include '../post-edit.swig' %}
</{% if theme.seo %}h2{% else %}h1{% endif %}>

<div class="post-meta">
{% if page.description %}
Expand Down
4 changes: 4 additions & 0 deletions layout/_partials/post-edit.swig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% if theme.post_edit.enable -%}
{% set editIcon = '<i class="fa fa-pencil"></i>' -%}
{{ next_url(theme.post_edit.url + page.source, editIcon, {class: 'post-edit-link', title: __('post.edit') }) }}
{%- endif %}
File renamed without changes.
4 changes: 2 additions & 2 deletions layout/page.swig
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{### PAGE BLOCK ###}
{##################}
<div class="post-block page">
{% include '_partials/page-header.swig' %}
{% include '_partials/page/page-header.swig' %}
{#################}
{### PAGE BODY ###}
{#################}
Expand Down Expand Up @@ -70,7 +70,7 @@
{### END PAGE BODY ###}
{#####################}
</div>
{% include '_partials/breadcrumb.swig' %}
{% include '_partials/page/breadcrumb.swig' %}
{######################}
{### END PAGE BLOCK ###}
{######################}
Expand Down