Codeberg/Documentation
43
151
Fork
You've already forked Documentation
128

Add how to add footnotes in a markdown file. #718

Merged
mahlzahn merged 8 commits from bgg/Documentation:doc_proposal_bgg into main 2025年12月12日 19:32:30 +01:00
Contributor
Copy link

It could be useful to have this information in the documentation.

It could be useful to have this information in the documentation.
Add how to add footnotes in a markdown file.
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/deploy-preview Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
7a1547cae0
It could be useful to have this information in the documentation.
gedankenstuecke left a comment
Member
Copy link

image

Unfortunately, the footnote doesn't render the way you want in the actual docs, so I think it would be better to just show it via a markdown code block like the mermaid diagrams.

Also, I think this should maybe not be sorted under the Forgejo-specific markdown instructions, as it's available in most markdown flavours?

![image](/attachments/a88627d3-c688-4c5a-be77-87b3f2655fa6) Unfortunately, the footnote doesn't render the way you want in the actual docs, so I think it would be better to just show it via a `markdown` code block like the mermaid diagrams. Also, I think this should maybe not be sorted under the Forgejo-specific markdown instructions, as it's available in most markdown flavours?
Add Footnote-example.png
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/deploy-preview Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
f258686a93
Supprimer content/images/markdown/Footnote-example.png
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/deploy-preview Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
b1964b3521
Add Footnote-example.png
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/deploy-preview Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
730ee2b401
Author
Contributor
Copy link

Ah. So I took a screenshot, but maybe that's not the colors of the actual documentation :
https://codeberg.org/bgg/Documentation/src/branch/doc_proposal_bgg/content/images/markdown/Footnote-example.png

I kept it very simple, I hesitate to be more precise with :

Footnotes definitions can be anywhere. 1

as I read in https://www.markdownguide.org/extended-syntax/.

I did 2 other modifications :

  • In bold and italics sections, it seems to be an error to have 2 examples with _.
  • I added a strikethrough section.

I hesitate to add a Tex section, maybe not useful in the introduction page.

I don't know if it is for all markdown flavours.


  1. But not inside other elements. ↩︎

Ah. So I took a screenshot, but maybe that's not the colors of the actual documentation : https://codeberg.org/bgg/Documentation/src/branch/doc_proposal_bgg/content/images/markdown/Footnote-example.png I kept it very simple, I hesitate to be more precise with : Footnotes definitions can be anywhere. [^1] [^1]: But not inside other elements. as I read in https://www.markdownguide.org/extended-syntax/. I did 2 other modifications : * In bold and italics sections, it seems to be an error to have 2 examples with _. * I added a strikethrough section. I hesitate to add a Tex section, maybe not useful in the introduction page. I don't know if it is for all markdown flavours.
Actualiser content/markdown/introduction-to-markdown.md
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/deploy-preview Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
398a94c1a3
mahlzahn requested changes 2025年12月12日 08:30:21 +01:00
Dismissed
@ -79,1 +79,4 @@
### Strikethrough
To striketough use ~~ around the text.
Collaborator
Copy link

Add the backticks around ~~

Add the backticks around `~~`
mahlzahn marked this conversation as resolved
@ -80,0 +82,4 @@
To striketough use ~~ around the text.
```markdown
This is ~~strokethrough text~~.
Collaborator
Copy link

s/stroke/strike/

s/stroke/strike/
mahlzahn marked this conversation as resolved
@ -80,0 +86,4 @@
```
is rendered as
This is ~~strokethrough text~~.
Collaborator
Copy link

s/stroke/strike/

s/stroke/strike/
mahlzahn marked this conversation as resolved
@ -80,0 +94,4 @@
`[^name]:texte.`
```markdown
Texte with a foonote.[^1]
Collaborator
Copy link

s/Texte/Text/

s/Texte/Text/
mahlzahn marked this conversation as resolved
s/Texte/Text; s/Stroke/Strike
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/deploy-preview Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
9ea6d1e5a2
s/Texte/Text; s/Stroke/Strike
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/deploy-preview Pipeline was successful
ci/woodpecker/pr/lint Pipeline failed
e50c3f286e

Surge PR preview deployment succeeded. View it at https://Codeberg-Documentation-pr-718.surge.sh

<!--woodpeckerci-plugin-surge-preview--> Surge PR preview deployment succeeded. View it at https://Codeberg-Documentation-pr-718.surge.sh
s/foonote/footnode
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/deploy-preview Pipeline was successful
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pull_request_closed/deploy-preview Pipeline is pending approval
9ace592e0a
gedankenstuecke left a comment
Member
Copy link

Thanks, this looks now good to me!

Thanks, this looks now good to me!

The linter errors are spurious and can be ignored imho.

Or rather: The problem is that the linter wants to undo some of the (correct) changes made here. If you run the linter it'll replace the underscore formatting (eg __bold__) examples with the **bold** notation, which leads to the docs just duplicating the same formatting and no highlighting the __ options.

The linter errors are spurious and can be ignored imho. Or rather: The problem is that the linter wants to undo some of the (correct) changes made here. If you run the linter it'll replace the underscore formatting (eg `__bold__`) examples with the `**bold**` notation, which leads to the docs just duplicating the same formatting and no highlighting the `__` options.
mahlzahn requested changes 2025年12月12日 14:06:38 +01:00
Dismissed
@ -51,3 +51,3 @@
This gets rendered as
This is also **bold text**.
This is also __bold text__.
Collaborator
Copy link

For the linter revert this change, not in the codeblock, but in the rendered output.

For the linter revert this change, not in the codeblock, but in the rendered output.

I don't think that's actually the case. When I ran it locally it wants to make it in the code block too:

 This is **bold text**.
 ```markdown
-This is also __bold text__.
+This is also **bold text**.

						
						
I don't think that's actually the case. When I ran it locally it wants to make it in the code block too: ```diff This is **bold text**. ```markdown -This is also __bold text__. +This is also **bold text**. ``` ```
Collaborator
Copy link

Ah, too bad.

Ah, too bad.

Yeah, so shall we merge @mahlzahn ? We can fix the linter later 😊

Yeah, so shall we merge @mahlzahn ? We can fix the linter later 😊
@ -68,3 +68,3 @@
This gets rendered as
This is _italic text_.
This is *italic text*.
Collaborator
Copy link

Same here.

Same here.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
Codeberg Pages

Issues affecting Codeberg Pages
Documentation Usability

Issues related to using and reading docs.codeberg.org
Forgejo
Good First Issue! 👋
Kind: Bug
Kind: Documentation
Kind: Enhancement
Kind: Feature
Kind: Question
Kind: Security
Licensing
Part: Generator

This is related to the generation of the documentation, not to the content itself
Priority: High

The priority is high
Priority: Low

The priority is low
Priority: Medium

The priority is medium
Reviewed: Confirmed

Something has been confirmed
Reviewed: Duplicate

Something exists already
Reviewed: Invalid

Something was marked as invalid
Reviewed: Wontfix

Something won't be fixed
Status: Blocked
Status: Help wanted

Contributions are welcome!
Status: In progress

Work is in progress
Status: Needs feedback

Feedback is needed
Status: Ready for Review

Work is completed
Status: Review

Review is in progress / Reviewers wanted
Status: Stale
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Documentation!718
Reference in a new issue
Codeberg/Documentation
No description provided.
Delete branch "bgg/Documentation:doc_proposal_bgg"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?