浏览代码

Update docs

simov 1 年之前
父节点
当前提交
60e90e17d9
共有 2 个文件被更改,包括 39 次插入22 次删除
  1. 26 9
      README.md
  2. 13 13
      firefox.md

+ 26 - 9
README.md

@@ -11,6 +11,7 @@
 - Multiple markdown parsers
 - Multiple markdown parsers
 - Full control over the compiler options ([markdown-it], [marked], [remark])
 - Full control over the compiler options ([markdown-it], [marked], [remark])
 - 30+ Themes ([cleanrmd], [GitHub][github-theme])
 - 30+ Themes ([cleanrmd], [GitHub][github-theme])
+- Custom theme support
 - GitHub Flavored Markdown (GFM)
 - GitHub Flavored Markdown (GFM)
 - Auto reload on file change
 - Auto reload on file change
 - Syntax highlighted code blocks ([prism][prism])
 - Syntax highlighted code blocks ([prism][prism])
@@ -70,6 +71,17 @@ All themes support the following width options:
 
 
 The `auto` option on the `github` and `github-dark` themes has a fixed width with a surrounding border identical to a rendered `README.md` file for a repository hosted on github.com
 The `auto` option on the `github` and `github-dark` themes has a fixed width with a surrounding border identical to a rendered `README.md` file for a repository hosted on github.com
 
 
+## Custom Theme
+
+1. Go to the Advanced Options and click on Settings
+2. Select `CUSTOM` for Content Theme
+3. Upload your Custom Theme below
+4. Specify the Color Scheme of your theme
+
+> Your custom theme will be minified automatically on upload and it can be up to 8KB in size.
+
+> You can add `<link rel="stylesheet" type="text/css" href="file:///home/me/custom-theme.css">` to your markdown document to speed up development while working on your theme.
+
 ---
 ---
 
 
 # Compiler Options
 # Compiler Options
@@ -149,6 +161,10 @@ Alternatively diagrams can be wrapped in HTML tags:
 </code></pre>
 </code></pre>
 ```
 ```
 
 
+- resize the diagram container vertically by dragging the bottom right corner of the code block up or down
+- zoom in and out by holding down the Shift key and then using your mouse wheel
+- pan by holding down the left mouse button and drag in any direction
+
 ## Syntax
 ## Syntax
 
 
 Syntax highlighting for fenced code blocks:
 Syntax highlighting for fenced code blocks:
@@ -199,7 +215,8 @@ Access to individual sites can be enabled by copy/pasting a URL address into the
 
 
 > Access to all subdomains for a given hostname can be enabled by using a wildcard `https://*.githubusercontent.com`
 > Access to all subdomains for a given hostname can be enabled by using a wildcard `https://*.githubusercontent.com`
 
 
-> Access to all ports on `localhost` can be enabled by specifying `http://localhost`, and access only to a specific port by specifying `http://localhost:3000`
+> Access to all ports on `localhost` can be enabled by adding `http://localhost`.
+> Access to a specific port can be enabled by adding `http://localhost:3000`
 
 
 ## Allow on All Sites
 ## Allow on All Sites
 
 
@@ -217,7 +234,7 @@ Each enabled origin has an option for content type header detection and path mat
 
 
 ### Header Detection
 ### Header Detection
 
 
-When this option is enabled the extension will check for the existence of the `content-type` header with a value set to either the `text/markdown`, `text/x-markdown` or `text/plain` content type.
+When this option is enabled the extension will check if the `content-type` header with a value of `text/markdown`, `text/x-markdown` or `text/plain` is present.
 
 
 ### Path Matching
 ### Path Matching
 
 
@@ -230,13 +247,13 @@ It is a simple regular expression that matches URLs ending with:
 - markdown file extension: `\.(?:markdown|mdown|mkdn|md|mkd|mdwn|mdtxt|mdtext|text)`
 - markdown file extension: `\.(?:markdown|mdown|mkdn|md|mkd|mdwn|mdtxt|mdtext|text)`
 - and optionally a hash or a querystring after that: `(?:#.*|\?.*)?`
 - and optionally a hash or a querystring after that: `(?:#.*|\?.*)?`
 
 
-> The `?:` used in `(?:match)` stands for *non-capturing group* and it's there for performance reasons.
+> The `?:` used in `(?:match)` stands for *non-capturing group* and it is there for performance reasons.
 
 
 You can modify the path matching regular expression for each enabled origin. The settings are being updated as you type.
 You can modify the path matching regular expression for each enabled origin. The settings are being updated as you type.
 
 
 ### Path Matching Priority
 ### Path Matching Priority
 
 
-The enabled origins are matched from most specific to least specific:
+The enabled origins are matched from most to least specific:
 
 
 1. `https://raw.githubusercontent.com`
 1. `https://raw.githubusercontent.com`
 2. `https://*.githubusercontent.com`
 2. `https://*.githubusercontent.com`
@@ -343,13 +360,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
 SOFTWARE.
 
 
 
 
-  [chrome]: https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
+  [chrome]: https://chromewebstore.google.com/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
   [firefox]: https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer-chrome/
   [firefox]: https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer-chrome/
   [edge]: https://microsoftedge.microsoft.com/addons/detail/markdown-viewer/cgfmehpekedojlmjepoimbfcafopimdg
   [edge]: https://microsoftedge.microsoft.com/addons/detail/markdown-viewer/cgfmehpekedojlmjepoimbfcafopimdg
