Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
9860fc7749
12 changed files with 217 additions and 29 deletions
|
@ -8,9 +8,55 @@
|
|||
"title": "Please Start Here",
|
||||
"title-img": "background-color:#556;background-image: linear-gradient(30deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(150deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(30deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(150deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(60deg, #99a 25%, transparent 25.5%, transparent 75%, #99a 75%, #99a),linear-gradient(60deg, #99a 25%, transparent 25.5%, transparent 75%, #99a 75%, #99a);background-size:80px 140px;background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;",
|
||||
"type": "doc",
|
||||
"updated": "20241018102340"
|
||||
"updated": "20241125224626"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20241125224615-dwfqru1",
|
||||
"Type": "NodeBlockquote",
|
||||
"Properties": {
|
||||
"id": "20241125224615-dwfqru1",
|
||||
"updated": "20241125224626"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeBlockquoteMarker",
|
||||
"Data": "\u003e"
|
||||
},
|
||||
{
|
||||
"ID": "20241125224615-z2fevdf",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20241125224615-z2fevdf",
|
||||
"updated": "20241125224626"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "When you close SiYuan Notes, the User Guide will be automatically closed. You can click "
|
||||
},
|
||||
{
|
||||
"Type": "NodeTextMark",
|
||||
"TextMarkType": "kbd",
|
||||
"TextMarkTextContent": "Main Menu"
|
||||
},
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": " - "
|
||||
},
|
||||
{
|
||||
"Type": "NodeTextMark",
|
||||
"TextMarkType": "kbd",
|
||||
"TextMarkTextContent": "User Guide"
|
||||
},
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": " to view it again"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20210528120135-bznvpp6",
|
||||
"Type": "NodeSuperBlock",
|
||||
|
|
|
@ -8,9 +8,55 @@
|
|||
"title": "请从这里开始",
|
||||
"title-img": "background-color:#556;background-image: linear-gradient(30deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(150deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(30deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(150deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(60deg, #99a 25%, transparent 25.5%, transparent 75%, #99a 75%, #99a),linear-gradient(60deg, #99a 25%, transparent 25.5%, transparent 75%, #99a 75%, #99a);background-size:80px 140px;background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;",
|
||||
"type": "doc",
|
||||
"updated": "20241018102134"
|
||||
"updated": "20241125224159"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20241125224159-8zf3bos",
|
||||
"Type": "NodeBlockquote",
|
||||
"Properties": {
|
||||
"id": "20241125224159-8zf3bos",
|
||||
"updated": "20241125224159"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeBlockquoteMarker",
|
||||
"Data": "\u003e"
|
||||
},
|
||||
{
|
||||
"ID": "20241125224159-vcaj2bv",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20241125224159-vcaj2bv",
|
||||
"updated": "20241125224159"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "关闭思源笔记时会自动关闭用户指南,可以点击 "
|
||||
},
|
||||
{
|
||||
"Type": "NodeTextMark",
|
||||
"TextMarkType": "kbd",
|
||||
"TextMarkTextContent": "主菜单"
|
||||
},
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": " - "
|
||||
},
|
||||
{
|
||||
"Type": "NodeTextMark",
|
||||
"TextMarkType": "kbd",
|
||||
"TextMarkTextContent": "用户指南"
|
||||
},
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": " 再次查看"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20210528115012-vst5lwt",
|
||||
"Type": "NodeSuperBlock",
|
||||
|
|
|
@ -8,9 +8,55 @@
|
|||
"title": "請從這裡開始",
|
||||
"title-img": "background-color:#556;background-image: linear-gradient(30deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(150deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(30deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(150deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(60deg, #99a 25%, transparent 25.5%, transparent 75%, #99a 75%, #99a),linear-gradient(60deg, #99a 25%, transparent 25.5%, transparent 75%, #99a 75%, #99a);background-size:80px 140px;background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;",
|
||||
"type": "doc",
|
||||
"updated": "20241018105300"
|
||||
"updated": "20241125224503"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20241125224503-8vqkbc9",
|
||||
"Type": "NodeBlockquote",
|
||||
"Properties": {
|
||||
"id": "20241125224503-8vqkbc9",
|
||||
"updated": "20241125224503"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeBlockquoteMarker",
|
||||
"Data": "\u003e"
|
||||
},
|
||||
{
|
||||
"ID": "20241125224503-fqq0875",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20241125224503-fqq0875",
|
||||
"updated": "20241125224503"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "關閉思源筆記時會自動關閉用戶指南,可以點擊 "
|
||||
},
|
||||
{
|
||||
"Type": "NodeTextMark",
|
||||
"TextMarkType": "kbd",
|
||||
"TextMarkTextContent": "主菜單"
|
||||
},
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": " - "
|
||||
},
|
||||
{
|
||||
"Type": "NodeTextMark",
|
||||
"TextMarkType": "kbd",
|
||||
"TextMarkTextContent": "用戶指南"
|
||||
},
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": " 再次查看"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20211226115745-rorv31l",
|
||||
"Type": "NodeSuperBlock",
|
||||
|
|
|
@ -9,9 +9,55 @@
|
|||
"title": "スタートガイド",
|
||||
"title-img": "background-color:#556;background-image: linear-gradient(30deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(150deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(30deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(150deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),linear-gradient(60deg, #99a 25%, transparent 25.5%, transparent 75%, #99a 75%, #99a),linear-gradient(60deg, #99a 25%, transparent 25.5%, transparent 75%, #99a 75%, #99a);background-size:80px 140px;background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;",
|
||||
"type": "doc",
|
||||
"updated": "20241018102426"
|
||||
"updated": "20241125225136"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20241125224702-5a9o34q",
|
||||
"Type": "NodeBlockquote",
|
||||
"Properties": {
|
||||
"id": "20241125224702-5a9o34q",
|
||||
"updated": "20241125225136"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeBlockquoteMarker",
|
||||
"Data": "\u003e"
|
||||
},
|
||||
{
|
||||
"ID": "20241125225100-s0akx3f",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20241125225100-s0akx3f",
|
||||
"updated": "20241125225136"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "SiYuan を閉じると、ユーザーガイドは自動的に閉じられます。"
|
||||
},
|
||||
{
|
||||
"Type": "NodeTextMark",
|
||||
"TextMarkType": "kbd",
|
||||
"TextMarkTextContent": "メインメニュー"
|
||||
},
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": " - "
|
||||
},
|
||||
{
|
||||
"Type": "NodeTextMark",
|
||||
"TextMarkType": "kbd",
|
||||
"TextMarkTextContent": "ユーザーガイド"
|
||||
},
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": " をクリックすると、再度表示できます"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20240530101000-x3xk6o7",
|
||||
"Type": "NodeSuperBlock",
|
||||
|
|
|
@ -6,7 +6,7 @@ const INITIAL_CACHED_RESOURCES = [
|
|||
"/stage/icon-large.png",
|
||||
"/stage/icon.png",
|
||||
"/stage/loading-pure.svg",
|
||||
"/stage/build/fonts/JetBrainsMono-Regular.woff",
|
||||
"/stage/build/fonts/JetBrainsMono-Regular.woff2",
|
||||
"/stage/protyle/js/lute/lute.min.js",
|
||||
"/stage/protyle/js/protyle-html.js"
|
||||
];
|
||||
|
|
|
@ -76,10 +76,10 @@ module.exports = (env, argv) => {
|
|||
],
|
||||
},
|
||||
{
|
||||
test: /\.woff$/,
|
||||
test: /\.woff2$/,
|
||||
type: "asset/resource",
|
||||
generator: {
|
||||
filename: "../fonts/JetBrainsMono-Regular.woff",
|
||||
filename: "../fonts/JetBrainsMono-Regular.woff2",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -79,10 +79,10 @@ module.exports = (env, argv) => {
|
|||
],
|
||||
},
|
||||
{
|
||||
test: /\.woff$/,
|
||||
test: /\.woff2$/,
|
||||
type: "asset/resource",
|
||||
generator: {
|
||||
filename: "../fonts/JetBrainsMono-Regular.woff",
|
||||
filename: "../fonts/JetBrainsMono-Regular.woff2",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -72,10 +72,10 @@ module.exports = (env, argv) => {
|
|||
],
|
||||
},
|
||||
{
|
||||
test: /\.woff$/,
|
||||
test: /\.woff2$/,
|
||||
type: "asset/resource",
|
||||
generator: {
|
||||
filename: "../fonts/JetBrainsMono-Regular.woff",
|
||||
filename: "../fonts/JetBrainsMono-Regular.woff2",
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
@ -80,10 +80,10 @@ module.exports = (env, argv) => {
|
|||
],
|
||||
},
|
||||
{
|
||||
test: /\.woff$/,
|
||||
test: /\.woff2$/,
|
||||
type: "asset/resource",
|
||||
generator: {
|
||||
filename: "../fonts/JetBrainsMono-Regular.woff",
|
||||
filename: "../fonts/JetBrainsMono-Regular.woff2",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -614,11 +614,7 @@ func matchBacklinkKeyword(block *Block, keywords []string) bool {
|
|||
|
||||
for _, k := range keywords {
|
||||
k = strings.ToLower(k)
|
||||
content := block.Content
|
||||
if block.IsContainerBlock() {
|
||||
content = block.FContent
|
||||
}
|
||||
if strings.Contains(strings.ToLower(content), k) ||
|
||||
if strings.Contains(strings.ToLower(block.Content), k) ||
|
||||
strings.Contains(strings.ToLower(path.Base(block.HPath)), k) ||
|
||||
strings.Contains(strings.ToLower(block.Name), k) ||
|
||||
strings.Contains(strings.ToLower(block.Alias), k) ||
|
||||
|
|
|
@ -1944,6 +1944,8 @@ func exportMarkdownContent0(tree *parse.Tree, cloudAssetsBase string, assetsDest
|
|||
})
|
||||
}
|
||||
|
||||
currentDocDir := path.Dir(tree.HPath)
|
||||
|
||||
var unlinks []*ast.Node
|
||||
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
if !entering {
|
||||
|
@ -1979,11 +1981,17 @@ func exportMarkdownContent0(tree *parse.Tree, cloudAssetsBase string, assetsDest
|
|||
var href string
|
||||
bt := treenode.GetBlockTree(defID)
|
||||
if nil != bt {
|
||||
href += strings.TrimPrefix(bt.HPath, "/") + ".md"
|
||||
href += bt.HPath + ".md"
|
||||
if "d" != bt.Type {
|
||||
href += "#" + defID
|
||||
}
|
||||
if tree.ID == bt.RootID {
|
||||
href = "#" + defID
|
||||
}
|
||||
}
|
||||
href = strings.TrimPrefix(href, currentDocDir)
|
||||
href = util.FilterFilePath(href)
|
||||
href = strings.TrimPrefix(href, "/")
|
||||
blockRefLink := &ast.Node{Type: ast.NodeTextMark, TextMarkType: "a", TextMarkTextContent: linkText, TextMarkAHref: href}
|
||||
blockRefLink.KramdownIAL = n.KramdownIAL
|
||||
n.InsertBefore(blockRefLink)
|
||||
|
|
|
@ -231,16 +231,16 @@ func FilterFilePath(p string) (ret string) {
|
|||
}
|
||||
|
||||
func FilterFileName(name string) string {
|
||||
name = strings.ReplaceAll(name, "\\", "")
|
||||
name = strings.ReplaceAll(name, "/", "")
|
||||
name = strings.ReplaceAll(name, ":", "")
|
||||
name = strings.ReplaceAll(name, "*", "")
|
||||
name = strings.ReplaceAll(name, "?", "")
|
||||
name = strings.ReplaceAll(name, "\"", "")
|
||||
name = strings.ReplaceAll(name, "'", "")
|
||||
name = strings.ReplaceAll(name, "<", "")
|
||||
name = strings.ReplaceAll(name, ">", "")
|
||||
name = strings.ReplaceAll(name, "|", "")
|
||||
name = strings.ReplaceAll(name, "\\", "_")
|
||||
name = strings.ReplaceAll(name, "/", "_")
|
||||
name = strings.ReplaceAll(name, ":", "_")
|
||||
name = strings.ReplaceAll(name, "*", "_")
|
||||
name = strings.ReplaceAll(name, "?", "_")
|
||||
name = strings.ReplaceAll(name, "\"", "_")
|
||||
name = strings.ReplaceAll(name, "'", "_")
|
||||
name = strings.ReplaceAll(name, "<", "_")
|
||||
name = strings.ReplaceAll(name, ">", "_")
|
||||
name = strings.ReplaceAll(name, "|", "_")
|
||||
name = strings.TrimSpace(name)
|
||||
name = gulu.Str.RemoveInvisible(name) // Remove invisible characters from file names when uploading assets https://github.com/siyuan-note/siyuan/issues/11683
|
||||
return name
|
||||
|
|
Loading…
Add table
Reference in a new issue