Skip to content

Commit 689186b

Browse files
author
JavasHub
committed
update theme
1 parent b12fcd0 commit 689186b

File tree

5 files changed

+35
-29
lines changed

5 files changed

+35
-29
lines changed

config/.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
APPLICATION_ID=KH7SY7AEUO
2+
API_KEY=c8df03a5a5e8ac753a318c6595fb6658

config/config.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"index_name": "imlyk",
3+
"rateLimit": 8,
4+
"start_urls": [
5+
"https://imlyk.cn/"
6+
],
7+
"discoveryPatterns": ["https://imlyk.cn/**"],
8+
"recordProps": {
9+
"lvl0": {
10+
"selectors": ".sidebar-heading.active",
11+
"defaultValue": "Documentation"
12+
},
13+
"lvl1": ".theme-hope-content h1",
14+
"lvl2": ".theme-hope-content h2",
15+
"lvl3": ".theme-hope-content h3",
16+
"lvl4": ".theme-hope-content h4",
17+
"lvl5": ".theme-hope-content h5",
18+
"lvl6": ".theme-hope-content h6",
19+
"content": ".theme-hope-content p, .theme-hope-content ul, .theme-hope-content li"
20+
},
21+
"indexHeadings": true,
22+
"scrape_start_urls": false,
23+
"strip_chars": " .,;:#",
24+
"custom_settings": {
25+
"attributesForFaceting": [
26+
"lang"
27+
]
28+
}
29+
}

run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker run -it --env-file=.env -e "CONFIG=$(cat /Users/mac/blog/JavasHub/config.json | jq -r tostring)" algolia/docsearch-scraper

src/.vuepress/config.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@ export default defineUserConfig({
1010

1111
lang: "zh-CN",
1212
title: "JavasHub",
13-
description: "描述信息",
13+
description: "",
1414

1515
theme,
1616

1717
// index.html中注入 head 参考:https://theme-hope.vuejs.press/zh/guide/customize/font.html#%E4%BA%BA%E4%BA%BA%E7%94%9F%E8%80%8C%E8%87%AA%E7%94%B1
1818
head: [
19-
// 正确的link标签配置
20-
['link', { rel: 'stylesheet', href: 'https://cdn.jsdelivr.net/npm/@docsearch/css@3' }],
21-
// 正确的script标签配置
22-
['script', { src: 'https://cdn.jsdelivr.net/npm/@docsearch/js@3', async: true }]
19+
["link", { rel: "stylesheet", href: "https://cdn.jsdelivr.net/npm/@docsearch/css@3" }],
20+
["script", { src: "https://cdn.jsdelivr.net/npm/@docsearch/js@3" }],
2321
],
2422

2523
// 对更低版本的浏览器提供支持

src/.vuepress/index.html

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)