Skip to content

Commit 1638ad8

Browse files
committed
Port Documentation to MKDocs
This was a project to port the documentation to MKDocs, so we would not need to add Swift as a dependency. Overall, the port was very straightforward as the documentation did not have any major custom Markdown. A few of the nice features I found: * Worked perfectly across Windows/Mac/Linux (including auto reload on content change) * Searching content inside documents was easier * More customizable * Nice outline of content on right side of page * One simple command to test/deploy mkdocs serve or mkdocs build - I was handling a lot of the complexity in a Makefile before.
1 parent 8f3be3e commit 1638ad8

File tree

135 files changed

+388
-982
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+388
-982
lines changed

.gitignore

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
.DS_Store
2-
/.build
3-
/Packages
4-
/*.xcodeproj
5-
xcuserdata/
6-
DerivedData/
7-
.swiftpm/config/registries.json
8-
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9-
.netrc
10-
/docs/*
2+
.vscode/*
3+
/site/*

.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

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

Makefile

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

Package.resolved

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

Package.swift

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

README.md

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,29 @@ This repository contains the documentation for the WebKit Project.
44

55
## Build Documentation
66

7-
### Preview Documentation Locally
8-
9-
This will bring up a local web server, so you can view the documentation locally.
7+
### Install Dependencies
108

9+
```python
10+
pip3 install mkdocs-material
1111
```
12-
make preview
13-
```
14-
15-
### DocC Archive (Xcode)
16-
17-
Generate a DocC Archive that will be automatically imported into Xcode's documentation.
1812

19-
```
20-
make docc
21-
```
22-
23-
#### Build DocC Archive in Xcode
13+
### Preview Documentation Locally
2414

25-
Generate a DocC Archive in Xcode. This documentation will be available under the Workspace Documentation section.
26-
You will need to export `WebKit` and import it to add the DocC Archive to the Imported Documentation section.
15+
This will bring up a local web server, so you can see the documentation locally. Any updates you make will be automatically visible.
2716

2817
```
29-
Open Package.swift
30-
Product -> Build Documentation (⌃⇧⌘D)
18+
mkdocs serve
3119
```
3220

33-
### GitHub Release
21+
### Release Build
3422

35-
Generate documentation for a release on GitHub Pages.
23+
Build documentation for static site.
3624

3725
```
38-
make github
26+
mkdocs build
27+
python3 -m http.server --directory site/ # (Optional) View generated documentation
3928
```
4029

41-
## Import Documentation into Xcode
30+
### Overview
4231

43-
Open `WebKit.doccarchive` and the documentation will be automatically imported into Xcode under the Imported Documention section.
44-
When running `make docc` the documentation will automatically be imported into Xcode.
32+
The documentation uses the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) theme. This documentation has been collected from a variety of sources including [Trac](https://trac.webkit.org),[GitHub Wiki](https://github.com/WebKit/WebKit/wiki), and Source Code markdown files.

Sources/WebKit/EmptyFile.swift

Lines changed: 0 additions & 1 deletion
This file was deleted.

Sources/WebKit/WebKit.docc/InDepth/Architecture/Architecture.md

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

Sources/WebKit/WebKit.docc/InDepth/Layout&Rendering/Layout&Rendering.md

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

Sources/WebKit/WebKit.docc/Other/ContributorMeetings/ContributorMeetings.md

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

0 commit comments

Comments
 (0)