-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Codeberg as an available forge for the revision plugin setup #155
Conversation
hi @mark-pitblado i've started taking a look at the PR - i will leave some additional comments / change requests inline |
### MkDocs projet in root directory | ||
```yaml | ||
repo_url: https://codeberg.org/exampleUser/exampleRepository | ||
edit_url_template: _edit/main/docs/{path} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice to include the edit_url_template
attribute even thoughmkdocs-terminal
theme doesn't support it yet
thanks!
Codeberg will automatically redirect if not included, but best to be precise
@mark-pitblado can you bump the theme version to |
@ntno okay think I got everything! Sorry for the wait, first couple of commits were on mobile, but the others wanted to wait until I was back at my desk. Apologies for missing the instructions regarding the theme bump |
hi @mark-pitblado |
this prevents a file with the name `_edit` from causing an error
hi @mark-pitblado
i did not set the |
added some notes to PR description; will merge now and create a release |
Hmmm maybe! But the mkdocs documentation only mentions that it supports the github, gitlab, or bitbucket domains. Perhaps they added codeberg and just didn't note it down? |
i read the above as "if you don't provide a |
ok package is published to pypi ty again for your contribution! |
TODO / reminder for @ntno
|
Now deployed with 4.7.0 to https://notes.markpitblado.me, everything seems to be functioning as expected. |
Description
Adds the ability to use the revision history for Codeberg.
The revision front-end template has an additional condition that triggers if the repository name is set to Codeberg in the mkdocs.yml configuration, in the same way that it is done for bitbucket and github.Maintainer note: setting repository name is not necessary as long as
repo_url
is set. Documentation has been updated with an example.A redirect will occur fromcommits/main
tocommits/branch/main
however I have keptcommits/main
in the template to align it with the same format used for bitbucket.Maintainer note: after discussion we updated the template to point to
commits/branch/main
directly instead of relying on Codeberg's redirectReferences
An implementation of this feature in action can be seen on any page within https://notes.markpitblado.me.
Testing
I have implemented a test similar to the bitbucket revision link test and confirmed that it passes using the outlined setup.
Checklist
I have added documentation indicating that Codeberg is implemented and the required configuration