add indieweb endpoint meta tags
This commit is contained in:
parent
8b96fda262
commit
76185e3b57
3 changed files with 26 additions and 2 deletions
|
@ -18,7 +18,8 @@ config :chiya, ChiyaWeb.Endpoint,
|
||||||
layout: false
|
layout: false
|
||||||
],
|
],
|
||||||
pubsub_server: Chiya.PubSub,
|
pubsub_server: Chiya.PubSub,
|
||||||
live_view: [signing_salt: "OJncEkwy"]
|
live_view: [signing_salt: "OJncEkwy"],
|
||||||
|
user_agent: "Chiya/0.x +https://inhji.de"
|
||||||
|
|
||||||
# Configures the mailer
|
# Configures the mailer
|
||||||
#
|
#
|
||||||
|
@ -63,6 +64,18 @@ config :waffle,
|
||||||
# Configure Timezones with :tz
|
# Configure Timezones with :tz
|
||||||
config :elixir, :time_zone_database, Tz.TimeZoneDatabase
|
config :elixir, :time_zone_database, Tz.TimeZoneDatabase
|
||||||
|
|
||||||
|
config :chiya, :indie,
|
||||||
|
token_endpoint: "https://tokens.indieauth.com/token",
|
||||||
|
auth_endpoint: "https://indieauth.com/auth",
|
||||||
|
supported_scopes: [
|
||||||
|
# Micropub scopes
|
||||||
|
"create",
|
||||||
|
"update",
|
||||||
|
"delete",
|
||||||
|
"undelete",
|
||||||
|
"media"
|
||||||
|
]
|
||||||
|
|
||||||
# Import environment specific config. This must remain at the bottom
|
# Import environment specific config. This must remain at the bottom
|
||||||
# of this file so it overrides the configuration defined above.
|
# of this file so it overrides the configuration defined above.
|
||||||
import_config "#{config_env()}.exs"
|
import_config "#{config_env()}.exs"
|
||||||
|
|
|
@ -10,6 +10,10 @@
|
||||||
|
|
||||||
<.favicon />
|
<.favicon />
|
||||||
|
|
||||||
|
<link rel="authorization_endpoint" href={@auth_endpoint} />
|
||||||
|
<link rel="token_endpoint" href={@token_endpoint} />
|
||||||
|
<link rel="micropub" href={~p"/indie/micropub"} />
|
||||||
|
|
||||||
<%= for identity <- @identities do %>
|
<%= for identity <- @identities do %>
|
||||||
<link rel="me" href={identity.url} />
|
<link rel="me" href={identity.url} />
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
defmodule ChiyaWeb.GlobalAssigns do
|
defmodule ChiyaWeb.GlobalAssigns do
|
||||||
import Plug.Conn
|
import Plug.Conn
|
||||||
|
|
||||||
|
@token_endpoint Application.compile_env!(:chiya, [:indie, :token_endpoint])
|
||||||
|
@auth_endpoint Application.compile_env!(:chiya, [:indie, :auth_endpoint])
|
||||||
|
|
||||||
def fetch_settings(conn, _opts) do
|
def fetch_settings(conn, _opts) do
|
||||||
settings = Chiya.Site.get_settings()
|
settings = Chiya.Site.get_settings()
|
||||||
assign(conn, :settings, settings)
|
|
||||||
|
conn
|
||||||
|
|> assign(:token_endpoint, @token_endpoint)
|
||||||
|
|> assign(:auth_endpoint, @auth_endpoint)
|
||||||
|
|> assign(:settings, settings)
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_identities(conn, _opts) do
|
def fetch_identities(conn, _opts) do
|
||||||
|
|
Loading…
Reference in a new issue