Skip to content

Commit 5a910e2

Browse files
committed
πŸŽ‰ Update to Hexo 6 and remove swig templates
1 parent dbcbc07 commit 5a910e2

15 files changed

+34
-37
lines changed

β€Ž.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

β€Žpackage.json

+18-22
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.0",
44
"private": true,
55
"hexo": {
6-
"version": "4.2.0"
6+
"version": "6.0.0"
77
},
88
"scripts": {
99
"build": "hexo generate",
@@ -13,38 +13,34 @@
1313
"dependencies": {
1414
"cheerio": "^0.22.0",
1515
"hexo": "hexojs/hexo",
16-
"hexo-clean-css": "^1.0.0",
17-
"hexo-deployer-git": "^2.1.0",
16+
"hexo-clean-css": "^2.0.0",
17+
"hexo-deployer-git": "3.0.0",
1818
"hexo-filter-nofollow": "^2.0.2",
19+
"hexo-fs": "^3.1.0",
1920
"hexo-generator-sitemap": "^2.0.0",
20-
"hexo-renderer-marked": "^2.0.0",
21-
"hexo-renderer-pug": "^1.0.0",
22-
"hexo-renderer-stylus": "^1.0.0",
23-
"hexo-renderer-swig": "^1.1.0",
24-
"hexo-server": "^1.0.0",
25-
"hexo-uglify": "^1.0.0",
26-
"lunr": "2.3.8",
27-
"sharp": "^0.25.2"
21+
"hexo-renderer-marked": "^5.0.0",
22+
"hexo-renderer-pug": "^3.0.0",
23+
"hexo-renderer-stylus": "^2.0.0",
24+
"hexo-server": "^3.0.0",
25+
"hexo-uglify": "^2.0.0",
26+
"lunr": "2.3.9",
27+
"sharp": "^0.30.2"
2828
},
2929
"devDependencies": {
30-
"eslint": "^6.0.1",
31-
"eslint-config-hexo": "^4.0.0",
32-
"husky": "^4.0.7",
30+
"eslint": "^8.0.1",
31+
"eslint-config-hexo": "^5.0.0",
32+
"husky": "^7.0.2",
3333
"imagemin-lint-staged": "^0.4.0",
34-
"lint-staged": "^10.2.2"
35-
},
36-
"husky": {
37-
"hooks": {
38-
"pre-commit": "lint-staged"
39-
}
34+
"lint-staged": "^11.0.0"
4035
},
4136
"lint-staged": {
4237
"*.{png,jpeg,jpg,gif,svg}": [
4338
"imagemin-lint-staged",
4439
"git add"
45-
]
40+
],
41+
"*.js": "eslint --fix"
4642
},
4743
"engines": {
48-
"node": ">=8.10.0"
44+
"node": ">=12.9.0"
4945
}
5046
}