-  [opera]: https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
-  [brave]: https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
-  [chromium]: https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
-  [vivaldi]: https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
+  [opera]: https://chromewebstore.google.com/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
+  [brave]: https://chromewebstore.google.com/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
+  [chromium]: https://chromewebstore.google.com/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
+  [vivaldi]: https://chromewebstore.google.com/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
 
 
   [marked]: https://github.com/markedjs/marked
   [marked]: https://github.com/markedjs/marked
   [remark]: https://github.com/remarkjs/remark
   [remark]: https://github.com/remarkjs/remark

+ 13 - 13
firefox.md

@@ -9,20 +9,20 @@
 
 
 ## Compatibility Matrix
 ## Compatibility Matrix
 
 
-| Origin       | Type   | Headers                                     | Render | Autoreload
-| :-           | :-:    | :-                                          | :-     | :-
-| `file:///`   | local  | requires mime type fix on Linux             | ✔      | ✖
-| `http(s)://` | local  | `content-type: text/plain`                  | ✔      | ✔
-| `http(s)://` | remote | `content-type: text/plain` + non strict CSP | ✔      | ✖
-| `http(s)://` | remote | strict CSP                                  | ✖      | ✖
+| Origin       | Type   | Headers                                              | Render | Autoreload
+| :-           | :-:    | :-                                                   | :-     | :-
+| `file:///`   | local  | requires mime type fix on Linux                      | ✔      | ✖
+| `http(s)://` | local  | requires `content-type: text/plain`                  | ✔      | ✔
+| `http(s)://` | remote | requires `content-type: text/plain` + non strict CSP | ✔      | ✖
+| `http(s)://` | remote | strict CSP (Content Security Policy)                 | ✖      | ✖
 
 
 ---
 ---
 
 
 # Access to local file:/// URLs on Linux
 # Access to local file:/// URLs on Linux
 
 
-Unlike Chromium based browsers Firefox will prompt you to download or open files with an external app, that are served with the `text/markdown` content type. For that reason markdown files have to be served using the `text/plain` content type instead.
+Unlike Chromium based browsers, files served with `text/markdown` content type on Firefox will prompt you to download or open the file with an external app. For that reason markdown files have to be served with the `text/plain` content type instead.
 
 
-The following are a few methods to enable `file:///` access on Linux:
+The following are some methods to enable local `file:///` access on Linux:
 
 
 ## Method 1
 ## Method 1
 
 
@@ -78,9 +78,9 @@ update-mime-database ~/.local/share/mime
 
 
 # Autoreload on localhost
 # Autoreload on localhost
 
 
-The `autoreload` feature is available only for content served on `localhost` and it won't work on `file:///` URLs because of CSP (Content Security Policy) limitations.
+The `autoreload` feature is available only for content served on `localhost` and it won't work on `file:///` URLs due to CSP (Content Security Policy) limitations.
 
 
-Any file server can be used locally as long as it serves the markdown files with the `text/plain` content type.
+Any file server can be used locally as long as it serves the markdown files with `text/plain` content type.
 
 
 Here is an example file server using Node.js (replace `me` with your user):
 Here is an example file server using Node.js (replace `me` with your user):
 
 
@@ -107,7 +107,7 @@ express()
   .listen(8000)
   .listen(8000)
 ```
 ```
 
 
-Go to the Advanced Options page for the extension and enable the `http://localhost` origin (note that port is omitted).
+Go to the Advanced Options page for the extension and add the `http://localhost` origin (note that port is omitted).
 
 
 Run the above JavaScript file using Node.js and navigate to `http://localhost:8000` in Firefox.
 Run the above JavaScript file using Node.js and navigate to `http://localhost:8000` in Firefox.
 
 
@@ -117,7 +117,7 @@ You can use any other host name configured in your `hosts` file that resolves to
 127.0.0.1    ssd
 127.0.0.1    ssd
 ```
 ```
 
 
-Then you only need to enable that origin `http://ssd` in the Advanced Options page as well.
+Then you only need to add that origin `http://ssd` in the Advanced Options page as well.
 
 
 The above script can be run on system startup using SystemD or any other service manager.
 The above script can be run on system startup using SystemD or any other service manager.
 
 
@@ -127,7 +127,7 @@ The above script can be run on system startup using SystemD or any other service
 
 
 Remote origins that serve markdown files with `text/plain` content type and do not enforce strict CSP (Content Security Policy) can be enabled using the Advanced Options page.
 Remote origins that serve markdown files with `text/plain` content type and do not enforce strict CSP (Content Security Policy) can be enabled using the Advanced Options page.
 
 
-For example, content hosted on `gitlab.com` and `bitbucket.org` can be enabled and subsequently it will get rendered:
+For example, content hosted on `gitlab.com` and `bitbucket.org` can be enabled and subsequently it will be rendered:
 
 
 - https://gitlab.com/simovelichkov/markdown-syntax/-/raw/main/README.md
 - https://gitlab.com/simovelichkov/markdown-syntax/-/raw/main/README.md
 - https://bitbucket.org/simovelichkov/markdown-syntax/raw/main/README.md
 - https://bitbucket.org/simovelichkov/markdown-syntax/raw/main/README.md