Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

Commit eea7062

Browse files
committed
chore: 控制台美化
1 parent bd30107 commit eea7062

2 files changed

Lines changed: 18 additions & 24 deletions

File tree

themes/midori/hugo.toml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
baseURL = 'https://example.org/'
2-
languageCode = 'en-US'
3-
title = 'My New Hugo Site'
4-
5-
[menus]
6-
[[menus.main]]
7-
name = 'Home'
8-
pageRef = '/'
9-
weight = 10
10-
11-
[[menus.main]]
12-
name = 'Posts'
13-
pageRef = '/posts'
14-
weight = 20
15-
16-
[[menus.main]]
17-
name = 'Tags'
18-
pageRef = '/tags'
19-
weight = 30
20-
21-
[module]
22-
[module.hugoVersion]
23-
extended = false
24-
min = '0.146.0'
1+
[params]
2+
themeName = "Midori"
3+
version = "0.1.0"

themes/midori/layouts/_default/baseof.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@
2121
</footer>
2222
</div>
2323
</div>
24+
25+
<script>
26+
(function() {
27+
const themeName = '{{ .Site.Params.themeName | default "Midori" }}';
28+
const version = '{{ .Site.Params.version | default "0.1.0" }}';
29+
const hugoVersion = '{{ hugo.Version }}';
30+
31+
console.log(
32+
`%c Theme ${themeName} %c v${version} %c Hugo ${hugoVersion} `,
33+
'background: #44c96a; color: #fff; padding: 5px 0; border-radius: 3px 0 0 3px; font-weight: bold;',
34+
'background: #333; color: #fff; padding: 5px 0; font-weight: bold;',
35+
'background: #eee; color: #333; padding: 5px 0; border-radius: 0 3px 3px 0;'
36+
);
37+
})();
38+
</script>
2439
</body>
2540

2641
</html>

0 commit comments

Comments
 (0)