β€Žsource/docs/a3.hello_world.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn main() {
2121

2222
[Rust Playground](https://play.rust-lang.org/) is a web interface for running Rust code.
2323

24-
[![Rust Playground](images/rust_playground.png)](https://play.rust-lang.org/)
24+
[![Rust Playground](docs/images/rust_playground.png)](https://play.rust-lang.org/)
2525

2626
## Before going to the next...
2727

β€Žsource/docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ title: Overview
33

44
This is based on the posts I wrote on **Medium**, https://medium.com/learning-rust
55

6-
[![Rust Playground](images/learning_rust_medium.png)](https://medium.com/learning-rust)
6+
[![Rust Playground](docs/images/learning_rust_medium.png)](https://medium.com/learning-rust)
77

88
> 🐣 I am a **Sri Lankan** πŸ‡±πŸ‡° Web Developer who lives in **Vietnam** πŸ‡»πŸ‡³. So I am not a native English speaker and just learning Rust, If you found any mistake or something need to be changed, even a spelling or a grammar mistake, feel free to create a pull request. Thanks.
File renamed without changes.
File renamed without changes.
File renamed without changes.

β€Žthemes/navy/layout/partial/after_footer.swig renamed to β€Žthemes/navy/layout/partial/after_footer.njk

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<!-- Algolia -->
77
{% if config.algolia[page.lang] %}
88
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
9-
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.1.1/build/highlight.min.js"></script>
10-
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.1.1/build/languages/rust.min.js"></script>
9+
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script>
10+
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/rust.min.js"></script>
1111
<script type="text/javascript">
1212
document.getElementById('search-input-wrap').classList.add('on');
1313
docsearch({
@@ -16,6 +16,6 @@ docsearch({
1616
inputSelector: '#search-input'
1717
});
1818
19-
hljs.initHighlightingOnLoad();
19+
hljs.highlightAll();
2020
</script>
2121
{% endif %}

β€Žthemes/navy/layout/partial/footer.swig renamed to β€Žthemes/navy/layout/partial/footer.njk

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<footer id="footer" class="wrapper">
33
<div class="inner">
44
<div id="footer-copyright">
5-
&copy; {{ moment(Date.now()).year() }} <a href="https://github.com/dumindu" target="_blank">{{ config.author }}</a><br>
5+
&copy; {{ moment().year() }} <a href="https://github.com/dumindu" target="_blank">{{ config.author }}</a><br>
66
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a> &amp; <a href="https://github.com/hexojs/site/tree/master/themes/navy" target="_blank">Navy</a> theme.
77
</div>
88
<div id="footer-links">

β€Žthemes/navy/layout/partial/head.swig renamed to β€Žthemes/navy/layout/partial/head.njk

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<head prefix="og: http://ogp.me/ns#">
22
<meta charset="utf-8">
3-
<meta http-equiv="x-ua-compatible" content="ie=edge">
43
<title>{% if page.title %}{{ page.title }} | {% endif %}{{ config.title }}</title>
4+
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
55
<meta name="description" content="Rust Programming Language Tutorials">
6-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<!-- Canonical links -->
88
<link rel="canonical" href="{{ url }}">
99
<!-- Alternative links -->
1010
{% if page.layout == 'page' or page.layout == 'index' %}
11-
{% for lang in site.data.languages %}
12-
<link rel="alternative" hreflang="{{ loop.key }}" href="{{ canonical_url(loop.key) }}">
11+
{% for lang, value in site.data.languages %}
12+
<link rel="alternative" hreflang="{{ lang }}" href="{{ canonical_url(lang) }}">
1313
{% endfor %}
1414
{% endif %}
1515
<!-- Icon -->
@@ -18,7 +18,7 @@
1818
<!-- build:css build/css/navy.css -->
1919
{{ css('css/navy') }}
2020
<!-- endbuild -->
21-
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.1.1/build/styles/tomorrow.min.css">
21+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/styles/base16/tomorrow.min.css">
2222
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700" rel="stylesheet" type="text/css">
2323
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
2424
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css">

β€Žthemes/navy/layout/partial/header.swig renamed to β€Žthemes/navy/layout/partial/header.njk

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<div id="lang-select-wrap">
1818
<label id="lang-select-label"><i class="fa fa-language"></i><span>{{ lang_name(page.lang) }}</span></label>
1919
<select id="lang-select" data-canonical="{{ canonical_path_for_nav() }}">
20-
{% for lang in site.data.languages %}
21-
<option value="{{ loop.key }}"{% if page.lang === loop.key %} selected{% endif %}>{{ lang_name(loop.key) }}</option>
20+
{% for lang, value in site.data.languages %}
21+
<option value="{{ lang }}"{% if page.lang === lang %} selected{% endif %}>{{ lang_name(lang) }}</option>
2222
{% endfor %}
2323
</select>
2424
</div>

β€Žthemes/navy/layout/partial/mobile_nav.swig renamed to β€Žthemes/navy/layout/partial/mobile_nav.njk

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<div id="mobile-lang-select-wrap">
1414
<span id="mobile-lang-select-label"><i class="fa fa-language"></i><span>{{ lang_name(page.lang) }}</span></span>
1515
<select id="mobile-lang-select" data-canonical="{{ canonical_path_for_nav() }}">
16-
{% for lang in site.data.languages %}
17-
<option value="{{ loop.key }}"{% if page.lang === loop.key %} selected{% endif %}>{{ lang_name(loop.key) }}</option>
16+
{% for lang, value in site.data.languages %}
17+
<option value="{{ lang }}"{% if page.lang === lang %} selected{% endif %}>{{ lang_name(lang) }}</option>
1818
{% endfor %}
1919
</select>
2020
</div>

0 commit comments

Comments
Β (0)