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
Improve support for building docs on Windows (mattermost#6156)
* Improve support for building the docs on Windows by adding more targets to make.bat and adding Windows support to the Makefile; Update README.md with more instruction for Windows platforms
* Remove redundant reference to Windows in build instructions
Copy file name to clipboardExpand all lines: README.md
+24-10Lines changed: 24 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -57,30 +57,39 @@ Once the review process is complete, and depending on the type of issue it is (e
57
57
58
58
## Build locally
59
59
60
-
If you've downloaded the `mattermost/docs` repository and are editing Mattermost documentation on your local machine, you can generate the HTML files from markdown in the `/source` directory. You can review your changes before you commit them or create pull requests.
60
+
If you've downloaded the `mattermost/docs` repository and are editing Mattermost documentation on your local machine, you can generate the HTML files from markdown in the `source` directory. You can review your changes before you commit them or create pull requests.
61
61
62
-
**Note:** Terminal commands can be executed on Linux, Mac, and Windows (using Powershell).
62
+
**Note:** Terminal commands can be executed on Linux, Mac, and Windows (using PowerShell).
63
+
64
+
### Build prerequisites
65
+
66
+
The following software is required to build the documentation:
67
+
68
+
- Git [[download]](https://git-scm.com/downloads)
69
+
- Python 3.9 or later [[download]](https://www.python.org/downloads/)
70
+
71
+
### Build instructions
63
72
64
73
1. Open a terminal window, then clone a forked copy of the documentation repository:
65
-
```sh
74
+
```shell
66
75
git clone https://github.com/mattermost/docs.git
67
76
```
68
77
69
78
2. In the terminal window, navigate into the cloned repository:
70
-
```sh
79
+
```shell
71
80
cd docs
72
81
```
73
82
74
83
3. Install [pipenv](https://docs.pipenv.org/) by using one of the following commands based on your operating system:
75
84
76
85
For Mac users where Homebrew is installed:
77
86
```shell
78
-
brew install pipenv
87
+
brew install pipenv
79
88
```
80
89
81
90
For other operating systems:
82
91
```shell
83
-
pip install --user pipenv
92
+
pip install --user pipenv
84
93
```
85
94
86
95
4. Install required Python packages:
@@ -94,10 +103,15 @@ If you've downloaded the `mattermost/docs` repository and are editing Mattermost
94
103
- Use `make clean html` to delete all static HTML output in the `/build` directory and re-build all files. This command is particularly useful when you're making changes to the LHS navigation pane and want to ensure you're not reviewing cached results.
95
104
- Use `make livehtml` to review a live preview published to `http://127.0.0.1:8000` that automatically updates as new changes are saved in your local IDE.
96
105
97
-
6. When working with static build results, navigate to the `/build` directory:
106
+
Windows users will require [GNU Make](https://gnuwin32.sourceforge.net/packages/make.htm) installed for the above commands to work correctly. If GNU Make is not installed, please substitute `CMD /C make.bat` for `make` in the above commands to use the Windows command interpreter. For example `make html` will become `CMD /C make.bat html`.
107
+
108
+
Note: When using the `CMD /C make.bat` substitution, only a single target may be specified. Instead of running `CMD /C make.bat clean html`, each target must be run seperately. For example, `CMD /C make.bat clean` followed by `CMD /C make.bat html`.
109
+
110
+
6. When working with static build results, navigate to the `build` directory:
98
111
```sh
99
-
cd /build
112
+
cd build
100
113
```
101
-
7. Then, preview your changes by opening the `/source/html/index.html` file.
114
+
115
+
7. Then, preview your changes by opening the `source/html/index.html` file.
102
116
103
-
Build errors are written to the `/build/warning.log`.
117
+
Build errors are written to the `build/warnings.log` file.
0 commit comments