Skip to content

Commit 562afe4

Browse files
Merge pull request #16 from michaelblyons/st4
Update for new(er) Docs site
2 parents ed39510 + dae2dbc commit 562afe4

File tree

8 files changed

+417
-193
lines changed

8 files changed

+417
-193
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
timeout-minutes: 15
8+
steps:
9+
- uses: actions/checkout@v4
10+
11+
- name: Setup Go
12+
uses: actions/setup-go@v5
13+
14+
- name: Install Dashing
15+
run: go install github.com/technosophos/dashing@latest
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: 3.13
21+
22+
- name: Install Python dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
26+
27+
- name: Build the docset
28+
run: make
29+
30+
- name: Upload the docset
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: sublime-text.docset
34+
path: www.sublimetext.com/sublime-text.docset

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
*/
1+
/www.sublimetext.com/

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source_link := https://www.sublimetext.com/docs/index.html
2-
local_path := ./www.sublimetext.com
2+
local_path := www.sublimetext.com
33
local_index := $(local_path)/docs/index.html
4-
built_path := ./sublime-text.docset
4+
built_path := $(local_path)/sublime-text.docset
55

66
.PHONY: all
77
all: clean download pre-build build post-build
@@ -21,15 +21,17 @@ pre-build: fix-html fix-css
2121

2222
.PHONY: fix-html
2323
fix-html:
24-
find $(local_path) -iname '*.html' -exec sed -i -e '/<header>/,/<\/header>/d' {} \;
25-
python prefix_methods.py
24+
python fix_html.py
2625

2726
.PHONY: fix-css
2827
fix-css:
29-
$(shell for f in $$(ls $(local_path)/*.css\?*); do mv "$$f" "$${f%\?*}"; done )
28+
$(shell for f in $$(ls $(local_path)/*.*\?*); do mv "$$f" "$${f%\?*}"; done )
29+
$(shell for f in $$(ls $(local_path)/**/*.*\?*); do mv "$$f" "$${f%\?*}"; done )
3030

3131
build:
32-
dashing build
32+
yq -j . dashing.yml > $(local_path)/dashing.json
33+
cd $(local_path) \
34+
&& dashing build
3335

3436
.PHONY: post-build
3537
post-build:

README.md

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,46 @@
1-
# Sublime Text Docset
1+
# [Sublime Text Docset][self]
2+
3+
[Dash][] and [Zeal][] docset for [Sublime Text][st]’s official
4+
[documentation][st-docs].
5+
6+
7+
## Installation
8+
9+
Download from GitHub Releases or build yourself with the instructions below.
10+
11+
- If you have a `sublime-text.docset.zip` from GitHub, extract it to a
12+
folder called `sublime-text.docset`.
13+
- If you build yourself, `sublime-text.docset` will be in the
14+
`www.sublimetext.com` folder.
15+
16+
We hope to have a distribution channel [eventually][distribution].
17+
18+
### Install a local folder to Dash
19+
20+
1. Open Dash.
21+
1. <kbd>Cmd</kbd>+<kbd>,</kbd>
22+
1. Open the "Docsets" tab.
23+
1. Click the <kbd>+</kbd>.
24+
1. Choose "Add Local Docset".
25+
1. Select the `sublime-text.docset` in the `www.sublimetext.com` folder.
26+
1. Optionally change the keyword.
27+
28+
### Install a local folder to Zeal
29+
30+
1. Find your docset folder ("Docset storage" in your Preferences)
31+
1. Copy or symlink `sublime-text.docset` to that folder.
232

3-
[Dash][]/[Zeal][] docset for [Sublime Text][st]’s official [documentation][st-docs].
433

534
## Building
635

736
### Requirements
837

938
* `make`
1039
* [`dashing`][dashing]
11-
* `sed` (with `-E` support), `find`, `wget`
40+
* `yq`
41+
* `sed` (with `-E` support)
42+
* `find`
43+
* `wget`
1244
* Python 3.8+
1345

1446
### Steps
@@ -20,25 +52,11 @@
2052
make
2153
```
2254

23-
## Installation
24-
25-
### Dash locally-built docset
26-
27-
1. Open Dash.
28-
1. <kbd>Cmd</kbd>+<kbd>,</kbd>
29-
1. Open the "Docsets" tab.
30-
1. Click the <kbd>+</kbd>.
31-
1. Choose "Add Local Docset".
32-
1. Select the `sublime-text.docset` in this folder.
33-
1. Optionally change the keyword.
34-
35-
### Zeal locally-built docset
36-
37-
1. Find your docset folder ("Docset storage" in your Preferences)
38-
1. Copy or symlink `sublime-text.docset` to that folder.
3955

56+
[self]: https://github.com/SublimeText/sublime-text-docset
4057
[Dash]: https://kapeli.com/dash
4158
[Zeal]: https://zealdocs.org
4259
[st]: https://www.sublimetext.com/
4360
[st-docs]: https://www.sublimetext.com/docs/index.html
4461
[dashing]: https://github.com/technosophos/dashing#readme
62+
[distribution]: https://github.com/SublimeText/sublime-text-docset/issues/12

dashing.json

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)