This commit is contained in:
3zachm 2023-02-09 00:58:01 -08:00
commit db6f7fefae
3 changed files with 116 additions and 0 deletions

52
README.md Normal file
View file

@ -0,0 +1,52 @@
# InvestWiki
The toffee wiki repo!
## Usage
Within the `./wiki` directory, each subdir corresponds to an actual path on the website.
For example, `./wiki/home/[lang].md` gets translated to `/wiki/[lang]/home` when built on the server, where lang is replaced with the browser's language code (or whatever's manually specified).
### Relative links
Use the relative directory structure present in the repo. The site will parse the language for you through its middleware.
If you're currently on the page (directory) `/wiki/bot`:
`usage` will correspond to `/wiki/bot/usage` (you can also specify `/wiki/bot/usage`) directly if you wish.
**However, do not end the relative URL with an ending slash** as you'll see in a second.
### Direct links
#### Internal
If you want to link to a specific internal link, end the URL with an ending slash!
`/ranking/` links to the ranking page on the site
`/wiki/ja/home/` directly links to the Japanese version of home
#### External
Just link as you normally would with the `https` prefix. It should not be needed to add the domain to the `next.config.js` as we aren't using its optimizer for markdown images.
### Images
#### Internal
Conventionally, store images you'd like to use in a folder called img within the same subdir and refer to them relatively.
`img/image_name.webp`
Using a starting slash will refer to it as a absolute/direct path, so if you need to refer to another image in different page, just prefix the entire path with `/img`
`/img/wiki/bot/img/image_name.webp`
#### External
Same as for links!
## Contributing
tbd (?)

64
wiki/home/en.md Normal file
View file

@ -0,0 +1,64 @@
---
layout: "home"
---
# toffee wiki
Official WIP wiki!!
## Pages
[Example alternative language](/wiki/ja/)
Eventually there will be other things!!!
## Markdown Support
some random examples!
### Syntax Highlighting
```jsx
export default function RenderMarkdown({ children }: RenderMarkdownProps) {
return (
<ReactMarkdown
remarkPlugins={[remarkGfm]}
rehypePlugins={[rehypeHighlight, rehypeSlug]}
>
{children}
</ReactMarkdown>
);
}
```
### Images
![image alt](img/4x.webp "Image title text!")
### GFM
#### Autolink literals
www.example.com, <https://example.com>, and contact@example.com.
#### Footnote
A note[^1]
[^1]: Big note.
#### Strikethrough
~one~ or ~~two~~ tildes.
#### Table
| Syntax | Description |
| --------- | ----------- |
| Header | Title |
| Paragraph | Text |
#### Tasklist
- [ ] to do
- [x] done

BIN
wiki/home/img/4x.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB