Skip to content

Commit 1653ec4

Browse files
committed
vault backup: 2025-12-28 02:01:55
1 parent 8f90480 commit 1653ec4

File tree

5 files changed

+572
-1
lines changed

5 files changed

+572
-1
lines changed

.obsidian/workspace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"state": {
1616
"file": "source/_posts/2025全球贵金属市场年度深度报告:宏观范式重构、工业需求爆发与广期所(GFEX)的定价革命.md",
1717
"mode": "source",
18-
"source": false
18+
"source": true
1919
},
2020
"icon": "lucide-file",
2121
"title": "2025全球贵金属市场年度深度报告:宏观范式重构、工业需求爆发与广期所(GFEX)的定价革命"

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ i18n_dir: :lang
3232
skip_render:
3333
- '博客模板.md' # Skip render for this file
3434
- "charts/**"
35+
- '嵌入网站.md' # Skip render for this file
3536

3637
# Writing
3738
new_post_name: :title.md # File name of new posts

scripts/chart_tag.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Hexo Tag Plugin: MyChart
3+
* 使用方法: {% mychart folder_name [height] %}
4+
* 示例: {% mychart spforcast %} 或 {% mychart spforcast 800 %}
5+
*/
6+
hexo.extend.tag.register('mychart', function(args){
7+
var chartName = args[0];
8+
// 如果用户没填高度,默认给 600,填了就用填的
9+
var height = args[1] || 600;
10+
11+
// 注意:这里保留了 onload 自动调整高度的逻辑,
12+
// 但为了防止初始高度太小导致闪烁,给了一个 min-height
13+
return `
14+
<div style="width: 100%; margin: 20px 0;">
15+
<iframe
16+
src="/charts/${chartName}/"
17+
width="100%"
18+
height="${height}"
19+
scrolling="no"
20+
style="border:none; min-height: ${height}px;"
21+
onload="setTimeout(()=>{this.style.height=(this.contentWindow.document.body.scrollHeight+20)+'px'}, 500);">
22+
</iframe>
23+
</div>
24+
`;
25+
});

0 commit comments

Comments
 (0)