docs/start.md

b03793d79a64a1891b047e76a484aeadeb1d87b2
wotaku/docs/start.md rendered · source · history · blame · raw

181 lines · 4298 bytes

  1---
  2title: Start
  3description: Getting started
  4---
  5
  6# Getting started
  7
  8## Localhost Setup
  9
 10### Windows
 11
 12:::tabs
 13
 14== Step 1
 15
 16### Installing prerequisites
 171. :logos-git-icon: [Git](https://git-scm.com/)
 182. :logos-nodejs-icon-alt: [Node JS](https://nodejs.org/en)
 193. :logos-pnpm: [pnpm](https://pnpm.io/)
 20
 21Open powershell and run this:
 22
 23```bash
 24# Download and install Chocolatey:
 25powershell -c "irm https://community.chocolatey.org/install.ps1|iex"
 26
 27# Download and install Git:
 28choco install git
 29
 30# Verify Git version:
 31git -v
 32
 33# Download and install Node.js:
 34choco install nodejs
 35
 36# Verify the Node.js version:
 37node -v
 38
 39# Download and install pnpm:
 40corepack enable pnpm
 41
 42# Verify pnpm version:
 43pnpm -v
 44
 45```
 46== Step 2
 47
 48### Cloning
 49
 50To clone the repository, open PowerShell in your desired folder and run:
 51
 52```bash
 53git clone https://github.com/wotakumoe/wotaku.git
 54cd wotaku
 55```
 56
 57Alternatively, you can specify a directory without opening PowerShell in that location:
 58
 59```bash
 60git clone https://github.com/wotakumoe/wotaku.git "C:\your\directory"
 61cd "C:\your\directory\wotaku"
 62```
 63
 64To clone the repository without its commit history (shallow clone):
 65
 66```bash
 67git clone --depth 1 https://github.com/wotakumoe/wotaku.git
 68cd wotaku
 69```
 70
 71== Step 3
 72
 73### Installing dependencies
 74
 75```bash
 76pnpm i
 77
 78```
 79
 80### Running in dev mode
 81
 82```bash
 83pnpm docs:dev
 84
 85```
 86:::
 87
 88::: tip Deployment
 89If you want to learn how to deploy the website online, read the [**official vitepress docs**](https://vitepress.dev/guide/deploy).
 90:::
 91
 92## Icon
 93Wotaku fetches icons using [**Iconfiy**](https://iconify.design/). To get the icon names, visit [**Iconify**](https://icon-sets.iconify.design/) or [**Icones**](https://icones.js.org/). All the added iconpacks are [**here**](https://github.com/wotakumoe/wotaku/blob/main/docs/.vitepress/configs/markdown/emoji.ts#L19).
 94
 95### Writing Rules
 96
 97| Section | Style |
 98|-|-|
 99| In-line | `:package name-icon name:` |
100| Button | `:i-package name-icon name:` |
101| Typescript | `<span class="i-package-name:icon-name"></span>` |
102| Index.md | SVG Code |
103
104
105::: tip Using Alias
106Most used icons have been shortened using Alias. You can find them in [sheet](#sheet). They work in-line, not inside button. You have to use the traditional method.
107:::
108
109![icon name section](/diagram/icon.svg)
110
111::: info Twitter emoji
112Twitter emoji is the default iconpack for wotaku. For twemoji, you don't have to mention twemoji. just icon name.
113:::
114
115### Commands
116
117| Job | CMD |
118|-|-|
119| Adding iconpack | `pnpm add -D @iconify-json/<packname>` |
120| Remove iconpack | `pnpm remove @iconify-json/<packname>` |
121
122You have to add the iconpack manually in `docs\.vitepress\configs\emoji.ts`. Otherwise it wont work. Follow the already added ones as example.
123
124![URL entry convention](/diagram/convo.svg)
125
126### Rules
1271. Follow the order of the tabs in [**sheet**](#sheet)
1282. There will be no space between icons. Just at the beginning.
1293. Icons will be after main URL
1304. Then github/gitlab or similar source link button
1315. Then related buttons like Extensions, Alts, Proxies etc
1326. Unlike icons, there will be space between buttons (so that it is easy to click).
1337. If there is an icon for that button (example: GitHub), use [icon](URL). Otherwise normal button.
1348. Tooltip will always be at the end.
135
136::: tip Adding tooltips
137To learn, how to add tooltips, [click here](#tooltip).
138:::
139
140
141## Tooltip
142
143Tooltip is used to give extra information. The information should be precise. No need of stating something obvious. Tooltip has two components. The key will be beside the URL in the markdown file and key data will be in  `docs\.vitepress\configs\markdown\index.ts`. The key is case-sensitive.
144
145
146```ts
147// Single line
148
149key: { content: "markdown" }
150
151// Single line with other variables
152
153key2: {
154   title: "key2",
155   icon: "i-material-symbols-info-i",
156   content: "content"
157   }
158
159// Multi line with other variables
160
161multiline: {
162   title: "multiline",
163   icon: "i-material-symbols-info-i",
164   content: `This is **markdown** with
165 - A bullet point
166 - Another bullet point`
167   }
168
169```
170
171There is also ^[inline tooltips](just like this). For this, you don't have to put them in index file.
172
173```md
174^[inline tooltips](just like this)
175```
176
177## Front matter
178
179::: tip Moved
180Check the front matter description [**here**](https://rentry.org/wotakufm).
181:::