Skip to content
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 repo icons for GitLab and Codeberg in default template #357

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/README.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
{%- endif %}
{%- endif %}
{%- if repository %}
{%- if repository_host == "github.com" %} [![Source Code Repository](https://img.shields.io/badge/Code-On%20GitHub-blue?logo=GitHub)]({{ repository }})
{%- if repository_host == "github.com" %} [![Source Code Repository](https://img.shields.io/badge/Code-On%20GitHub-blue?logo=GitHub)]({{ repository }})
{%- elif repository_host == "gitlab.com" %} [![Source Code Repository](https://img.shields.io/badge/Code-On%20GitLab-blue?logo=GitLab)]({{ repository }})
{%- elif repository_host == "codeberg.org" %} [![Source Code Repository](https://img.shields.io/badge/Code-On%20Codeberg-blue?logo=Codeberg)]({{ repository }})
{%- elif repository_host %} [![Source Code Repository](https://img.shields.io/badge/Code-On%20{{ repository_host | replace("-", "--") | urlencode }}-blue)]({{ repository }})
{%- endif %}
{%- endif %}
Expand Down
7 changes: 7 additions & 0 deletions tests/pass/default-template-codeberg/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions tests/pass/default-template-codeberg/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "default_template_codeberg"
version = "0.0.0"
publish = false
edition = "2021"

license = "Unlicense"
repository = "https://codeberg.org/foo/bar"
rust-version = "1.56"

[lib]
path = "lib.rs"
4 changes: 4 additions & 0 deletions tests/pass/default-template-codeberg/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# default_template_codeberg ![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue) [![default_template_codeberg on crates.io](https://img.shields.io/crates/v/default_template_codeberg)](https://crates.io/crates/default_template_codeberg) [![default_template_codeberg on docs.rs](https://docs.rs/default_template_codeberg/badge.svg)](https://docs.rs/default_template_codeberg) [![Source Code Repository](https://img.shields.io/badge/Code-On%20Codeberg-blue?logo=Codeberg)](https://codeberg.org/foo/bar) ![Rust Version: 1.56.0](https://img.shields.io/badge/rustc-1.56.0-orange.svg)

An example pretending to be hosted on Codeberg.

1 change: 1 addition & 0 deletions tests/pass/default-template-codeberg/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//! An example pretending to be hosted on Codeberg.
7 changes: 7 additions & 0 deletions tests/pass/default-template-github/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions tests/pass/default-template-github/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "default_template_github"
version = "0.0.0"
publish = false
edition = "2021"

license = "Unlicense"
repository = "https://github.com/foo/bar"
rust-version = "1.56"

[lib]
path = "lib.rs"
4 changes: 4 additions & 0 deletions tests/pass/default-template-github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# default_template_github ![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue) [![default_template_github on crates.io](https://img.shields.io/crates/v/default_template_github)](https://crates.io/crates/default_template_github) [![default_template_github on docs.rs](https://docs.rs/default_template_github/badge.svg)](https://docs.rs/default_template_github) [![Source Code Repository](https://img.shields.io/badge/Code-On%20GitHub-blue?logo=GitHub)](https://github.com/foo/bar) ![Rust Version: 1.56.0](https://img.shields.io/badge/rustc-1.56.0-orange.svg)

An example pretending to be hosted on GitHub.

1 change: 1 addition & 0 deletions tests/pass/default-template-github/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//! An example pretending to be hosted on GitHub.
7 changes: 7 additions & 0 deletions tests/pass/default-template-gitlab/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions tests/pass/default-template-gitlab/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "default_template_gitlab"
version = "0.0.0"
publish = false
edition = "2021"

license = "Unlicense"
repository = "https://gitlab.com/foo/bar"
rust-version = "1.56"

[lib]
path = "lib.rs"
4 changes: 4 additions & 0 deletions tests/pass/default-template-gitlab/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# default_template_gitlab ![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue) [![default_template_gitlab on crates.io](https://img.shields.io/crates/v/default_template_gitlab)](https://crates.io/crates/default_template_gitlab) [![default_template_gitlab on docs.rs](https://docs.rs/default_template_gitlab/badge.svg)](https://docs.rs/default_template_gitlab) [![Source Code Repository](https://img.shields.io/badge/Code-On%20GitLab-blue?logo=GitLab)](https://gitlab.com/foo/bar) ![Rust Version: 1.56.0](https://img.shields.io/badge/rustc-1.56.0-orange.svg)

An example pretending to be hosted on GitLab.

1 change: 1 addition & 0 deletions tests/pass/default-template-gitlab/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//! An example pretending to be hosted on GitLab.