Files
GiteaMarkupVariable/Readme.md
2022-12-16 22:56:07 +01:00

31 lines
865 B
Markdown

# what?
This tiny script allow gitea markup files (aka Readme(s)) to get dynamic values from repository page.
## Live example:
**user =** {{user}}
**repository =** {{repository}}
**branch =** {{branch}} *[lest see whats happen if you open another branch ? ]*
## How to use it:
- Put the .sh file in an accessible place, like /usr/local/bin, make it executable.
- edit gitea app.ini and add thos two sections (replace/adapt if needed):
```
[markup.markdown]
ENABLED = true
FILE_EXTENSIONS = .md,.markdown
RENDER_COMMAND = /bin/bash /usr/local/bin/pandocRegex.sh markdown
[markup.restructuredtext]
ENABLED = true
FILE_EXTENSIONS = .rst
RENDER_COMMAND = /bin/bash /usr/local/bin/pandocRegex.sh rst
```
- Restart gitea and Enjoy !
**Tips:** Dynamic variables must be formated like that (but without any space): { {user}} { {repository}} { {branch}}