diff --git a/archetypes/default.md b/archetypes/default.md index c2a5f28..78aeffe 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,6 +1,20 @@ +++ title = '{{ replace .File.ContentBaseName "-" " " | title }}' -date = {{ .Date }} +slug = '{{ .File.ContentBaseName }}' type = "psa" draft = true +[[resources]] + src = "badge.svg" + name = "badge" +++ + +## Visitors + +Thanks for your interest in using open-source software! + +You're probably here because a project linked to this page. Here's what the +author(s) of that project want you to know: + - [ ] TODO - What do you want visitors to understand when they visit a project + displaying this PSA? + +{{% maintainer_instructions slug="{{ .File.ContentBaseName }}" %}} \ No newline at end of file diff --git a/content/no-maintenance-intended/index.md b/content/no-maintenance-intended/index.md index 5980a1c..f7c87a0 100644 --- a/content/no-maintenance-intended/index.md +++ b/content/no-maintenance-intended/index.md @@ -22,23 +22,7 @@ author(s) of that project want you to know: - The code is open-source, so feel free to make a fork to resolve any shortcomings for your needs. (remember to give credit where it's due) -## Maintainers - -Here's how to add the badge for this Public Service Announcement to your README - -[![](badge.svg)](no-maintenance-intended.md) - -**Markdown** -``` -[![No Maintenance Intended](https://PSAs.dev/no-maintenance-intended/badge.svg)](https://PSAs.dev/no-maintenance-intended) -``` - -**ReStructured text** -``` -.. image:: https://PSAs.dev/no-maintenance-intended/badge.svg - :target: https://PSAs.dev/no-maintenance-intended - :alt: No Maintenance Intended -``` +{{% maintainer_instructions slug="no-maintenance-intended" %}} --- diff --git a/layouts/shortcodes/maintainer_instructions.md b/layouts/shortcodes/maintainer_instructions.md new file mode 100644 index 0000000..57a6a74 --- /dev/null +++ b/layouts/shortcodes/maintainer_instructions.md @@ -0,0 +1,17 @@ +## Maintainers + +Here's how to add the badge for this Public Service Announcement to your README + +[![](badge.svg)]({{ .Get "slug" }}.md) + +**Markdown** +``` +[![{{ replace ( .Get "slug") "-" " " | title }}]({{ .Page.Site.BaseURL }}{{ .Get "slug" }}/badge.svg)]({{ .Page.Site.BaseURL }}{{ .Get "slug" }}) +``` + +**ReStructured text** +``` +.. image:: {{ .Page.Site.BaseURL }}{{ .Get "slug" }}/badge.svg + :target: {{ .Page.Site.BaseURL }}{{ .Get "slug" }} + :alt: {{ replace ( .Get "slug") "-" " " | title }} +``` \ No newline at end of file