Skip to content

Commit 60e90e1

Browse files
committed
Update docs
1 parent e25c143 commit 60e90e1

File tree

2 files changed

+39
-22
lines changed

2 files changed

+39
-22
lines changed

README.md

+26-9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- Multiple markdown parsers
1212
- Full control over the compiler options ([markdown-it], [marked], [remark])
1313
- 30+ Themes ([cleanrmd], [GitHub][github-theme])
14+
- Custom theme support
1415
- GitHub Flavored Markdown (GFM)
1516
- Auto reload on file change
1617
- Syntax highlighted code blocks ([prism][prism])
@@ -70,6 +71,17 @@ All themes support the following width options:
7071

7172
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
7273

74+
## Custom Theme
75+
76+
1. Go to the Advanced Options and click on Settings
77+
2. Select `CUSTOM` for Content Theme
78+
3. Upload your Custom Theme below
79+
4. Specify the Color Scheme of your theme
80+
81+
> Your custom theme will be minified automatically on upload and it can be up to 8KB in size.
82+
83+
> 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.
84+
7385
---
7486

7587
# Compiler Options
@@ -149,6 +161,10 @@ Alternatively diagrams can be wrapped in HTML tags:
149161
</code></pre>
150162
```
151163

164+
- resize the diagram container vertically by dragging the bottom right corner of the code block up or down
165+
- zoom in and out by holding down the Shift key and then using your mouse wheel
166+
- pan by holding down the left mouse button and drag in any direction
167+
152168
## Syntax
153169

154170
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
199215
200216
> Access to all subdomains for a given hostname can be enabled by using a wildcard `https://*.githubusercontent.com`
201217
202-
> 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`
218+
> Access to all ports on `localhost` can be enabled by adding `http://localhost`.
219+
> Access to a specific port can be enabled by adding `http://localhost:3000`
203220
204221
## Allow on All Sites
205222

@@ -217,7 +234,7 @@ Each enabled origin has an option for content type header detection and path mat
217234

218235
### Header Detection
219236

220-
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.
237+
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.
221238

222239
### Path Matching
223240

@@ -230,13 +247,13 @@ It is a simple regular expression that matches URLs ending with:
230247
- markdown file extension: `\.(?:markdown|mdown|mkdn|md|mkd|mdwn|mdtxt|mdtext|text)`
231248
- and optionally a hash or a querystring after that: `(?:#.*|\?.*)?`
232249

233-
> The `?:` used in `(?:match)` stands for *non-capturing group* and it's there for performance reasons.
250+
> The `?:` used in `(?:match)` stands for *non-capturing group* and it is there for performance reasons.
234251
235252
You can modify the path matching regular expression for each enabled origin. The settings are being updated as you type.
236253

237254
### Path Matching Priority
238255

239-
The enabled origins are matched from most specific to least specific:
256+
The enabled origins are matched from most to least specific:
240257

241258
1. `https://raw.githubusercontent.com`
242259
2. `https://*.githubusercontent.com`
@@ -343,13 +360,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
343360
SOFTWARE.
344361

345362

346-
[chrome]: https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
363+
[chrome]: https://chromewebstore.google.com/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
347364
[firefox]: https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer-chrome/
348365
[edge]: https://microsoftedge.microsoft.com/addons/detail/markdown-viewer/cgfmehpekedojlmjepoimbfcafopimdg
349-
[opera]: https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
350-
[brave]: https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
351-
[chromium]: https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
352-
[vivaldi]: https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
366+
[opera]: https://chromewebstore.google.com/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
367+
[brave]: https://chromewebstore.google.com/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
368+
[chromium]: https://chromewebstore.google.com/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
369+
[vivaldi]: https://chromewebstore.google.com/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
353370

354371
[marked]: https://github.com/markedjs/marked
355372
[remark]: https://github.com/remarkjs/remark

firefox.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99

1010
## Compatibility Matrix
1111

12-
| Origin | Type | Headers | Render | Autoreload
13-
| :- | :-: | :- | :- | :-
14-
| `file:///` | local | requires mime type fix on Linux | ✔ | ✖
15-
| `http(s)://` | local | `content-type: text/plain` | ✔ | ✔
16-
| `http(s)://` | remote | `content-type: text/plain` + non strict CSP | ✔ | ✖
17-
| `http(s)://` | remote | strict CSP | ✖ | ✖
12+
| Origin | Type | Headers | Render | Autoreload
13+
| :- | :-: | :- | :- | :-
14+
| `file:///` | local | requires mime type fix on Linux | ✔ | ✖
15+
| `http(s)://` | local | requires `content-type: text/plain` | ✔ | ✔
16+
| `http(s)://` | remote | requires `content-type: text/plain` + non strict CSP | ✔ | ✖
17+
| `http(s)://` | remote | strict CSP (Content Security Policy) | ✖ | ✖
1818

1919
---
2020

2121
# Access to local file:/// URLs on Linux
2222

23-
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.
23+
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.
2424

25-
The following are a few methods to enable `file:///` access on Linux:
25+
The following are some methods to enable local `file:///` access on Linux:
2626

2727
## Method 1
2828

@@ -78,9 +78,9 @@ update-mime-database ~/.local/share/mime
7878

7979
# Autoreload on localhost
8080

81-
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.
81+
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.
8282

83-
Any file server can be used locally as long as it serves the markdown files with the `text/plain` content type.
83+
Any file server can be used locally as long as it serves the markdown files with `text/plain` content type.
8484

8585
Here is an example file server using Node.js (replace `me` with your user):
8686

@@ -107,7 +107,7 @@ express()
107107
.listen(8000)
108108
```
109109

110-
Go to the Advanced Options page for the extension and enable the `http://localhost` origin (note that port is omitted).
110+
Go to the Advanced Options page for the extension and add the `http://localhost` origin (note that port is omitted).
111111

112112
Run the above JavaScript file using Node.js and navigate to `http://localhost:8000` in Firefox.
113113

@@ -117,7 +117,7 @@ You can use any other host name configured in your `hosts` file that resolves to
117117
127.0.0.1 ssd
118118
```
119119

120-
Then you only need to enable that origin `http://ssd` in the Advanced Options page as well.
120+
Then you only need to add that origin `http://ssd` in the Advanced Options page as well.
121121

122122
The above script can be run on system startup using SystemD or any other service manager.
123123

@@ -127,7 +127,7 @@ The above script can be run on system startup using SystemD or any other service
127127

128128
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.
129129

130-
For example, content hosted on `gitlab.com` and `bitbucket.org` can be enabled and subsequently it will get rendered:
130+
For example, content hosted on `gitlab.com` and `bitbucket.org` can be enabled and subsequently it will be rendered:
131131

132132
- https://gitlab.com/simovelichkov/markdown-syntax/-/raw/main/README.md
133133
- https://bitbucket.org/simovelichkov/markdown-syntax/raw/main/README.md

0 commit comments

Comments
 (0)