Skip to content

Commit 008cc0e

Browse files
committed
Add README and .gitignore
1 parent 23dbf6e commit 008cc0e

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build/*

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# MacVim auto-generated web documentation
2+
3+
This repository contains automation scripts to generate online web version of MacVim documentation. It uses [vimhelp](https://github.com/c4rlo/vimhelp) as a backend to generate HTML versions of MacVim's documentation and publishes them as a GitHub page. The repository is named "docs" so that it would show up as the same URL under the root domain under GitHub Pages.
4+
5+
## vimhelp
6+
7+
The subfolder `vimhelp` is a forked version of vimhelp using Git subtree (we avoid using submodules to avoid having to make another repository just for the downstream changes). It contains changes to add support for a "MacVim" project and to change the output to match MacVim's needs. It also has some improvements to the offline mode (e.g. manual light/dark mode selection). There's also a custom filter to make `gui_mac.txt` render a little fancier, including showing the MacVim icon.
8+
9+
Command used to add the subtree:
10+
```
11+
git remote add -f vimhelp [email protected]:c4rlo/vimhelp.git
12+
git subtree add --prefix=vimhelp vimhelp/master --squash
13+
```
14+
15+
Command used for staying in sync and pulling from upstream:
16+
```
17+
git subtree merge --prefix=vimhelp vimhelp/master --squash
18+
```
19+
20+
## Running locally
21+
22+
To run the scripts locally, follow vimhelp's [README](vimhelp/README.md) to set up a venv first:
23+
24+
```
25+
cd vimhelp
26+
python3 -m venv --upgrade-deps .venv
27+
.venv/bin/pip install -r requirements.txt
28+
```
29+
30+
Source the venv:
31+
32+
```
33+
. .venv/bin/activate
34+
```
35+
36+
Then run the script (make sure to substitute `$macvim_dir` with the directory that you have MacVim cloned to):
37+
38+
```
39+
scripts/h2h.py -i $macvim_dir/runtime/doc -o ../build --project macvim --web-version
40+
```
41+
42+
You can then run a simple web server in the build folder and browser to it. E.g. Use Python to server a server (it will be available at http://localhost:8000):
43+
44+
```
45+
cd build
46+
python3 -m http.server
47+
```

0 commit comments

Comments
 (0)