diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 125421bef..45b73859b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,6 +67,12 @@ There are some attributes in the frontmatter of each Markdown file: - `weight`: The weight of this page used when sorting pages. The page with the bigger weight is after the page with the smaller weight. - `description`: The description of this page, displayed in the list of pages and the top of this page. +## Internal links + +In Markdown files, please use `[](<relative path to the file>#<fragment>)` to make internal links. + +For example: `[Preferences->Languages->C++->C++ Commands](../preferences/language/_index.md#c-commands)`. + ## Markdown Formatting We use [remark-lint](https://github.com/remarkjs/remark-lint) to format Markdown files. diff --git a/content/docs/FAQ/_index.md b/content/docs/faq/_index.md similarity index 93% rename from content/docs/FAQ/_index.md rename to content/docs/faq/_index.md index 47a6c56b0..bddee6760 100644 --- a/content/docs/FAQ/_index.md +++ b/content/docs/faq/_index.md @@ -14,4 +14,4 @@ description: Frequently asked questions by CP Editor users - When I click the Submit button, I get some message saying template is required? - `cf` tool requires you to configure it before you use it. Please run `cf config` to set the username & password and add a template. - How to enable error linting in the code editor? - - You need to install a [Language Server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set the settings in Preferences -> Extensions -> Language Server. You can learn about more details [here](../setup#setup-language-server). + - You need to install a [Language Server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set the settings in Preferences -> Extensions -> Language Server. You can learn about more details [here](../setup/_index.md#setup-language-server). diff --git a/content/docs/FAQ/_index.ru.md b/content/docs/faq/_index.ru.md similarity index 93% rename from content/docs/FAQ/_index.ru.md rename to content/docs/faq/_index.ru.md index 47a6c56b0..4dc2bb05e 100644 --- a/content/docs/FAQ/_index.ru.md +++ b/content/docs/faq/_index.ru.md @@ -14,4 +14,4 @@ description: Frequently asked questions by CP Editor users - When I click the Submit button, I get some message saying template is required? - `cf` tool requires you to configure it before you use it. Please run `cf config` to set the username & password and add a template. - How to enable error linting in the code editor? - - You need to install a [Language Server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set the settings in Preferences -> Extensions -> Language Server. You can learn about more details [here](../setup#setup-language-server). + - You need to install a [Language Server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set the settings in Preferences -> Extensions -> Language Server. You can learn about more details [here](../setup/_index.ru.md#setup-language-server). diff --git a/content/docs/FAQ/_index.zh.md b/content/docs/faq/_index.zh.md similarity index 93% rename from content/docs/FAQ/_index.zh.md rename to content/docs/faq/_index.zh.md index 47a6c56b0..c6d6bfa20 100644 --- a/content/docs/FAQ/_index.zh.md +++ b/content/docs/faq/_index.zh.md @@ -14,4 +14,4 @@ description: Frequently asked questions by CP Editor users - When I click the Submit button, I get some message saying template is required? - `cf` tool requires you to configure it before you use it. Please run `cf config` to set the username & password and add a template. - How to enable error linting in the code editor? - - You need to install a [Language Server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set the settings in Preferences -> Extensions -> Language Server. You can learn about more details [here](../setup#setup-language-server). + - You need to install a [Language Server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set the settings in Preferences -> Extensions -> Language Server. You can learn about more details [here](../setup/_index.zh.md#setup-language-server). diff --git a/content/docs/Installation/_index.md b/content/docs/installation/_index.md similarity index 100% rename from content/docs/Installation/_index.md rename to content/docs/installation/_index.md diff --git a/content/docs/Installation/_index.ru.md b/content/docs/installation/_index.ru.md similarity index 100% rename from content/docs/Installation/_index.ru.md rename to content/docs/installation/_index.ru.md diff --git a/content/docs/Installation/_index.zh.md b/content/docs/installation/_index.zh.md similarity index 100% rename from content/docs/Installation/_index.zh.md rename to content/docs/installation/_index.zh.md diff --git a/content/docs/Installation/Build from AUR/_index.md b/content/docs/installation/build-from-aur/_index.md similarity index 100% rename from content/docs/Installation/Build from AUR/_index.md rename to content/docs/installation/build-from-aur/_index.md diff --git a/content/docs/Installation/Build from AUR/_index.ru.md b/content/docs/installation/build-from-aur/_index.ru.md similarity index 100% rename from content/docs/Installation/Build from AUR/_index.ru.md rename to content/docs/installation/build-from-aur/_index.ru.md diff --git a/content/docs/Installation/Build from AUR/_index.zh.md b/content/docs/installation/build-from-aur/_index.zh.md similarity index 100% rename from content/docs/Installation/Build from AUR/_index.zh.md rename to content/docs/installation/build-from-aur/_index.zh.md diff --git a/content/docs/Installation/Build from source/_index.md b/content/docs/installation/build-from-source/_index.md similarity index 100% rename from content/docs/Installation/Build from source/_index.md rename to content/docs/installation/build-from-source/_index.md diff --git a/content/docs/Installation/Build from source/_index.ru.md b/content/docs/installation/build-from-source/_index.ru.md similarity index 100% rename from content/docs/Installation/Build from source/_index.ru.md rename to content/docs/installation/build-from-source/_index.ru.md diff --git a/content/docs/Installation/Build from source/_index.zh.md b/content/docs/installation/build-from-source/_index.zh.md similarity index 100% rename from content/docs/Installation/Build from source/_index.zh.md rename to content/docs/installation/build-from-source/_index.zh.md diff --git a/content/docs/Installation/Install from binaries/_index.md b/content/docs/installation/install-from-binaries/_index.md similarity index 100% rename from content/docs/Installation/Install from binaries/_index.md rename to content/docs/installation/install-from-binaries/_index.md diff --git a/content/docs/Installation/Install from binaries/_index.ru.md b/content/docs/installation/install-from-binaries/_index.ru.md similarity index 100% rename from content/docs/Installation/Install from binaries/_index.ru.md rename to content/docs/installation/install-from-binaries/_index.ru.md diff --git a/content/docs/Installation/Install from binaries/_index.zh.md b/content/docs/installation/install-from-binaries/_index.zh.md similarity index 100% rename from content/docs/Installation/Install from binaries/_index.zh.md rename to content/docs/installation/install-from-binaries/_index.zh.md diff --git a/content/docs/Installation/Use Artifacts/_index.md b/content/docs/installation/use-artifacts/_index.md similarity index 100% rename from content/docs/Installation/Use Artifacts/_index.md rename to content/docs/installation/use-artifacts/_index.md diff --git a/content/docs/Installation/Use Artifacts/_index.ru.md b/content/docs/installation/use-artifacts/_index.ru.md similarity index 100% rename from content/docs/Installation/Use Artifacts/_index.ru.md rename to content/docs/installation/use-artifacts/_index.ru.md diff --git a/content/docs/Installation/Use Artifacts/_index.zh.md b/content/docs/installation/use-artifacts/_index.zh.md similarity index 100% rename from content/docs/Installation/Use Artifacts/_index.zh.md rename to content/docs/installation/use-artifacts/_index.zh.md diff --git a/content/docs/Preferences/_index.md b/content/docs/preferences/_index.md similarity index 100% rename from content/docs/Preferences/_index.md rename to content/docs/preferences/_index.md diff --git a/content/docs/Preferences/_index.ru.md b/content/docs/preferences/_index.ru.md similarity index 100% rename from content/docs/Preferences/_index.ru.md rename to content/docs/preferences/_index.ru.md diff --git a/content/docs/Preferences/_index.zh.md b/content/docs/preferences/_index.zh.md similarity index 100% rename from content/docs/Preferences/_index.zh.md rename to content/docs/preferences/_index.zh.md diff --git a/content/docs/Preferences/Actions/_index.md b/content/docs/preferences/actions/_index.md similarity index 99% rename from content/docs/Preferences/Actions/_index.md rename to content/docs/preferences/actions/_index.md index c64f962a8..c80762b2e 100644 --- a/content/docs/Preferences/Actions/_index.md +++ b/content/docs/preferences/actions/_index.md @@ -23,7 +23,7 @@ Save your code when executing it. Save the test cases on the disk when saving the code. -You can choose where to save the test cases in [File Path/Testcases](../file-path#testcases). +You can choose where to save the test cases in [File Path/Testcases](../file-path/_index.md#testcases). ## Auto Save diff --git a/content/docs/Preferences/Actions/_index.ru.md b/content/docs/preferences/actions/_index.ru.md similarity index 99% rename from content/docs/Preferences/Actions/_index.ru.md rename to content/docs/preferences/actions/_index.ru.md index c64f962a8..c7c7fb856 100644 --- a/content/docs/Preferences/Actions/_index.ru.md +++ b/content/docs/preferences/actions/_index.ru.md @@ -23,7 +23,7 @@ Save your code when executing it. Save the test cases on the disk when saving the code. -You can choose where to save the test cases in [File Path/Testcases](../file-path#testcases). +You can choose where to save the test cases in [File Path/Testcases](../file-path/_index.ru.md#testcases). ## Auto Save diff --git a/content/docs/Preferences/Actions/_index.zh.md b/content/docs/preferences/actions/_index.zh.md similarity index 99% rename from content/docs/Preferences/Actions/_index.zh.md rename to content/docs/preferences/actions/_index.zh.md index c64f962a8..25fa76313 100644 --- a/content/docs/Preferences/Actions/_index.zh.md +++ b/content/docs/preferences/actions/_index.zh.md @@ -23,7 +23,7 @@ Save your code when executing it. Save the test cases on the disk when saving the code. -You can choose where to save the test cases in [File Path/Testcases](../file-path#testcases). +You can choose where to save the test cases in [File Path/Testcases](../file-path/_index.zh.md#testcases). ## Auto Save diff --git a/content/docs/Preferences/Advanced/_index.md b/content/docs/preferences/advanced/_index.md similarity index 100% rename from content/docs/Preferences/Advanced/_index.md rename to content/docs/preferences/advanced/_index.md diff --git a/content/docs/Preferences/Advanced/_index.ru.md b/content/docs/preferences/advanced/_index.ru.md similarity index 100% rename from content/docs/Preferences/Advanced/_index.ru.md rename to content/docs/preferences/advanced/_index.ru.md diff --git a/content/docs/Preferences/Advanced/_index.zh.md b/content/docs/preferences/advanced/_index.zh.md similarity index 100% rename from content/docs/Preferences/Advanced/_index.zh.md rename to content/docs/preferences/advanced/_index.zh.md diff --git a/content/docs/Preferences/Appearance/_index.md b/content/docs/preferences/appearance/_index.md similarity index 100% rename from content/docs/Preferences/Appearance/_index.md rename to content/docs/preferences/appearance/_index.md diff --git a/content/docs/Preferences/Appearance/_index.ru.md b/content/docs/preferences/appearance/_index.ru.md similarity index 100% rename from content/docs/Preferences/Appearance/_index.ru.md rename to content/docs/preferences/appearance/_index.ru.md diff --git a/content/docs/Preferences/Appearance/_index.zh.md b/content/docs/preferences/appearance/_index.zh.md similarity index 100% rename from content/docs/Preferences/Appearance/_index.zh.md rename to content/docs/preferences/appearance/_index.zh.md diff --git a/content/docs/Preferences/Code Edit/_index.md b/content/docs/preferences/code-edit/_index.md similarity index 93% rename from content/docs/Preferences/Code Edit/_index.md rename to content/docs/preferences/code-edit/_index.md index 5a00079e3..cef820c5a 100644 --- a/content/docs/Preferences/Code Edit/_index.md +++ b/content/docs/preferences/code-edit/_index.md @@ -22,19 +22,19 @@ Automatically add the right parenthesis when you type the left one. For example, When the character next to the cursor is a right parenthesis and you type this parenthesis, instead of typing this parenthesis, the cursor will jump out of the parenthesis. -You can choose the parentheses to auto-complete in the [Parentheses](../language#parentheses) settings. +You can choose the parentheses to auto-complete in the [Parentheses](../language/_index.md#parentheses) settings. ### Auto Remove Parentheses When you delete a left parenthesis, if a corresponding right parenthesis is next to it, the right parenthesis will also be deleted. -You can choose the parentheses to auto-remove in the [Parentheses](../language#parentheses) settings. +You can choose the parentheses to auto-remove in the [Parentheses](../language/_index.md#parentheses) settings. ### Jump out of a parenthesis by pressing Tab When the cursor is next to a right parenthesis, you can use the Tab key to jump out of it. If [Auto Complete Parentheses](#auto-complete-parentheses) is enabled, this is an alternative of typing the right parenthesis. -You can choose the parentheses to jump out by Tab in the [Parentheses](../language#parentheses) settings. +You can choose the parentheses to jump out by Tab in the [Parentheses](../language/_index.md#parentheses) settings. ### Replace tabs by spaces diff --git a/content/docs/Preferences/Code Edit/_index.ru.md b/content/docs/preferences/code-edit/_index.ru.md similarity index 92% rename from content/docs/Preferences/Code Edit/_index.ru.md rename to content/docs/preferences/code-edit/_index.ru.md index 5a00079e3..d605fac8c 100644 --- a/content/docs/Preferences/Code Edit/_index.ru.md +++ b/content/docs/preferences/code-edit/_index.ru.md @@ -22,19 +22,19 @@ Automatically add the right parenthesis when you type the left one. For example, When the character next to the cursor is a right parenthesis and you type this parenthesis, instead of typing this parenthesis, the cursor will jump out of the parenthesis. -You can choose the parentheses to auto-complete in the [Parentheses](../language#parentheses) settings. +You can choose the parentheses to auto-complete in the [Parentheses](../language/_index.ru.md#parentheses) settings. ### Auto Remove Parentheses When you delete a left parenthesis, if a corresponding right parenthesis is next to it, the right parenthesis will also be deleted. -You can choose the parentheses to auto-remove in the [Parentheses](../language#parentheses) settings. +You can choose the parentheses to auto-remove in the [Parentheses](../language/_index.ru.md#parentheses) settings. ### Jump out of a parenthesis by pressing Tab When the cursor is next to a right parenthesis, you can use the Tab key to jump out of it. If [Auto Complete Parentheses](#auto-complete-parentheses) is enabled, this is an alternative of typing the right parenthesis. -You can choose the parentheses to jump out by Tab in the [Parentheses](../language#parentheses) settings. +You can choose the parentheses to jump out by Tab in the [Parentheses](../language/_index.ru.md#parentheses) settings. ### Replace tabs by spaces diff --git a/content/docs/Preferences/Code Edit/_index.zh.md b/content/docs/preferences/code-edit/_index.zh.md similarity index 83% rename from content/docs/Preferences/Code Edit/_index.zh.md rename to content/docs/preferences/code-edit/_index.zh.md index 29a8acfde..a8c47cc8e 100644 --- a/content/docs/Preferences/Code Edit/_index.zh.md +++ b/content/docs/preferences/code-edit/_index.zh.md @@ -22,19 +22,19 @@ weight: 10 如果光标处右边的第一个字符是右括号,而你输入了一个右括号,光标将会自动跳到该右括号后面,而不再输入右括号。 -你可以在各语言的 [括号](../language#括号) 设置中设置各语言自动补全的括号类型。 +你可以在各语言的 [括号](../language/_index.zh.md#括号) 设置中设置各语言自动补全的括号类型。 ### 自动删除括号 在删除一个左括号时,如果其右侧有一个右括号相邻,则该右括号也会被自动删除。 -你可以在各语言的 [括号](../language#括号) 设置中设置各语言自动删除的括号类型。 +你可以在各语言的 [括号](../language/_index.zh.md#括号) 设置中设置各语言自动删除的括号类型。 ### 在按下 Tab 键时跳出括号 如果光标处右边的第一个字符时右括号,你可以通过按下 Tab 键来自动跳出这对括号。如果 [自动补全括号](#自动补全括号) 选项被启用,这种方式可以作为输入右括号的另一种方式。 -你可以在各语言的 [括号](../language#括号) 设置中设置各语言按下 Tab 时自动跳出的括号类型。 +你可以在各语言的 [括号](../language/_index.zh.md#括号) 设置中设置各语言按下 Tab 时自动跳出的括号类型。 ### 将制表符替换为空格 diff --git a/content/docs/Preferences/Extensions/_index.md b/content/docs/preferences/extensions/_index.md similarity index 93% rename from content/docs/Preferences/Extensions/_index.md rename to content/docs/preferences/extensions/_index.md index 7971a0815..56e76f5b4 100644 --- a/content/docs/Preferences/Extensions/_index.md +++ b/content/docs/preferences/extensions/_index.md @@ -9,7 +9,7 @@ weight: 50 Clang Format is used to format the C/C++ and Java codes. You can click Actions->Format Code or press the shortcut <kbd>Ctrl+Shift+I</kbd> to format the codes. If you have selected a part of the code, only the selection (and its necessary adjacent codes) will be formatted. -**See also** [Setup Clang Format](../../setup#clang-format). +**See also** [Setup Clang Format](../../setup/_index.md#setup-clang-format). #### Program @@ -29,7 +29,7 @@ You can read [Clang-Format Style Options documentation](https://clang.llvm.org/d YAPF is used to format the Python codes. You can click Actions->Format Code or press the shortcut <kbd>Ctrl+Shift+I</kbd> to format the codes. If you have selected a part of the code, only these lines will be formatted. -**See also** [Setup YAPF](../../setup#yapf). +**See also** [Setup YAPF](../../setup/_index.md#yapf). #### Program @@ -50,7 +50,7 @@ The YAPF Format style. The content here is the same as the content of a `.style. ## Language Server -**See also** [Setup Language Server](../../setup#setup-language-server). +**See also** [Setup Language Server](../../setup/_index.md#setup-language-server). ### Use Linting with Language Server @@ -74,7 +74,7 @@ For example, if you are using `pyls` for Python, you probably want to use `pytho ## Competitive Companion -**See also** [Setup Competitive Companion](../../setup#setup-competitive-companion). +**See also** [Setup Competitive Companion](../../setup/_index.md#setup-competitive-companion). ### Open New Tabs @@ -114,7 +114,7 @@ You can use [CF Tool](https://github.com/xalanq/cf-tool/) to submit your solutio To submit a solution, you have to either parse a problem by [Competitive Companion](#competitive-companion) from Codeforces, or manually set the problem URL of a tab in the context menu of it. -**See also** [Setup CF Tool](../../setup#setup-cf-tool). +**See also** [Setup CF Tool](../../setup/_index.md#setup-cf-tool). ### Path diff --git a/content/docs/Preferences/Extensions/_index.ru.md b/content/docs/preferences/extensions/_index.ru.md similarity index 92% rename from content/docs/Preferences/Extensions/_index.ru.md rename to content/docs/preferences/extensions/_index.ru.md index 7971a0815..801f296e0 100644 --- a/content/docs/Preferences/Extensions/_index.ru.md +++ b/content/docs/preferences/extensions/_index.ru.md @@ -9,7 +9,7 @@ weight: 50 Clang Format is used to format the C/C++ and Java codes. You can click Actions->Format Code or press the shortcut <kbd>Ctrl+Shift+I</kbd> to format the codes. If you have selected a part of the code, only the selection (and its necessary adjacent codes) will be formatted. -**See also** [Setup Clang Format](../../setup#clang-format). +**See also** [Setup Clang Format](../../setup/_index.ru.md#setup-clang-format). #### Program @@ -29,7 +29,7 @@ You can read [Clang-Format Style Options documentation](https://clang.llvm.org/d YAPF is used to format the Python codes. You can click Actions->Format Code or press the shortcut <kbd>Ctrl+Shift+I</kbd> to format the codes. If you have selected a part of the code, only these lines will be formatted. -**See also** [Setup YAPF](../../setup#yapf). +**See also** [Setup YAPF](../../setup/_index.ru.md#yapf). #### Program @@ -50,7 +50,7 @@ The YAPF Format style. The content here is the same as the content of a `.style. ## Language Server -**See also** [Setup Language Server](../../setup#setup-language-server). +**See also** [Setup Language Server](../../setup/_index.ru.md#setup-language-server). ### Use Linting with Language Server @@ -74,7 +74,7 @@ For example, if you are using `pyls` for Python, you probably want to use `pytho ## Competitive Companion -**See also** [Setup Competitive Companion](../../setup#setup-competitive-companion). +**See also** [Setup Competitive Companion](../../setup/_index.ru.md#setup-competitive-companion). ### Open New Tabs @@ -114,7 +114,7 @@ You can use [CF Tool](https://github.com/xalanq/cf-tool/) to submit your solutio To submit a solution, you have to either parse a problem by [Competitive Companion](#competitive-companion) from Codeforces, or manually set the problem URL of a tab in the context menu of it. -**See also** [Setup CF Tool](../../setup#setup-cf-tool). +**See also** [Setup CF Tool](../../setup/_index.ru.md#setup-cf-tool). ### Path diff --git a/content/docs/Preferences/Extensions/_index.zh.md b/content/docs/preferences/extensions/_index.zh.md similarity index 92% rename from content/docs/Preferences/Extensions/_index.zh.md rename to content/docs/preferences/extensions/_index.zh.md index 7971a0815..59a6f67a1 100644 --- a/content/docs/Preferences/Extensions/_index.zh.md +++ b/content/docs/preferences/extensions/_index.zh.md @@ -9,7 +9,7 @@ weight: 50 Clang Format is used to format the C/C++ and Java codes. You can click Actions->Format Code or press the shortcut <kbd>Ctrl+Shift+I</kbd> to format the codes. If you have selected a part of the code, only the selection (and its necessary adjacent codes) will be formatted. -**See also** [Setup Clang Format](../../setup#clang-format). +**See also** [Setup Clang Format](../../setup/_index.zh.md#setup-clang-format). #### Program @@ -29,7 +29,7 @@ You can read [Clang-Format Style Options documentation](https://clang.llvm.org/d YAPF is used to format the Python codes. You can click Actions->Format Code or press the shortcut <kbd>Ctrl+Shift+I</kbd> to format the codes. If you have selected a part of the code, only these lines will be formatted. -**See also** [Setup YAPF](../../setup#yapf). +**See also** [Setup YAPF](../../setup/_index.zh.md#yapf). #### Program @@ -50,7 +50,7 @@ The YAPF Format style. The content here is the same as the content of a `.style. ## Language Server -**See also** [Setup Language Server](../../setup#setup-language-server). +**See also** [Setup Language Server](../../setup/_index.zh.md#setup-language-server). ### Use Linting with Language Server @@ -74,7 +74,7 @@ For example, if you are using `pyls` for Python, you probably want to use `pytho ## Competitive Companion -**See also** [Setup Competitive Companion](../../setup#setup-competitive-companion). +**See also** [Setup Competitive Companion](../../setup/_index.zh.md#setup-competitive-companion). ### Open New Tabs @@ -114,7 +114,7 @@ You can use [CF Tool](https://github.com/xalanq/cf-tool/) to submit your solutio To submit a solution, you have to either parse a problem by [Competitive Companion](#competitive-companion) from Codeforces, or manually set the problem URL of a tab in the context menu of it. -**See also** [Setup CF Tool](../../setup#setup-cf-tool). +**See also** [Setup CF Tool](../../setup/_index.zh.md#setup-cf-tool). ### Path diff --git a/content/docs/Preferences/File Path/_index.md b/content/docs/preferences/file-path/_index.md similarity index 82% rename from content/docs/Preferences/File Path/_index.md rename to content/docs/preferences/file-path/_index.md index 97464d0cc..34accefd4 100644 --- a/content/docs/Preferences/File Path/_index.md +++ b/content/docs/preferences/file-path/_index.md @@ -7,7 +7,7 @@ weight: 60 ### Input File Save Path & Answer File Save Path -The path where the test cases are [saved](../actions#save-testcases-on-save). If it is a relative path, it is relative to the source file. +The path where the test cases are [saved](../actions/_index.md#save-testcases-on-save). If it is a relative path, it is relative to the source file. You can use the following place holders: @@ -29,7 +29,7 @@ If the path is `testcases/${basename}-${1-index}.in`, the input of this test cas The rules used to match test cases when loading pairs of test cases. -Each rule is a pair of [regular expression patterns](../general#regular-expression). The first regex matches the whole input file name, and the second pattern is a replacement pattern which is the name of the answer file. +Each rule is a pair of [regular expression patterns](../general/_index.md#regular-expression). The first regex matches the whole input file name, and the second pattern is a replacement pattern which is the name of the answer file. For example, you can use `(.+)\.in` and `\1.out` to match `test-1.in` and `test-1.out`, or use `(.+)\.in\.(\d+)` and `\1.ans.\2` to match `test.in.3` and `test.ans.3`. @@ -41,7 +41,7 @@ When loading pairs of test cases, each rule which matches an input file will be The default path when choosing where to save an untitled tab with problem URL. -Each rule is a pair of [regular expression patterns](../general#regular-expression). The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path. +Each rule is a pair of [regular expression patterns](../general/_index.md#regular-expression). The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path. When saving a file with problem URL, if the problem URL matches at least one regex in the rules, the default save path will be the replacement of the first matching regex. diff --git a/content/docs/Preferences/File Path/_index.ru.md b/content/docs/preferences/file-path/_index.ru.md similarity index 82% rename from content/docs/Preferences/File Path/_index.ru.md rename to content/docs/preferences/file-path/_index.ru.md index 97464d0cc..103d035ce 100644 --- a/content/docs/Preferences/File Path/_index.ru.md +++ b/content/docs/preferences/file-path/_index.ru.md @@ -7,7 +7,7 @@ weight: 60 ### Input File Save Path & Answer File Save Path -The path where the test cases are [saved](../actions#save-testcases-on-save). If it is a relative path, it is relative to the source file. +The path where the test cases are [saved](../actions/_index.ru.md#save-testcases-on-save). If it is a relative path, it is relative to the source file. You can use the following place holders: @@ -29,7 +29,7 @@ If the path is `testcases/${basename}-${1-index}.in`, the input of this test cas The rules used to match test cases when loading pairs of test cases. -Each rule is a pair of [regular expression patterns](../general#regular-expression). The first regex matches the whole input file name, and the second pattern is a replacement pattern which is the name of the answer file. +Each rule is a pair of [regular expression patterns](../general/_index.ru.md#regular-expression). The first regex matches the whole input file name, and the second pattern is a replacement pattern which is the name of the answer file. For example, you can use `(.+)\.in` and `\1.out` to match `test-1.in` and `test-1.out`, or use `(.+)\.in\.(\d+)` and `\1.ans.\2` to match `test.in.3` and `test.ans.3`. @@ -41,7 +41,7 @@ When loading pairs of test cases, each rule which matches an input file will be The default path when choosing where to save an untitled tab with problem URL. -Each rule is a pair of [regular expression patterns](../general#regular-expression). The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path. +Each rule is a pair of [regular expression patterns](../general/_index.ru.md#regular-expression). The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path. When saving a file with problem URL, if the problem URL matches at least one regex in the rules, the default save path will be the replacement of the first matching regex. diff --git a/content/docs/Preferences/File Path/_index.zh.md b/content/docs/preferences/file-path/_index.zh.md similarity index 82% rename from content/docs/Preferences/File Path/_index.zh.md rename to content/docs/preferences/file-path/_index.zh.md index 97464d0cc..3c86f1192 100644 --- a/content/docs/Preferences/File Path/_index.zh.md +++ b/content/docs/preferences/file-path/_index.zh.md @@ -7,7 +7,7 @@ weight: 60 ### Input File Save Path & Answer File Save Path -The path where the test cases are [saved](../actions#save-testcases-on-save). If it is a relative path, it is relative to the source file. +The path where the test cases are [saved](../actions/_index.zh.md#save-testcases-on-save). If it is a relative path, it is relative to the source file. You can use the following place holders: @@ -29,7 +29,7 @@ If the path is `testcases/${basename}-${1-index}.in`, the input of this test cas The rules used to match test cases when loading pairs of test cases. -Each rule is a pair of [regular expression patterns](../general#regular-expression). The first regex matches the whole input file name, and the second pattern is a replacement pattern which is the name of the answer file. +Each rule is a pair of [regular expression patterns](../general/_index.zh.md#regular-expression). The first regex matches the whole input file name, and the second pattern is a replacement pattern which is the name of the answer file. For example, you can use `(.+)\.in` and `\1.out` to match `test-1.in` and `test-1.out`, or use `(.+)\.in\.(\d+)` and `\1.ans.\2` to match `test.in.3` and `test.ans.3`. @@ -41,7 +41,7 @@ When loading pairs of test cases, each rule which matches an input file will be The default path when choosing where to save an untitled tab with problem URL. -Each rule is a pair of [regular expression patterns](../general#regular-expression). The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path. +Each rule is a pair of [regular expression patterns](../general/_index.zh.md#regular-expression). The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path. When saving a file with problem URL, if the problem URL matches at least one regex in the rules, the default save path will be the replacement of the first matching regex. diff --git a/content/docs/Preferences/General/_index.md b/content/docs/preferences/general/_index.md similarity index 100% rename from content/docs/Preferences/General/_index.md rename to content/docs/preferences/general/_index.md diff --git a/content/docs/Preferences/General/_index.ru.md b/content/docs/preferences/general/_index.ru.md similarity index 100% rename from content/docs/Preferences/General/_index.ru.md rename to content/docs/preferences/general/_index.ru.md diff --git a/content/docs/Preferences/General/_index.zh.md b/content/docs/preferences/general/_index.zh.md similarity index 100% rename from content/docs/Preferences/General/_index.zh.md rename to content/docs/preferences/general/_index.zh.md diff --git a/content/docs/Preferences/Key Bindings/_index.md b/content/docs/preferences/key-bindings/_index.md similarity index 100% rename from content/docs/Preferences/Key Bindings/_index.md rename to content/docs/preferences/key-bindings/_index.md diff --git a/content/docs/Preferences/Key Bindings/_index.ru.md b/content/docs/preferences/key-bindings/_index.ru.md similarity index 100% rename from content/docs/Preferences/Key Bindings/_index.ru.md rename to content/docs/preferences/key-bindings/_index.ru.md diff --git a/content/docs/Preferences/Key Bindings/_index.zh.md b/content/docs/preferences/key-bindings/_index.zh.md similarity index 100% rename from content/docs/Preferences/Key Bindings/_index.zh.md rename to content/docs/preferences/key-bindings/_index.zh.md diff --git a/content/docs/Preferences/Language/_index.md b/content/docs/preferences/language/_index.md similarity index 90% rename from content/docs/Preferences/Language/_index.md rename to content/docs/preferences/language/_index.md index 69f66db44..d73af1390 100644 --- a/content/docs/Preferences/Language/_index.md +++ b/content/docs/preferences/language/_index.md @@ -25,13 +25,13 @@ For compilation flags, please refer to the manual of the compiler. For example, The path of the executable file, i.e. the argument of the `-o` option of the compiler. -If this path is a relative path, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general#temporary-directory)). +If this path is a relative path, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general/_index.md#temporary-directory)). You can use some place holders for this setting: - `${filename}`: The complete name of the source file. If it's an untitled tab (i.e. an unsaved file), the complete file name is `sol.cpp`. - `${basename}`: `${filename}` without the suffix (i.e. without `.cpp`, etc.). -- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../general#temporary-directory). +- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../general/_index.md#temporary-directory). For example, you can use `${tmpdir}/${basename}` if you don't want to keep the executable files, or `executables/${basename}` if you want to keep all executable files in the `executables` directory under the directory of the source file. @@ -103,7 +103,7 @@ The initial position of the text cursor when opening the template. It contains three parts: -1. [Regex](../general#regular-expression) +1. [Regex](../general/_index.md#regular-expression) 2. Offset type: start or end. 3. Offset characters: a number, could be negative. @@ -142,16 +142,16 @@ When choosing a snippet, you can enter the first few characters of the snippet n You can set the parentheses settings for each language and each parenthesis. -Each setting has three states: enable, disable and default. If it's default, it uses the settings in the [Code Edit](../code-edit) page. Otherwise, it overwrites the settings in the [Code Edit](../code-edit) page. +Each setting has three states: enable, disable and default. If it's default, it uses the settings in the [Code Edit](../code-edit/_index.md) page. Otherwise, it overwrites the settings in the [Code Edit](../code-edit/_index.md) page. ### Auto Complete -See [Code Edit/Auto Complete Parentheses](../code-edit#auto-complete-parentheses). +See [Code Edit/Auto Complete Parentheses](../code-edit/_index.md#auto-complete-parentheses). ### Auto Remove -See [Code Edit/Auto Remove Parentheses](../code-edit#auto-remove-parentheses). +See [Code Edit/Auto Remove Parentheses](../code-edit/_index.md#auto-remove-parentheses). ### Tab Jump Out -See [Code Edit/Jump out of a parenthesis by pressing Tab](../code-edit#jump-out-of-a-parenthesis-by-pressing-tab). +See [Code Edit/Jump out of a parenthesis by pressing Tab](../code-edit/_index.md#jump-out-of-a-parenthesis-by-pressing-tab). diff --git a/content/docs/Preferences/Language/_index.ru.md b/content/docs/preferences/language/_index.ru.md similarity index 89% rename from content/docs/Preferences/Language/_index.ru.md rename to content/docs/preferences/language/_index.ru.md index b2f099066..6e21f9432 100644 --- a/content/docs/Preferences/Language/_index.ru.md +++ b/content/docs/preferences/language/_index.ru.md @@ -25,15 +25,15 @@ For compilation flags, please refer to the manual of the compiler. For example, The path of the executable file, i.e. the argument of the `-o` option of the compiler. -If this path is a relative path, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general#temporary-directory)). +If this path is a relative path, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general/_index.ru.md#temporary-directory)). You can use some place holders for this setting: - `${filename}`: The complete name of the source file. If it's an untitled tab (i.e. an unsaved file), the complete file name is `sol.cpp`. - `${basename}`: `${filename}` without the suffix (i.e. without `.cpp`, etc.). -- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../general#temporary-directory). +- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../general/_index.ru.md#temporary-directory). -For example, you can use `${tmpdir}/${basename}` if you don't want to keep the executable files, or `executables/${basename}` if you want to keep all executable files in the `executables` directory in the parent directory of the source file. +For example, you can use `${tmpdir}/${basename}` if you don't want to keep the executable files, or `executables/${basename}` if you want to keep all executable files in the `executables` directory under the directory of the source file. #### C++ Run Arguments @@ -103,7 +103,7 @@ The initial position of the text cursor when opening the template. It contains three parts: -1. [Regex](../general#regular-expression) +1. [Regex](../general/_index.ru.md#regular-expression) 2. Offset type: start or end. 3. Offset characters: a number, could be negative. @@ -142,16 +142,16 @@ When choosing a snippet, you can enter the first few characters of the snippet n You can set the parentheses settings for each language and each parenthesis. -Each setting has three states: enable, disable and default. If it's default, it uses the settings in the [Code Edit](../code-edit) page. Otherwise, it overwrites the settings in the [Code Edit](../code-edit) page. +Each setting has three states: enable, disable and default. If it's default, it uses the settings in the [Code Edit](../code-edit/_index.ru.md) page. Otherwise, it overwrites the settings in the [Code Edit](../code-edit/_index.ru.md) page. ### Auto Complete -See [Code Edit/Auto Complete Parentheses](../code-edit#auto-complete-parentheses). +See [Code Edit/Auto Complete Parentheses](../code-edit/_index.ru.md#auto-complete-parentheses). ### Auto Remove -See [Code Edit/Auto Remove Parentheses](../code-edit#auto-remove-parentheses). +See [Code Edit/Auto Remove Parentheses](../code-edit/_index.ru.md#auto-remove-parentheses). ### Tab Jump Out -See [Code Edit/Jump out of a parenthesis by pressing Tab](../code-edit#jump-out-of-a-parenthesis-by-pressing-tab). +See [Code Edit/Jump out of a parenthesis by pressing Tab](../code-edit/_index.ru.md#jump-out-of-a-parenthesis-by-pressing-tab). diff --git a/content/docs/Preferences/Language/_index.zh.md b/content/docs/preferences/language/_index.zh.md similarity index 87% rename from content/docs/Preferences/Language/_index.zh.md rename to content/docs/preferences/language/_index.zh.md index bbb8cbbc5..061f4278a 100644 --- a/content/docs/Preferences/Language/_index.zh.md +++ b/content/docs/preferences/language/_index.zh.md @@ -25,13 +25,13 @@ weight: 20 设置可执行文件的路径,即编译命令中 `-o` 选项后的参数。 -如果使用了相对路径,则可执行文件的位置将和源代码位置有关(如果当前标签是未命名标签,则可执行文件位置将和 [临时文件夹](../general#临时文件夹) 的位置有关)。 +如果使用了相对路径,则可执行文件的位置将和源代码位置有关(如果当前标签是未命名标签,则可执行文件位置将和 [临时文件夹](../general/_index.zh.md#临时文件夹) 的位置有关)。 该设置中,你可以使用如下参数: - `${filename}`:源代码的完整文件名。如果当前标签是未命名标签,则完整文件名是 `sol.cpp`。 - `${basename}`:将 `${filename}` 去掉扩展名(`.cpp` 等)后的文件名。 -- `${tmpdir}` 或 `${tempdir}`:[临时文件夹](../general#临时文件夹) 的路径。 +- `${tmpdir}` 或 `${tempdir}`:[临时文件夹](../general/_index.zh.md#临时文件夹) 的路径。 例如,使用 `${tmpdir}/${basename}` 将会把可执行文件存储在临时文件夹下。如果你不想要存储可执行文件的话,可以这样设定路径。而 `executables/${basename}` 将会把可执行文件存储在源代码所在目录的下的 `executables` 文件夹。 @@ -103,7 +103,7 @@ weight: 20 该设置包含三部分。 -1. [正则表达式](../general#正则表达式) +1. [正则表达式](../general/_index.zh.md#正则表达式) 2. 偏移类型:开头或末尾。 3. 偏移量:一个数字,可以为负值。 @@ -142,16 +142,16 @@ int main() 你可以为各编程语言设置相应的括号补全选项。 -每个设置有三种状态:开启,关闭或默认。如果处于默认状态,将应用 [代码编辑](../code-edit) 中的设置,否则将会使用这里的设置。 +每个设置有三种状态:开启,关闭或默认。如果处于默认状态,将应用 [代码编辑](../code-edit/_index.zh.md) 中的设置,否则将会使用这里的设置。 ### 自动补全 -详见 [代码编辑/自动补全括号](../code-edit#自动补全括号)。 +详见 [代码编辑/自动补全括号](../code-edit/_index.zh.md#自动补全括号)。 ### 自动删除 -详见 [代码编辑/自动删除括号](../code-edit#自动删除括号)。 +详见 [代码编辑/自动删除括号](../code-edit/_index.zh.md#自动删除括号)。 ### 按 Tab 键跳出 -详见 [代码编辑/在按下 Tab 键时跳出括号](../code-edit#在按下-tab-键时跳出括号)。 +详见 [代码编辑/在按下 Tab 键时跳出括号](../code-edit/_index.zh.md#在按下-tab-键时跳出括号)。 diff --git a/content/docs/Setup/_index.md b/content/docs/setup/_index.md similarity index 91% rename from content/docs/Setup/_index.md rename to content/docs/setup/_index.md index 0f9ec089d..9d36913c0 100644 --- a/content/docs/Setup/_index.md +++ b/content/docs/setup/_index.md @@ -9,19 +9,19 @@ description: Setup CP Editor to prepare for using it Now CP Editor is available in multiple languages, including English and Chinese. -You can change the UI language in Preferences->Appearance. Note that you need to restart CP Editor to apply the change. +You can change the UI language in [Preferences->Appearance->General->UI Language](../preferences/appearance/_index.md#ui-language). Note that you need to restart CP Editor to apply the change. ## Set Compile and Run Commands You need to install `g++` / `python` / `java` depending on which language you are using. You need to add them to system PATH to have them found by CP Editor. -Then you can set the Compile and Run Commands in the preferences. For example, you can set C++ Commands in [Preferences->Languages->C++->C++ Commands](../preferences/language#c-commands). +Then you can set the Compile and Run Commands in the preferences. For example, you can set C++ Commands in [Preferences->Languages->C++->C++ Commands](../preferences/language/_index.md#c-commands). ## Setup CF Tool In order to submit Codeforces problems in CP Editor, you need to install [CF Tool](https://github.com/xalanq/cf-tool). -You can add it to your system PATH to use it directly, or you can set the path to it in [Preferences->Extensions->CF Tool](../preferences/extensions#cf-tool). +You can add it to your system PATH to use it directly, or you can set the path to it in [Preferences->Extensions->CF Tool](../preferences/extensions/_index.md#cf-tool). You need to configure the tool by running the command `cf config` in the command line before using it. @@ -40,19 +40,19 @@ You can install it from the addon/extension markets: CP Editor uses [Clang Format](http://releases.llvm.org/download.html) to format your C/C++ and Java code. -You need to add it to your system PATH, or set the path to it at [Preferences->Extensions->Clang Format](../preferences/extensions#clang-format). +You need to add it to your system PATH, or set the path to it at [Preferences->Extensions->Clang Format](../preferences/extensions/_index.md#clang-format). ### YAPF CP Editor uses [YAPF](https://github.com/google/yapf) to format your Python code. -It should work after [installation](https://github.com/google/yapf#installation). If not, set the program and arguments in [Preferences->Extensions->Code Formatting->YAPF](../preferences/extensions#yapf). +It should work after [installation](https://github.com/google/yapf#installation). If not, set the program and arguments in [Preferences->Extensions->Code Formatting->YAPF](../preferences/extensions/_index.md#yapf). ## Setup Language Server You can use [Language Server](https://microsoft.github.io/language-server-protocol/) to lint your codes and get errors, warnings, etc. -You can install [any language server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set suitable settings in [Preferences->Extensions->Language Server](../preferences/extensions#language-server). +You can install [any language server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set suitable settings in [Preferences->Extensions->Language Server](../preferences/extensions/_index.md#language-server). Though you can use any language server program you like, here are some suggestions if you are not sure which to use. diff --git a/content/docs/Setup/_index.ru.md b/content/docs/setup/_index.ru.md similarity index 90% rename from content/docs/Setup/_index.ru.md rename to content/docs/setup/_index.ru.md index d2bec2b08..230ee5cd6 100644 --- a/content/docs/Setup/_index.ru.md +++ b/content/docs/setup/_index.ru.md @@ -9,19 +9,19 @@ description: Setup CP Editor to prepare for using it Now CP Editor is available in multiple languages, including English and Chinese. -You can change the UI language in Preferences->Appearance. Note that you need to restart CP Editor to apply the change. +You can change the UI language in [Preferences->Appearance->General->UI Language](../preferences/appearance/_index.ru.md#ui-language). Note that you need to restart CP Editor to apply the change. ## Set Compile and Run Commands You need to install `g++` / `python` / `java` depending on which language you are using. You need to add them to system PATH to have them found by CP Editor. -Then you can set the Compile and Run Commands in the preferences. For example, you can set C++ Commands in [Preferences->Languages->C++->C++ Commands](../preferences/language#c-commands). +Then you can set the Compile and Run Commands in the preferences. For example, you can set C++ Commands in [Preferences->Languages->C++->C++ Commands](../preferences/language/_index.ru.md#c-commands). ## Setup CF Tool In order to submit Codeforces problems in CP Editor, you need to install [CF Tool](https://github.com/xalanq/cf-tool). -You can add it to your system PATH to use it directly, or you can set the path to it in [Preferences->Extensions->CF Tool](../preferences/extensions#cf-tool). +You can add it to your system PATH to use it directly, or you can set the path to it in [Preferences->Extensions->CF Tool](../preferences/extensions/_index.ru.md#cf-tool). You need to configure the tool by running the command `cf config` in the command line before using it. @@ -40,19 +40,19 @@ You can install it from the addon/extension markets: CP Editor uses [Clang Format](http://releases.llvm.org/download.html) to format your C/C++ and Java code. -You need to add it to your system PATH, or set the path to it at [Preferences->Extensions->Clang Format](../preferences/extensions#clang-format). +You need to add it to your system PATH, or set the path to it at [Preferences->Extensions->Clang Format](../preferences/extensions/_index.ru.md#clang-format). ### YAPF CP Editor uses [YAPF](https://github.com/google/yapf) to format your Python code. -It should work after [installation](https://github.com/google/yapf#installation). If not, set the program and arguments in [Preferences->Extensions->YAPF](../preferences/extensions#yapf). +It should work after [installation](https://github.com/google/yapf#installation). If not, set the program and arguments in [Preferences->Extensions->Code Formatting->YAPF](../preferences/extensions/_index.ru.md#yapf). ## Setup Language Server You can use [Language Server](https://microsoft.github.io/language-server-protocol/) to lint your codes and get errors, warnings, etc. -You can install [any language server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set suitable settings in [Preferences->Extensions->Language Server](../preferences/extensions#language-server). +You can install [any language server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set suitable settings in [Preferences->Extensions->Language Server](../preferences/extensions/_index.ru.md#language-server). Though you can use any language server program you like, here are some suggestions if you are not sure which to use. diff --git a/content/docs/Setup/_index.zh.md b/content/docs/setup/_index.zh.md similarity index 87% rename from content/docs/Setup/_index.zh.md rename to content/docs/setup/_index.zh.md index a3f980828..545b9fcd2 100644 --- a/content/docs/Setup/_index.zh.md +++ b/content/docs/setup/_index.zh.md @@ -9,19 +9,19 @@ description: 完成 CP Editor 的初始化以做好使用准备 现在 CP Editor 支持多种语言,包括英文,中文和俄语。 -在默认情况下 CP Editor 的界面语言与系统设置一致。如果你需要对界面语言进行更改,可以在设置->外观中进行更改。注意你需要重启 CP Editor 以使更改生效。 +在默认情况下 CP Editor 的界面语言与系统设置一致。如果你需要对界面语言进行更改,可以在 [设置->外观->通用->界面语言](../preferences/appearance/_index.zh.md#界面语言-ui-language) 中进行更改。注意你需要重启 CP Editor 以使更改生效。 ## 设置编译与运行命令 根据你使用的编程语言,你需要安装 `g++` / `python` / `java` 等环境。你需要将它们加入 PATH 环境变量以使 CP Editor 能找到它们。 -接下来在设置页面设置编译与运行命令。例如,你可以在 [设置->语言->C++->C++ 命令](../preferences/language#c-commands) 中设置 C++ 的相关命令。 +接下来在设置页面设置编译与运行命令。例如,你可以在 [设置->语言->C++->C++ 命令](../preferences/language/_index.zh.md#c-命令) 中设置 C++ 的相关命令。 ## 安装 CF Tool 如果你需要在 CP Editor 中提交 Codeforces 题目,你需要安装 [CF Tool](https://github.com/xalanq/cf-tool)。 -你可以将其加入 PATH 环境变量,或是在 [设置->扩展->CF Tool](../preferences/extensions#cf-tool) 中设置其路径。 +你可以将其加入 PATH 环境变量,或是在 [设置->扩展->CF Tool](../preferences/extensions/_index.zh.md#cf-tool) 中设置其路径。 在使用 CF Tool 之前,你需要在终端运行 `cf config` 命令完成相关配置。 @@ -40,19 +40,19 @@ description: 完成 CP Editor 的初始化以做好使用准备 CP Editor 使用 [Clang Format](http://releases.llvm.org/download.html) 来格式化 C/C++ 以及 Java 代码。 -你需要将其加入 PATH 环境变量,或是在 [设置->扩展->Clang Format](../preferences/extensions#clang-format) 中设置其路径。 +你需要将其加入 PATH 环境变量,或是在 [设置->扩展->Clang Format](../preferences/extensions/_index.zh.md#clang-format) 中设置其路径。 ### 安装 YAPF CP Editor 使用 [YAPF](https://github.com/google/yapf) 来格式化 Python 代码。 -[安装](https://github.com/google/yapf#installation) 后应该就可以使用了。如果不能,请在 [设置->扩展->代码格式化->YAPF](../preferences/extensions#yapf) 进行设置。 +[安装](https://github.com/google/yapf#installation) 后应该就可以使用了。如果不能,请在 [设置->扩展->代码格式化->YAPF](../preferences/extensions/_index.zh.md#yapf) 进行设置。 ## Setup Language Server You can use [Language Server](https://microsoft.github.io/language-server-protocol/) to lint your codes and get errors, warnings, etc. -You can install [any language server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set suitable settings in [Preferences->Extensions->Language Server](../preferences/extensions#language-server). +You can install [any language server program](https://microsoft.github.io/language-server-protocol/implementors/servers/) and set suitable settings in [Preferences->Extensions->Language Server](../preferences/extensions/_index.zh.md#language-server). Though you can use any language server program you like, here are some suggestions if you are not sure which to use. diff --git a/content/docs/Source Code/_index.md b/content/docs/source-code/_index.md similarity index 100% rename from content/docs/Source Code/_index.md rename to content/docs/source-code/_index.md diff --git a/content/docs/Source Code/_index.ru.md b/content/docs/source-code/_index.ru.md similarity index 100% rename from content/docs/Source Code/_index.ru.md rename to content/docs/source-code/_index.ru.md diff --git a/content/docs/Source Code/_index.zh.md b/content/docs/source-code/_index.zh.md similarity index 100% rename from content/docs/Source Code/_index.zh.md rename to content/docs/source-code/_index.zh.md diff --git a/content/docs/Tips/_index.md b/content/docs/tips/_index.md similarity index 96% rename from content/docs/Tips/_index.md rename to content/docs/tips/_index.md index 1836c9ae6..dead37169 100644 --- a/content/docs/Tips/_index.md +++ b/content/docs/tips/_index.md @@ -44,6 +44,6 @@ CP Editor supports some command-line options, run `cpeditor --help` for more inf On Windows, it's better to use UNIX-like shells like git bash. -In the command line, you can open a non-existing file as a tab by `cpeditor <path>` (and you can save to this path later), open all C++ files in a directory recursively by `cpeditor --cpp <directory>` or temporarily disable [Restore last session at startup](../preferences/actions#restore-last-session-at-startup) by `cpeditor --no-hot-exit`. +In the command line, you can open a non-existing file as a tab by `cpeditor <path>` (and you can save to this path later), open all C++ files in a directory recursively by `cpeditor --cpp <directory>` or temporarily disable [Restore last session at startup](../preferences/actions/_index.md#restore-last-session-at-startup) by `cpeditor --no-hot-exit`. CP Editor normally closes when receiving SIGINT and SIGHUP, so if you start CP Editor in the command line, you can safely press <kbd>Ctrl+C</kbd> to quit. diff --git a/content/docs/Tips/_index.ru.md b/content/docs/tips/_index.ru.md similarity index 96% rename from content/docs/Tips/_index.ru.md rename to content/docs/tips/_index.ru.md index 1836c9ae6..9152a4285 100644 --- a/content/docs/Tips/_index.ru.md +++ b/content/docs/tips/_index.ru.md @@ -44,6 +44,6 @@ CP Editor supports some command-line options, run `cpeditor --help` for more inf On Windows, it's better to use UNIX-like shells like git bash. -In the command line, you can open a non-existing file as a tab by `cpeditor <path>` (and you can save to this path later), open all C++ files in a directory recursively by `cpeditor --cpp <directory>` or temporarily disable [Restore last session at startup](../preferences/actions#restore-last-session-at-startup) by `cpeditor --no-hot-exit`. +In the command line, you can open a non-existing file as a tab by `cpeditor <path>` (and you can save to this path later), open all C++ files in a directory recursively by `cpeditor --cpp <directory>` or temporarily disable [Restore last session at startup](../preferences/actions/_index.ru.md#restore-last-session-at-startup) by `cpeditor --no-hot-exit`. CP Editor normally closes when receiving SIGINT and SIGHUP, so if you start CP Editor in the command line, you can safely press <kbd>Ctrl+C</kbd> to quit. diff --git a/content/docs/Tips/_index.zh.md b/content/docs/tips/_index.zh.md similarity index 97% rename from content/docs/Tips/_index.zh.md rename to content/docs/tips/_index.zh.md index 9ae2d040f..7c109b433 100644 --- a/content/docs/Tips/_index.zh.md +++ b/content/docs/tips/_index.zh.md @@ -48,6 +48,6 @@ CP Editor 支持在命令行下启动,可以通过执行 `cpeditor --help` 命 在 Windows 下,更推荐使用类 UNIX 的终端(如 Git Bash)。 -在命令行下,你可以通过 `cpeditor <path>` 来在指定的位置创建新文件,或是用 `cpeditor --cpp <directory>` 打开一个目录下的所有 C++ 源代码,还可以通过 `cpeditor --no-hot-exit` 暂时禁用 [在启动时恢复上一次会话](../preferences/actions#restore-last-session-at-startup)。 +在命令行下,你可以通过 `cpeditor <path>` 来在指定的位置创建新文件,或是用 `cpeditor --cpp <directory>` 打开一个目录下的所有 C++ 源代码,还可以通过 `cpeditor --no-hot-exit` 暂时禁用 [在启动时恢复上一次会话](../preferences/actions/_index.zh.md#restore-last-session-at-startup)。 CP Editor 在接收到 SIGINT 和 SIGHUP 命令时会正常关闭,因此如果你在命令行下启动 CP Editor,你可以通过按下 <kbd>Ctrl+C</kbd> 退出,而不必担心丢失任何工作。 diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 0a09a07d6..413a35e12 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -1 +1,2 @@ -<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ safeHTML .Text }}</a> \ No newline at end of file +{{ $fragment := (urls.Parse .Destination).Fragment }} +<a href="{{ with .Page.GetPage (strings.TrimSuffix (print "#" $fragment) .Destination) }}{{ .RelPermalink }}{{ if ne $fragment "" }}#{{ $fragment }}{{ end }}{{ else }}{{ .Destination | safeURL }}{{ end }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ safeHTML .Text }}</a>