You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-10Lines changed: 41 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,8 @@ Once [installed](#install), you can preview the doc locally as you edit.
61
61
62
62
### Preview Changes
63
63
64
+
#### Preview Changes Locally
65
+
64
66
To preview your work as you edit:
65
67
66
68
- Run **`mkdocs serve`** locally and keep it running:
@@ -69,13 +71,43 @@ To preview your work as you edit:
69
71
mkdocs serve
70
72
```
71
73
By default, this runs a local web server that hosts the documentation at http://127.0.0.1:8000/ .
72
-
* Preview docs in your Web browser. Most changes will update automatically as you edit. Configuration and navigation changes will require restarting the *mkdocs* server `mkdocs* serve`.
73
-
* Optionally, you can share the preview with others by uploading them to your repository's `gh-pages` branch
74
-
```bash
75
-
mkdocs gh-deploy
76
-
```
74
+
* Preview docs in your Web browser.
75
+
Most changes will update automatically as you edit.
76
+
Configuration and navigation changes will require restarting `mkdocs serve`.
77
+
78
+
#### Preview Changes on a Public Website
79
+
80
+
Optionally, you can share the preview with others by uploading them to your Github repository's `gh-pages` branch.
81
+
82
+
- First, you need to configure [[#configure-gh-pages|GitHub Pages]] (once).
83
+
- Then, to deploy the current branch to your personal GitHub website so that others can take a look at:
84
+
```bash
85
+
mkdocs gh-deploy
86
+
```
87
+
88
+
There is also a [*GitHub Action*](https://github.com/LoopKit/loopdocs/blob/master/.github/workflows/publish.yml) that automatically builds and deploys the doc each time it the `master` branch is pushed to the repository.
89
+
ℹ️ If you deployed your current branch with `mkdocs gh-deploy`, then pushed `master` to the repository afterward, this will automatically deploy `master` and override your previous deployment.
90
+
91
+
Remember to disable *GitHub Pages* in your repository settings when you are done sharing.
92
+
93
+
#### Configure GH Pages
94
+
95
+
The **first** thing you need to do is **configure** your fork of **loopdocs** repository (**once**) so that whenever `gh-pages` is pushed it is automatically deployed to your personal GitHub website. Here is how.
96
+
97
+
Open **your** fork of **loopdocs** on Github: `https://github.com/YOUR_GITHUB_USERNAME_HERE/loopdocs`
98
+
99
+
1. Click the **`"⚙️ Settings"`** tab (last one on the right)
100
+
2. Click **`Pages`** located under the `Code and Automation` section
101
+
3. In the **`Source`** field, select **`Deploy from a Branch`**
102
+
4.**First** drop-down under the **`Branch`** section: Select **`gh-pages`**
Note that the `master` branch will automatically be published to your personal repository (`gh-pages`) by *Github actions* when it is pushed to the *GitHub* server.
79
111
80
112
### Find Broken Links
81
113
@@ -218,11 +250,10 @@ You can also refer to the above flowchart diagram for a visual representation of
218
250
219
251
##### When Rules Fail
220
252
221
-
Using `<span translate="no">text</span>`, backticks (`` `text` ``) and code (`<code>text</code>`) has a-one major drawback.
253
+
Using `<span translate="no">text</span>`, backticks (`` `text` ``) and code (`<code>text</code>`) has adrawback and does not work every time.
222
254
The automatic translation splits the sentence into 2 parts, one before and one after the non translated text, and can sometimes:
223
255
- get confused by this and treat them as 2 separate sentences to be translated independently.
224
-
- remove spaces around the `text`, (remember it no longer exists from *Google Translate* point of view)
225
-
256
+
- remove spaces around the untranslated `text`, (remember it no longer exists from *Google Translate* point of view)
226
257
227
258
đź’ˇHere are some possible **workarounds**:
228
259
@@ -251,7 +282,7 @@ This process require trial and error to find the best approach: the one that wor
251
282
These rules to improve automatic translation with Google Translate comes with pluses and minuses:
252
283
- Drawbacks:
253
284
- Markdown is a bit less readable and more sprinkled with *HTML*.
254
-
- Need to publish the website to a **public** website so that it is visible to [Google Translate](https://translate.google.com)
285
+
- Need to publish the website to a **public** website visible to [Google Translate](https://translate.google.com)
255
286
- Pluses:
256
287
- One single source and many potential translations
0 commit comments