From b3b287bbf4da583bb1aa774588735403c85cf06e Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sun, 12 Feb 2023 16:02:00 +1100 Subject: [PATCH] Add webmentions --- app/templates/layouts/app.html.slim | 7 +++++-- config/settings.rb | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/templates/layouts/app.html.slim b/app/templates/layouts/app.html.slim index dac2adc..6f1edba 100644 --- a/app/templates/layouts/app.html.slim +++ b/app/templates/layouts/app.html.slim @@ -12,8 +12,11 @@ html link rel="token_endpoint" href=Hanami.app.settings.micropub_token_endpoint link rel="micropub" href="#{URI.join(Hanami.app.settings.micropub_site_url, "micropub")}" - link rel="me" href="https://social.dnitza.com/@daniel" - link rel="me" href="https://github.com/dnitza" + link rel="webmention" href=Hanami.app.settings.webmention_url + link rel="pingback" href=Hanami.app.settings.pingback_url + + link rel="me" href=Hanami.app.settings.mastodon_url + link rel="me" href=Hanami.app.settings.github_url link rel="stylesheet" href="/assets/index.css" link rel="icon" type="image/x-icon" href="/assets/favicon.ico" diff --git a/config/settings.rb b/config/settings.rb index 33b1e2a..a6646bb 100644 --- a/config/settings.rb +++ b/config/settings.rb @@ -18,7 +18,12 @@ module Adamantium setting :micropub_site_url # Auth setting :micropub_pub_key, default: nil - # TODO: add other auth methods here + setting :github_url, default: nil + setting :mastodon_url, default: nil + + setting :webmention_url, default: nil + setting :pingback_url, default: nil + setting :webmention_token, default: nil # Micropub endpoints setting :micropub_media_endpoint, default: "", constructor: Types::Params::String