Skip to content

Commit 0f42b43

Browse files
Adds a charset notice and dedicated file to docs (#58)
* Create common_problems.md * Fixes some typos and improves overall style * Updates the more docs section * Closes noscript tag
1 parent 250e9a3 commit 0f42b43

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

docs/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ https://github.com/showdownjs/showdown/wiki/Emojis
5454
- [Basic style](https://github.com/oscarmorrison/md-page/blob/master/docs/basic_style.md)
5555
- [Custom style](https://github.com/oscarmorrison/md-page/blob/master/docs/custom_style.md)
5656
- [Custom title](https://github.com/oscarmorrison/md-page/blob/master/docs/custom_title.md)
57+
- [Common problems](https://github.com/oscarmorrison/md-page/blob/master/docs/common_problems.md)

docs/common_problems.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Common problems
2+
3+
## Some characters/accents aren't rendered correctly
4+
The browser needs to decide which encoding to use. If it cannot detect it, the default will be used (often not UTF8!) If some of your characters aren't rendered correctly, probably your server isn't sending the proper charset encoding (see https://github.com/oscarmorrison/md-page/issues/57). These are some possible fixes:
5+
- First, check your web server and try to set the charset encoding to UTF-8. If you do not have access to your web server, then try one of the following
6+
- Try saving your file not as UTF-8 but as UTF-8 with BOM
7+
- Try inserting your script plus markdown content within the body of an HTML page that specifies the HTML charset meta tag. Here's an example
8+
9+
```html
10+
<!DOCTYPE html>
11+
<html>
12+
<head>
13+
<meta charset="utf-8">
14+
<meta name="viewport" content="width=device-width, initial-scale=1">
15+
</head>
16+
<body>
17+
<!-- my-page.html -->
18+
<script src="https://rawcdn.githack.com/oscarmorrison/md-page/master/md-page.js"></script><noscript>
19+
20+
# Header
21+
Welcome to my simplest site
22+
23+
- An
24+
- awesome
25+
- list
26+
</noscript>
27+
</body>
28+
</html>
29+
``

0 commit comments

Comments
 (0)