|
1 | 1 | # Pan Docs
|
2 | 2 |
|
3 |
| -> The single, most comprehensive technical reference to Game Boy available to the public. |
| 3 | +"Pan Docs" is a document started in early 1995, considered the single most comprehensive technical reference to Game Boy available to the public. |
4 | 4 |
|
5 |
| -Go to https://gbdev.io/pandocs/ to read the document. |
| 5 | +This git repository hosts a renewed version of it, mantained in the Markdown format and enjoying renewed community attention. |
| 6 | + |
| 7 | +Go to [gbdev.io/pandocs](https://gbdev.io/pandocs) to read the document. |
6 | 8 |
|
7 | 9 | ## Contributing
|
8 | 10 |
|
9 |
| -[This](https://github.com/gbdev/awesome-gbdev/issues/153) is the RFC proposing the change. You're welcome to discuss the development of this project in the Issues and in our various community channels found [here](https://gbdev.io/chat.html). |
| 11 | +Everyone is welcome to contribute opening issues, expressing feedback, adding and improving content or share new findings. |
| 12 | + |
| 13 | +Here are some resources you should take a look at: |
| 14 | + |
| 15 | +- [The wiki](https://github.com/gbdev/pandocs/wiki), containing various rules and contribution guidelines you will have to follow when proposing changes. Some RFCs and discussions detailing the document scope are linked there as well. |
| 16 | +- [The project board](https://github.com/gbdev/pandocs/projects/1), for a general picture of the roadmap and the ongoing efforts. |
| 17 | +- [The issues](https://github.com/gbdev/pandocs/issues), where we discuss what needs to be worked on, and how. |
| 18 | +- [The various community channels](https://gbdev.io/chat.html) where we you can chat directly with maintainers and other contributors. |
10 | 19 |
|
11 |
| -Contributing is really easy, fork this repo and edit the files in the **src** directory. Then, you can send your PR. |
| 20 | +Once you feel comfortable, fork this repository, make your modifications, and [send a Pull Request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests). |
| 21 | + |
| 22 | +### Deploy |
12 | 23 |
|
13 | 24 | To deploy Pan Docs locally:
|
14 | 25 |
|
15 | 26 | 1. Install [Rust](https://www.rust-lang.org/tools/install), [mdBook](https://github.com/rust-lang/mdBook#readme), and [Python 3](https://www.python.org/downloads).
|
16 |
| - mdBook powers the book itself, Rust is used for some custom plugins and Python scripts are used to render some images. |
17 |
| -2. [Install](https://packaging.python.org/tutorials/installing-packages/#requirements-files) the Python prerequisites (`pip3 install -r requirements.txt`) |
18 |
| - If you're doing that in a Python virtual environment, be sure to activate it in the shell that will run the `mdbook` commands. |
| 27 | + mdBook is the tool rendering the documentation, Rust is used for some custom plugins and Python scripts are used to render some images. E.g.: |
| 28 | + ```sh |
| 29 | + # Install Rust using rustup |
| 30 | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh |
| 31 | + # Install mdbook using cargo |
| 32 | + cargo install mdbook |
| 33 | + # Remember to add cargo bin directory to your path |
| 34 | + # Install python3 (on Debian systems) |
| 35 | + apt install python3 |
| 36 | + ``` |
| 37 | +2. [Install the Python prerequisites](https://packaging.python.org/tutorials/installing-packages/#requirements-files). |
| 38 | +```sh |
| 39 | +# Create and activate a virtualenv |
| 40 | +python -m venv env |
| 41 | +source env/bin/activate |
| 42 | +# Install python dependencies |
| 43 | +pip install -r requirements.txt |
| 44 | +# Be sure to keep this virtual env activated for the following steps |
| 45 | +``` |
19 | 46 | 3. Clone this repository and run `mdBook` in the root folder with one of:
|
20 | 47 | ```bash
|
21 | 48 | # Produce a build
|
22 | 49 | mdbook build
|
23 | 50 | # Watch your files and trigger a build automatically whenever you modify a file.
|
24 | 51 | mdbook watch
|
25 |
| -# Watches the book's src directory for changes, rebuild the book, serve it on localhost:3000 and refresh clients for each change. |
| 52 | +# Watches the book's src directory for changes, rebuild the book, serve it on localhost:3000 |
| 53 | +# and refresh clients for each change. |
26 | 54 | mdbook serve
|
27 | 55 | ```
|
28 | 56 | 4. The final HTML files are in `docs/pandocs/`.
|
@@ -104,13 +132,13 @@ Steps:
|
104 | 132 | E.g.
|
105 | 133 |
|
106 | 134 | ```bash
|
107 |
| -$ git clone [email protected]:highlightjs/highlight.js.git |
108 |
| -$ cd highlight.js |
109 |
| -$ git checkout 10.7.2 |
110 |
| -$ npm install |
111 |
| -$ git clone [email protected]:gbdev/highlightjs-rgbasm.git extra/rgbasm |
112 |
| -$ node tools/build.js -t browser rgbasm c |
113 |
| -$ cp build/highlight.min.js ../pandocs/theme/highlight.js |
| 135 | +git clone [email protected]:highlightjs/highlight.js.git |
| 136 | +cd highlight.js |
| 137 | +git checkout 10.7.2 |
| 138 | +npm install |
| 139 | +git clone [email protected]:gbdev/highlightjs-rgbasm.git extra/rgbasm |
| 140 | +node tools/build.js -t browser rgbasm c |
| 141 | +cp build/highlight.min.js ../pandocs/theme/highlight.js |
114 | 142 | ```
|
115 | 143 |
|
116 | 144 | ### Folder structure
|
@@ -148,13 +176,13 @@ $ cp build/highlight.min.js ../pandocs/theme/highlight.js
|
148 | 176 | └── requirements.txt
|
149 | 177 | ```
|
150 | 178 |
|
151 |
| -- `.github/` - Metadata files related to GitHub. |
| 179 | +- `.github/` - Metadata files related to the GitHub repository. |
152 | 180 | - `workflows/` - [CI workflow description](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions) files.
|
153 | 181 | - `custom/` - Custom files added to the build.
|
154 | 182 | - `historical/` - Archive of legacy Pan Docs versions.
|
155 | 183 | - `mediawiki-exporter/` - A script (and support files) to generate this repo's Git history from a MediaWiki export.
|
156 | 184 | - `preproc/`, `renderer/` - Our custom mdBook [preprocessor](https://rust-lang.github.io/mdBook/for_developers/preprocessors) and [back-end](https://rust-lang.github.io/mdBook/for_developers/backends), respectively. Both are standard Rust project folders (though see `Cargo.toml` below).
|
157 |
| -- `src/` - The bulk of this repo. |
| 185 | +- `src/` - Markdown text sources for the document. **You are probably interested in this folder.** |
158 | 186 | - `imgs/` - Images should go in this folder, for organization purposes.
|
159 | 187 | - Any `.md` file mentioned in `SUMMARY.md` will be rendered to HTML to the output directory.
|
160 | 188 | - All other files are output verbatim, at the same relative location to `src/` (so, for example, images will be output in `docs/custom/imgs/`).
|
|
0 commit comments