|
1 |
| -# Developer Documentation |
2 | 1 |
|
3 |
| -- [Developer Documentation](#developer-documentation) |
4 |
| - - [Installation](#installation) |
5 |
| - - [Requirements](#requirements) |
6 |
| - - [Clone the Developer docs repo](#clone-the-developer-docs-repo) |
7 |
| - - [Install deps](#install-deps) |
8 |
| - - [Develop on Nextra (New)](#develop-on-nextra-new) |
9 |
| - - [Debugging](#debugging) |
10 |
| - - [Regenerating contributors](#regenerating-contributors) |
11 | 2 |
|
12 |
| -> Visit the `README.md` under `apps/nextra` for more steps on building / developing in this repo |
| 3 | +<p align="center"> |
| 4 | + <img width="100%" src="https://github.com/aptos-labs/aptos-core/raw/main/.assets/aptos_banner.png" alt="Aptos Developer Docs"> |
| 5 | +</p> |
13 | 6 |
|
14 |
| -We now use [lychee-broken-link-checker](https://github.com/marketplace/actions/lychee-broken-link-checker) to check for broken links in the GitHub Markdown. We use a corresponding link checker for pages on Aptos.dev. |
| 7 | +<div align="center"> |
| 8 | + |
| 9 | +[](https://aptos.dev) |
| 10 | +[](https://aptos.dev/en/build/get-started) |
| 11 | +[](https://discord.com/invite/aptosnetwork) |
| 12 | +[](https://x.com/aptos) |
| 13 | +[](https://github.com/aptos-labs/developer-docs/issues) |
15 | 14 |
|
16 | 15 | With results visible at:
|
17 | 16 | [https://github.com/aptos-labs/developer-docs/actions/workflows/links.yml](https://github.com/aptos-labs/developer-docs/actions/workflows/links.yml)
|
| 17 | +</div> |
18 | 18 |
|
19 |
| -## Installation |
| 19 | +--- |
20 | 20 |
|
21 |
| -**IMPORTANT**: These installation steps apply to MacOS environment. |
| 21 | +# π **Aptos Developer Documentation** |
22 | 22 |
|
23 |
| -### Requirements |
| 23 | +> Official **Aptos developer documentation**, providing everything you need to set up, develop, and test your projects. |
24 | 24 |
|
25 |
| -Before you proceed, make sure you install the following tools. |
| 25 | +## π **Table of Contents** |
| 26 | +- [π» Installation](#installation) |
| 27 | + - [βοΈ Requirements](#requirements) |
| 28 | +- [π Clone the Repository](#clone-the-repository) |
| 29 | +- [π¦ Install Dependencies](#install-dependencies) |
| 30 | +- [π Develop on Nextra](#develop-on-nextra) |
| 31 | +- [π Debugging](#debugging) |
| 32 | +- [π Regenerating Contributors](#regenerating-contributors) |
26 | 33 |
|
27 |
| -- Install [Node.js](https://nodejs.org/en/download/) by executing the below command on your Terminal: |
| 34 | +> π **For additional instructions**, see the `README.md` inside `apps/nextra/`. |
28 | 35 |
|
29 |
| -```sh |
30 |
| -brew install node |
31 |
| -``` |
| 36 | +Aptos uses [lychee-broken-link-checker](https://github.com/marketplace/actions/lychee-broken-link-checker) to verify broken links in Markdown files. |
32 | 37 |
|
33 |
| -- Install the latest [pnpm](https://pnpm.io/installation) by executing the below command on your Terminal: |
| 38 | +Results can be viewed here: |
| 39 | +π [GitHub Actions: Link Checking](https://github.com/aptos-labs/developer-docs/actions/workflows/links.yml) |
34 | 40 |
|
35 |
| -```sh |
36 |
| -curl -fsSL https://get.pnpm.io/install.sh | sh - |
37 |
| -``` |
| 41 | +--- |
| 42 | + |
| 43 | +## π» **Installation** |
| 44 | + |
| 45 | +### βοΈ **Requirements** |
| 46 | +Before you proceed, ensure you have installed the following dependencies: |
| 47 | + |
| 48 | +- **Node.js** |
| 49 | + π Install via Homebrew: |
| 50 | + ```sh |
| 51 | + brew install node |
| 52 | + ``` |
38 | 53 |
|
39 |
| -## Clone the Developer docs repo |
| 54 | +- **pnpm (package manager)** |
| 55 | + π Install the latest version: |
| 56 | + ```sh |
| 57 | + curl -fsSL https://get.pnpm.io/install.sh | sh - |
| 58 | + ``` |
40 | 59 |
|
| 60 | +--- |
| 61 | + |
| 62 | +## π **Clone the Repository** |
41 | 63 | ```sh
|
42 | 64 | git clone https://github.com/aptos-labs/developer-docs.git
|
43 | 65 | ```
|
44 | 66 |
|
45 |
| -## Install deps |
46 |
| - |
47 |
| -You may have to run the following command first if you are on macOS M1 Sonoma or newer: |
| 67 | +--- |
48 | 68 |
|
| 69 | +## π¦ **Install Dependencies** |
| 70 | +π If you are using **macOS M1 Sonoma or later**, first run: |
49 | 71 | ```sh
|
50 | 72 | pnpm add node-gyp -g
|
51 | 73 | ```
|
52 | 74 |
|
53 |
| -Then, run: |
54 |
| - |
| 75 | +π Then install all dependencies: |
55 | 76 | ```sh
|
56 | 77 | pnpm install
|
57 | 78 | ```
|
58 | 79 |
|
59 |
| -## Develop on Nextra (New) |
60 |
| - |
61 |
| -> Note: PLEASE SEE `apps/nextra/README.md` for more details! |
| 80 | +--- |
62 | 81 |
|
63 |
| -1. Setup environment |
| 82 | +## π **Develop on Nextra** |
| 83 | +> β **Important**: For more details, see `apps/nextra/README.md`. |
64 | 84 |
|
65 |
| -Ensure you have configured your `.env` properly under `apps/nextra/.env`. There is a `.env.example` there that you can duplicate and rename to `.env` for simplicity. |
| 85 | +### 1οΈβ£ **Set up the environment** |
| 86 | +π Ensure your `.env` is properly configured inside `apps/nextra/.env`. |
| 87 | +Use `.env.example` as a template. |
66 | 88 |
|
67 |
| -2. Build Nextra |
| 89 | +π Validate the setup: |
| 90 | +```sh |
| 91 | +pnpm prebuild |
| 92 | +``` |
68 | 93 |
|
| 94 | +### 2οΈβ£ **Build Nextra** |
69 | 95 | ```bash
|
70 | 96 | pnpm run build
|
71 | 97 | ```
|
| 98 | +π This command builds `apps/nextra` and all dependent local packages. |
72 | 99 |
|
73 |
| -This will build `apps/nextra` and all local packages it depends on. |
74 |
| - |
75 |
| -3. Run the development server |
| 100 | +### 3οΈβ£ **Navigate to the subdirectory** |
| 101 | +```sh |
| 102 | +cd apps/nextra |
| 103 | +``` |
76 | 104 |
|
| 105 | +### 4οΈβ£ **Run the local development server** |
77 | 106 | ```sh
|
78 | 107 | pnpm run dev
|
79 | 108 | ```
|
| 109 | +π Server will be available at: |
| 110 | +π **[http://localhost:3000](http://localhost:3000)** |
80 | 111 |
|
81 |
| -## Debugging |
82 |
| - |
83 |
| -Fix formatting issues by running: |
| 112 | +--- |
84 | 113 |
|
| 114 | +## π **Debugging** |
| 115 | +π Fix formatting issues by running: |
85 | 116 | ```sh
|
86 | 117 | pnpm fmt
|
87 | 118 | ```
|
88 | 119 |
|
89 |
| -## Regenerating contributors |
| 120 | +--- |
90 | 121 |
|
91 |
| -The `src/contributors.json` file (which powers the list of Authors at the bottom of doc pages) needs to be manually generated. |
| 122 | +## π **Regenerating Contributors** |
| 123 | +π The `src/contributors.json` file (which powers the author list at the bottom of doc pages) needs manual updates. |
92 | 124 |
|
93 |
| -In order to generate the contributor map, you must authenticate with GitHub. The best way to do that is using GitHub CLI [installation guide](https://github.com/cli/cli#installation). Once you have the GitHub CLI installed, you can run the following command to authenticate: |
| 125 | +### 1οΈβ£ **Authenticate with GitHub** |
| 126 | +π Install **GitHub CLI**: |
| 127 | +π [Installation Guide](https://github.com/cli/cli#installation) |
94 | 128 |
|
| 129 | +π Log into your GitHub account: |
95 | 130 | ```sh
|
96 | 131 | gh auth login --scopes read:user,user:email
|
97 | 132 | ```
|
98 | 133 |
|
99 |
| -Once that is done, you can generate the map with this command: |
100 |
| - |
| 134 | +### 2οΈβ£ **Generate the contributor list** |
101 | 135 | ```sh
|
102 | 136 | pnpm contributors
|
103 |
| -``` |
| 137 | +``` |
| 138 | +π The updated list will now appear in the documentation. |
| 139 | + |
| 140 | +--- |
| 141 | + |
| 142 | +## π **Useful Links** |
| 143 | +[](https://aptos.dev) |
| 144 | +[](https://aptos.dev/en/build/get-started) |
| 145 | +[](https://discord.com/invite/aptosnetwork) |
| 146 | +[](https://x.com/aptos) |
| 147 | +[](https://github.com/aptos-labs/developer-docs/discussions) |
| 148 | + |
| 149 | + |
| 150 | +--- |
| 151 | + |
| 152 | +## π **License** |
| 153 | +This project is licensed under the **Apache 2.0**. |
| 154 | +See [`LICENSE`](LICENSE) for more details. |
| 155 | + |
| 156 | +--- |
| 157 | + |
| 158 | +## π€ **Contributors** |
| 159 | +A huge thank you to everyone who has contributed to this project! π |
| 160 | + |
| 161 | +<a href="https://github.com/aptos-labs/developer-docs/graphs/contributors"> |
| 162 | + <img src="https://contrib.rocks/image?repo=aptos-labs/developer-docs" /> |
| 163 | +</a> |
| 164 | + |
0 commit comments