Skip to content

Commit c5bd860

Browse files
committed
[v1.6 & jekyll 3.0] drop highlight.js and embrace native highlighting. Fixed that tags at footer dont support site.baseurl
1 parent 481941e commit c5bd860

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

_includes/footer.html

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<p class="copyright text-muted">
7373
Copyright &copy; {{ site.title }} {{ site.time | date: '%Y' }}
7474
<br>
75-
Theme © <a href="http://huangxuan.me">Hux</a> |
75+
Theme by <a href="http://huangxuan.me">Hux</a> |
7676
<iframe
7777
style="margin-left: 2px; margin-bottom:-5px;"
7878
frameborder="0" scrolling="0" width="91px" height="20px"
@@ -106,11 +106,27 @@
106106
}
107107
</script>
108108

109-
<!-- Highlight.js -->
109+
<!--
110+
Because of the native support for backtick-style fenced code blocks
111+
right within the Markdown is landed in Github Pages,
112+
From V1.6, There is no need for Highlight.js,
113+
so Huxblog drops it officially.
114+
115+
- https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0
116+
- https://help.github.com/articles/creating-and-highlighting-code-blocks/
117+
-->
118+
<!--
119+
<script>
120+
async("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function(){
121+
hljs.initHighlightingOnLoad();
122+
})
123+
</script>
124+
<link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet">
125+
-->
126+
127+
128+
<!-- jquery.tagcloud.js -->
110129
<script>
111-
async("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function(){
112-
hljs.initHighlightingOnLoad();
113-
})
114130
// only load tagcloud.js in tag.html
115131
if($('#tag_cloud').length !== 0){
116132
async("/js/jquery.tagcloud.js",function(){
@@ -122,19 +138,16 @@
122138
})
123139
}
124140
</script>
125-
<link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet">
126141

127142
<!--fastClick.js -->
128143
<script>
129144
async("http://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js", function(){
130-
// var $nav = document.querySelector("nav");
131-
// if($nav) FastClick.attach($nav);
132-
133-
// global FastClick!!
134-
FastClick.attach(document.body);
145+
var $nav = document.querySelector("nav");
146+
if($nav) FastClick.attach($nav);
135147
})
136148
</script>
137149

150+
138151
<!-- Google Analytics -->
139152
{% if site.ga_track_id %}
140153
<script>
@@ -172,6 +185,7 @@
172185
{% endif %}
173186

174187

188+
175189
<!-- Side Catalog -->
176190
{% if page.catalog %}
177191
<script type="text/javascript">

_layouts/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h1>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1
3636
{% if site.featured-tags %}
3737
<section>
3838
<!-- no hr -->
39-
<h5><a href="/tags/">FEATURED TAGS</a></h5>
39+
<h5><a href="{{'/tags/' | prepend: site.baseurl }}">FEATURED TAGS</a></h5>
4040
<div class="tags">
4141
{% for tag in site.tags %}
4242
{% if tag[1].size > {{site.featured-condition-size}} %}

0 commit comments

Comments
 (0)