Skip to content

Commit

Permalink
fix(#798): footer version link 404
Browse files Browse the repository at this point in the history
  • Loading branch information
MHuiG committed Aug 14, 2022
1 parent 4bf8358 commit a2a2d90
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions layout/_partial/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
layout = config.theme_config.footer.layout;
}
let theme_version = theme.info.theme_version
// 未发布的 alpha 版本
if (theme_version.indexOf("alpha")!=-1) {
theme_version = "dev"
}
// // 未发布的 alpha 版本
// if (theme_version.indexOf("alpha")!=-1) {
// theme_version = "dev"
// }
// // 从 5.7.2 以后的版本以 v开头(release-please的奇怪设定)
// else if (theme_version.indexOf("beta")==-1||theme_version.indexOf("rc")==-1) {
// theme_version = "v" + theme_version
// }
%>
<footer class="footer clearfix" itemscope itemtype="http://schema.org/WPFooter">
<br><br>
Expand Down Expand Up @@ -39,13 +43,13 @@
<div><%- markdown(__('footer.license')) %></div>
<% } else if (item == 'info') { %>
<%- __('footer.use') %>
<a href="https://github.com/volantis-x/hexo-theme-volantis/tree/<%- theme_version %>" target="_blank" class="codename">Volantis</a>
<a href="https://github.com/volantis-x/hexo-theme-volantis/#<%- theme_version %>" target="_blank" class="codename">Volantis</a>
<%- __('footer.theme') %><% if (theme.analytics.busuanzi) { %><%- __('symbol.comma') %><%- __('footer.total_views') %>
<span id="busuanzi_value_site_pv"><i class="fa-solid fa-loader fa-spin fa-fw" aria-hidden="true"></i></span>
<%- __('footer.times') %>
<% } %>
<% } else if (item == 'source') { %>
<%- markdown(__('footer.site_source', '[Volantis](https://github.com/volantis-x/hexo-theme-volantis/tree/'+theme_version+')', 'GitHub', 'https://github.com/volantis-x/volantis-docs')) %>
<%- markdown(__('footer.site_source', '[Volantis](https://github.com/volantis-x/hexo-theme-volantis/#'+theme_version+')', 'GitHub', 'https://github.com/volantis-x/volantis-docs')) %>
<% } else if (item == 'copyright') { %>
<div class='copyright'>
<%- markdown(theme.site_footer.copyright) %>
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/head.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<head hexo-theme='https://github.com/volantis-x/hexo-theme-volantis/tree/<%- theme.info.theme_version %>'>
<head hexo-theme='https://github.com/volantis-x/hexo-theme-volantis/#<%- theme.info.theme_version %>'>
<%- meta_generator() %>
<meta name="Volantis" content="<%- theme.info.theme_version %>">
<meta charset="utf-8">
Expand Down

0 comments on commit a2a2d90

Please sign in to comment.