Skip to content

Commit

Permalink
Make settings mkdocs magiclink more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWilhelm committed Aug 10, 2024
1 parent b55574f commit b25813e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions {{cookiecutter.project_slug}}/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,11 @@ markdown_extensions:
social_url_shortener: true
social_url_shorthand: true
normalize_issue_symbols: true
provider: {{ cookiecutter.project_repo.split('/')[2].split('.')[-2] }}
user: {{ cookiecutter.project_repo.split('/')[-2] }}
repo: {{ cookiecutter.project_repo.split('/')[-1] }}
{% set parts = cookiecutter.project_repo.split('/') -%}
{% set domain_parts = parts.split('.') if parts|length > 2 else [] -%}
provider: {{ domain_parts[-2] if domain_parts|length > 2 else 'github' }}
user: {{ parts[-2] if parts|length > 2 else cookiecutter.github_username }}
repo: {{ parts[-1] if parts|length > 2 else cookiecutter.project_slug }}
- pymdownx.mark:
- pymdownx.progressbar:
- pymdownx.saneheaders:
Expand Down

0 comments on commit b25813e

Please sign in to comment.