Improve clarity of wiki documentation (#305)

Fixes https://codeberg.org/Codeberg/Community/issues/1001#issuecomment-890160

Co-authored-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/305
Co-authored-by: Panagiotis "Ivory" Vasilopoulos <n0toose@noreply.codeberg.org>
Co-committed-by: Panagiotis "Ivory" Vasilopoulos <n0toose@noreply.codeberg.org>
This commit is contained in:
Panagiotis "Ivory" Vasilopoulos 2023-06-23 01:06:16 +00:00 committed by Otto
parent 2887826c38
commit 8fe5dd27d6
2 changed files with 24 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -35,7 +35,19 @@ The web UI in your browser is currently limited to adding, updating, and deletin
<img src="/assets/images/getting-started/wiki/wiki_pageview.png" alt="Wiki home page with edit buttons">
</picture>
## Adding content via a local Git client
### Adding external images via web
If you cannot [use a local Git client](#adding-external-images-via-web), linking to *external* assets like images is still possible.
<picture>
<source srcset="/assets/images/getting-started/wiki/wiki_editview.png" type="image/png">
<img src="/assets/images/getting-started/wiki/wiki_pageview.png" alt="Web editor with an arrow pointing at the "Insert Image" button">
</picture>
Clicking on the "Insert Image" button will make the following text appear in your text editor: `![](https://)`
You can read up more on how it works [in a later section](#describing-images-in-markdown).
## Adding content using a local Git client
You can work with the wiki repo as you would with any other Git repo on Codeberg; see our docs about managing a Git repo [via CLI](https://docs.codeberg.org/git/clone-commit-via-cli).
```shell
@ -47,7 +59,7 @@ git commit -am "create Home page"
Editing locally allows you to use your favorite editor (preferably with Markdown syntax check and highlighting) and manage additional assets like images.
### Adding images
### Adding images using a local Git client
You can add images to the root directory or a specific subfolder (like `assets` or `images`) using your local Git client.
A feasible workflow might look like this:
@ -62,12 +74,22 @@ git commit -m "add image"
git push
```
## Attaching images in Markdown documents
Now, you can reference the image in Markdown, like this:
**File in repository**:
```markdown
![image alt text](images/image.png "image title")
```
**External image**:
```markdown
![image alt text](https://example.com/image.jpg "image title")
```
When including images from Codeberg repositories, keep in mind that *you should use the raw version of the image.*
After saving your changes, the image should be visible.
> In contrast to embedding external images, images in Git are only rendered after saving the wiki or Markdown file changes.