Make domain name configurable
The domain name can be set using the `--domain` or `-d` flags. It defaults to `hitsofocode.com`. Also the CLI options are now parsed inside a lazy_static context to be available for the templates.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
@use super::base;
|
||||
|
||||
@(commit: &str, version: &str)
|
||||
@(commit: &str, version: &str, domain: &str)
|
||||
|
||||
@:base("Hits-of-Code Badges", "Hits-of-Code Badges", {
|
||||
|
||||
@ -23,7 +23,7 @@ used for GitHub, GitLab and Bitbucket repositories. Just put the following code
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
[](https://hitsofcode.com/view/<service>/<user>/<repo>)
|
||||
[](https://@domain/view/<service>/<user>/<repo>)
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@ -32,7 +32,7 @@ following Markdown
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
[](https://hitsofcode.com/view/github/vbrandl/hoc)
|
||||
[](https://@domain/view/github/vbrandl/hoc)
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@ -40,7 +40,7 @@ would render this badge:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<a href="https://hitsofcode.com/view/github/vbrandl/hoc"><img src="https://hitsofcode.com/github/vbrandl/hoc"
|
||||
<a href="https://@domain/view/github/vbrandl/hoc"><img src="https://@domain/github/vbrandl/hoc"
|
||||
alt="example badge" /></a>
|
||||
</pre>
|
||||
|
||||
|
Reference in New Issue
Block a user