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

Simplify footer.powered settings #1432

Merged
merged 1 commit into from
Mar 21, 2020
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
13 changes: 2 additions & 11 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,8 @@ footer:
# If not defined, `author` from Hexo `_config.yml` will be used.
copyright:

powered:
# Hexo link (Powered by Hexo).
enable: true
# Version info of Hexo after Hexo link (vX.X.X).
version: true

theme:
# Theme & scheme info link (Theme - NexT.scheme).
enable: true
# Version info of NexT after scheme info (vX.X.X).
version: true
# Powered by Hexo & NexT
powered: true

# Beian ICP and gongan information for Chinese users. See: http://www.beian.miit.gov.cn, http://www.beian.gov.cn
beian:
Expand Down
1 change: 0 additions & 1 deletion languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ post:

footer:
powered: "Powered by %s"
theme: Theme
total_views: Total Views
total_visitors: Total Visitors

Expand Down
14 changes: 1 addition & 13 deletions layout/_partials/footer.swig
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,11 @@

{%- if theme.footer.powered.enable %}
<div class="powered-by">
{{- __('footer.powered', next_url('https://hexo.io', 'Hexo', {class: 'theme-link'})) }}
{%- if theme.footer.powered.version %} v{{ hexo_version }}{%- endif %}
</div>
{%- endif %}

{%- if theme.footer.powered.enable and theme.footer.theme.enable %}
<span class="post-meta-divider">|</span>
{%- endif %}

{%- if theme.footer.theme.enable %}
<div class="theme-info">
{%- set next_site = 'https://theme-next.org' %}
{%- if theme.scheme !== 'Gemini' %}
{%- set next_site = 'https://' + theme.scheme | lower + '.theme-next.org' %}
{%- endif %}
{{- __('footer.theme') }} – {{ next_url(next_site, 'NexT.' + theme.scheme, {class: 'theme-link'}) }}
{%- if theme.footer.theme.version %} v{{ next_version }}{%- endif %}
{{- __('footer.powered', next_url('https://hexo.io', 'Hexo', {class: 'theme-link'}) + ' & ' + next_url(next_site, 'NexT.' + theme.scheme, {class: 'theme-link'})) }}
</div>
{%- endif %}

Expand Down