# mdwiki_cdn_personal **Repository Path**: micrograils/mdwiki_cdn_personal ## Basic Information - **Project Name**: mdwiki_cdn_personal - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-04-27 - **Last Updated**: 2023-04-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MDWiki,仅汉化、不加屎 看名字就知道了,总有人加屎。 MDWiki 原版地址:http://dynalon.github.io/mdwiki/#!index.md ## 调整内容 - 将原版的内嵌 css 和 js 抽离出来,同时提供 `src` 和 `min` 版; - 将原版的 `bootstrap`、`highlight`、`colorbox` 等替换成国内的 CDN (https://cdn.bootcdn.net); - 按官方文档的默认值添加了 `config.json` 和 `navigation.md` 文件; ## 你要定制化的 - 自行替换根目录下的 `favicon.ico` 文件(原版无此文件); - 根据实际情况调整 `config.json` 和 `navigation.md` 文件的内容; ## 官方文档摘录 以下是官方文档**部分摘录**,便于你更清晰的自定义。 ### Adding a navigation Create a `navigation.md` file in the same directory as the `mdwiki.html` and put in the links that make up your menu: ``` # Your wiki name [Home](home.md) [About](about.md) [Download](download.md) ``` The first line is a Markdown heading, which will be used as the website brand in the navbar. Standard Markdown links are to be used for the navbar entries. For more complex menus, nesting submenu items as a list and using horizontal lines that will be rendered as dividers is also possible: ``` # Brand name [Menu Item 1]() * # SubMenu Heading 1 * [SubMenu Item 1](subitem1.md) * [SubMenu Item 2](subitem2.md) - - - - * # SubMenu Heading 2 * [SubMenu Item 3](subitem3.md) - - - - * # SubMenu Heading 3 * [SubMenu Item 3](subitem3.md) [Menu Item 2](item2.md) - - - - [Menu Item 3](item3.md) ``` ### Page layout All pages should start with a 1st heading, which is turned into the page title. To devide the page into sections, use 2nd degree headings. All 2nd degree headings will end up in the side menu for in-page navigation: ``` Heading ======= Section 1 --------- [...] Section 2 --------- [...] ``` ### Theme chooser There is a special gimmick `ThemeChooser` that will add a submenu entry to the navigation bar with all available themes. Enable it by adding ``` [gimmick:themechooser](Choose theme) ``` to the `navigation.md` (or into each page individually). ### Selecting a theme You can manually set a specific theme that will be used if the ThemeChooser gimmick is not used or set to the default theme: ``` [gimmick:theme](flatly) ``` This will set the default theme to `flatly`. You can see a list of the theme names in the `ThemeChooser` gimmick or on this page (select `Change theme` in the navbar). To apply the theme globally for all files, put the entry into `navigation.md`. You can also switch the "inverse" mode, which will change colors for some themes (see http://www.bootswatch.com/ for details) ``` [gimmick:theme (inverse: true)](flatly) ``` Note: Only the default `bootstrap` theme is bundled with MDwiki and available offline. All other themes require internet connection, as the styles are dynamically loaded on demand. ### Configuration You can create a `config.json` file in the same folder as the `mdwiki.html` file which is then used for configuration. The file has to be valid JSON. Currently these options are available: - `"useSideMenu": false` - disable the side navigation - ` "lineBreaks": "original" ` \- Instead of using the [GFM](https://help.github.com/articles/github-flavored-markdown) line breaks, use the original line breaking as [introduced by John Gruber](http://daringfireball.net/projects/markdown/): - line breaks in the markdown files are ignored, except if a line ends with two spaces - Default is `lineBreaks: "gfm"` (line breaks in markdown will create a new paragraph) - ` "additionalFooterText": "" ` - Can be used to add text to the copyright footer at the bottom, like custom copyright notices. - Example: `additionalFooterText: "All content and images © by John Doe"` - Default: `""` (empty string) - ` "anchorCharacter": "¶" ` - The character/text displayed and used as a hyperlink when hovering over headings. - Unicode characters can be used in HTML notation. Example: `⚓` will render as ⚓ - Default: The pilcrow (paragraph) sign: ¶ - ` "title": "ACME Industries Wiki" ` - Changes the title of the webpage. - Default: `"MDWiki"` - Note - this parameter does not change the title of your wiki in Google search results. Edit `mdwiki.html` directly to correct this. ([Issue #58](https://github.com/Dynalon/mdwiki/issues/58)) A sample `config.json` might thus look like this: ``` { "useSideMenu": true, "lineBreaks": "gfm", "additionalFooterText": "All content and images © by John Doe", "anchorCharacter": "#" } ``` Hint: It is adviced that you create an empty config.json in each cases, to avoid 404 errors which will not get cached by your browser. Having an `config.json` file present thus will speed up page loading (even if its empty).