Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
Use snippets for API version display
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre601 committed Sep 24, 2023
1 parent 2c547cd commit f0cb458
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/.idea/
/**/dependency-reduced-pom.xml
/**/target/
/**/__pycache__/
1 change: 1 addition & 0 deletions docs/.snippets/api_version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="mdx-badge"><span class="mdx-badge__icon">[:octicons-tag-24:](changelog.md#v3.1.0 'View latest Release Changelog')</span><span class="mdx-badge__text">[v3.1.0](changelog.md#v3.1.0 'View latest Release Changelog')</span></div>
10 changes: 5 additions & 5 deletions docs/api/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ icon: octicons/log-24
This page lists the recent changes made towards the AdvancedServerListAPI.
They are ordered newest to oldest.

## v3.1.0
## v3.1.0 { #v3.1.0 }

### :octicons-plus-circle-24:{ .changelog-added title="Added" } Added { #v3.1.0-added }

Expand All @@ -25,7 +25,7 @@ They are ordered newest to oldest.

----

## v3.0.0
## v3.0.0 { #v3.0.0 }

### :octicons-alert-24:{ .changelog-breaking title="Breaking Changes" } Breaking Changes { #v3-breaking }

Expand All @@ -45,7 +45,7 @@ They are ordered newest to oldest.

----

## v2.1.0
## v2.1.0 { #v2.1.0 }

### :octicons-pencil-24:{ .changelog-changed title="Changed" } Changed { #v2.1.0-changed }

Expand All @@ -54,7 +54,7 @@ They are ordered newest to oldest.

----

## v2.0.0
## v2.0.0 { #v2.0.0 }

### :octicons-alert-24:{ .changelog-breaking title="Breaking Changes" } Breaking Changes { #v2-breaking }

Expand Down Expand Up @@ -85,7 +85,7 @@ They are ordered newest to oldest.

----

## v1.0.0
## v1.0.0 { #v1.0.0 }

### :octicons-plus-circle-24:{ .changelog-added title="Added" } Added { #v1-added }

Expand Down
7 changes: 2 additions & 5 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Add the following to your `build.gradle` or `pom.xml` file to use the API:

=== ":simple-gradle: Gradle"

[![latest_release][release]][api-repo]
--8<-- "api_version.md"

Make sure to replace `{version}` with the version displayed above.

Expand All @@ -34,7 +34,7 @@ Add the following to your `build.gradle` or `pom.xml` file to use the API:

=== ":simple-apachemaven: Maven"

[![latest_release][release]][api-repo]
--8<-- "api_version.md"

Make sure to replace `{version}` with the version displayed above.

Expand Down Expand Up @@ -72,9 +72,6 @@ Add the following to your `build.gradle` or `pom.xml` file to use the API:
</dependencies>
```

[release]: https://img.shields.io/github/v/tag/Andre601/asl-api?labelColor=252631&color=292a36&style=for-the-badge&label=Latest%20Release:
[api-repo]: https://github.com/Andre601/asl-api

## Add own placeholders

To add your own placeholders will you need to do a few steps.
Expand Down
20 changes: 20 additions & 0 deletions docs/assets/stylesheets/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,24 @@

.md-source__repository .md-source__facts {
animation: facts .25s ease-in;
}

.md-typeset .mdx-badge {
font-size: .85em;
}

.md-typeset .mdx-badge__icon {
border-bottom-left-radius: .1rem;
border-top-left-radius: .1rem;

background: var(--md-accent-fg-color--transparent);
padding: .2rem
}

.md-typeset .mdx-badge__text {
border-bottom-right-radius: .1rem;
border-top-right-radius: .1rem;

box-shadow: 0 0 0 1px inset var(--md-accent-fg-color--transparent);
padding: .2rem .3rem;
}
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,5 @@ markdown_extensions:
- pymdownx.tabbed:
alternate_style: true
- pymdownx.details:
- pymdownx.snippets:
base_path: docs/.snippets

0 comments on commit f0cb458

Please sign in to comment.