hexo-theme-linen 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A clean Hexo theme focused on readability, UX, and minimal configuration.
4
4
 
5
+ ![](https://github.com/LynanBreeze/hexo-theme-linen-doc/blob/main/source/img/preview-screenshot.jpg?raw=true)
6
+
5
7
  ## Features
6
8
 
7
9
  - Elegant and minimal design
@@ -9,7 +11,7 @@ A clean Hexo theme focused on readability, UX, and minimal configuration.
9
11
  - Optimized typography
10
12
  - Customizable navigation
11
13
  - Supports tags, categories, archives, and series
12
- - Fast build and lightweight assets
14
+ - Fast build and lightweight assets(without plugins)
13
15
 
14
16
  ## Installation
15
17
 
@@ -37,7 +39,9 @@ hexo clean && hexo serve
37
39
 
38
40
  Full documentation and examples:
39
41
 
40
- https://lynanbreeze.github.io/hexo-theme-linen-doc-zh-CN/
42
+ EN: https://lynanbreeze.github.io/hexo-theme-linen-doc/
43
+
44
+ 简体中文: https://lynanbreeze.github.io/hexo-theme-linen-doc-zh-CN/
41
45
 
42
46
  ## License
43
47
 
@@ -19,6 +19,6 @@ const series = Array.from(new Set(site.posts.filter(item=>item.series).sort('dat
19
19
  <a href="<%=url_for('/archives/#tags')%>" target="_self"><%=site.tags.length%> <%=__('common.tags')%></a>
20
20
  <% if (series.length) { %>
21
21
  <span class="divider">/</span>
22
- <a href="<%url_for('/archives/#series')%>" target="_self"><%=series.length%> <%=__('common.series')%></a><% } %>
22
+ <a href="<%=url_for('/archives/#series')%>" target="_self"><%=series.length%> <%=__('common.series')%></a><% } %>
23
23
  </div>
24
24
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-linen",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "A clean Hexo theme",
5
5
  "main": "index.js",
6
6
  "homepage": "https://github.com/lynanbreeze/hexo-theme-linen",
@@ -53,6 +53,7 @@ hexo.extend.helper.register("take", function (arr, n = 1) {
53
53
  try {
54
54
  const page = this.page;
55
55
  const config = this.config;
56
+ const rootPath = config.root || "/";
56
57
  const translations = page.translations || [];
57
58
  const currentLanguage = page.language || config.language;
58
59
  const targetLanguage =
@@ -79,26 +80,27 @@ hexo.extend.helper.register("take", function (arr, n = 1) {
79
80
  let origin =
80
81
  config?.theme_config?.siteOriginLocaleMap?.[targetLanguage] ||
81
82
  config.url;
82
- let targetLanguagePath = `${origin}${this.url_for(page.path)}`;
83
+ let targetPath = this.url_for(page.path);
83
84
  if (page?.seriesInfo?.mappingName) {
84
- targetLanguagePath = `${origin}/series/${page?.seriesInfo?.mappingName}/`;
85
+ targetPath = this.url_for(`/series/${page?.seriesInfo?.mappingName}/`);
85
86
  }
86
87
  if (this.is_category()) {
87
88
  if (categoriesInfo?.[page.category]?.mappingName) {
88
- targetLanguagePath = `${origin}/categories/${
89
+ targetPath = this.url_for(`/categories/${
89
90
  categoriesInfo?.[page.category]?.mappingName
90
- }/`;
91
+ }/`);
91
92
  } else {
92
93
  hasTranslatation = false;
93
94
  }
94
95
  }
95
96
  if (this.is_tag()) {
96
97
  if (tagsInfo?.[page.tag]?.mappingName) {
97
- targetLanguagePath = `${origin}/tags/${tagsInfo?.[page.tag]?.mappingName}/`;
98
+ targetPath = this.url_for(`/tags/${tagsInfo?.[page.tag]?.mappingName}/`);
98
99
  } else {
99
100
  hasTranslatation = false;
100
101
  }
101
102
  }
103
+ const targetLanguagePath = `${origin}${targetPath.replace(rootPath, "")}`;
102
104
  return {
103
105
  hasTranslatation,
104
106
  targetLanguage,
package/scripts/rss.js CHANGED
@@ -30,8 +30,6 @@ hexo.extend.generator.register("rss", function (locals) {
30
30
  const getPostDate = hexo.extend.helper.get("getPostDate");
31
31
  const cssUrl = url_for.bind(hexo)(`/linen-theme/css/rss-${language.startsWith("zh") ? "zh" : "en"}.xsl`);
32
32
 
33
- console.log(cssUrl)
34
-
35
33
  const feed = `<?xml version="1.0" encoding="UTF-8" ?>
36
34
  <?xml-stylesheet type="text/xsl" href="${cssUrl}"?>
37
35
  <rss version="2.0">
@@ -1384,8 +1384,7 @@ body {
1384
1384
  }
1385
1385
  #post {
1386
1386
  margin: 0 auto;
1387
- padding: 0 $commonPadding;
1388
- padding-top: min(calc(3vw - 6px), 9px);
1387
+ padding: min(calc(3vw - 6px), 9px) $commonPadding;
1389
1388
  h1:first-child {
1390
1389
  margin-top: 0;
1391
1390
  }