phoenix_meta_tags alternatives and similar packages
Based on the "Framework Components" category.
Alternatively, view phoenix_meta_tags alternatives based on common mentions on social networks and blogs.
-
ex_admin
ExAdmin is an auto administration package for Elixir and the Phoenix Framework -
phoenix_html
Phoenix.HTML functions for working with HTML strings and templates -
phoenix_ecto
Phoenix and Ecto integration with support for concurrent acceptance testing -
absinthe_plug
Plug support for Absinthe, the GraphQL toolkit for Elixir -
react_phoenix
Make rendering React.js components in Phoenix easy -
phoenix_live_reload
Provides live-reload functionality for Phoenix -
params
Easy parameters validation/casting with Ecto.Schema, akin to Rails' strong parameters. -
phoenix_pubsub_redis
The Redis PubSub adapter for the Phoenix framework -
dayron
A repository `similar` to Ecto.Repo that maps to an underlying http client, sending requests to an external rest api instead of a database -
rummage_phoenix
Full Phoenix Support for Rummage. It can be used for searching, sorting and paginating collections in phoenix. -
phoenix_token_auth
Token authentication solution for Phoenix. Useful for APIs for e.g. single page apps. -
recaptcha
A simple reCaptcha 2 library for Elixir applications. -
plug_graphql
Plug (Phoenix) integration for GraphQL Elixir -
sentinel
DEPRECATED - Phoenix Authentication library that wraps Guardian for extra functionality -
plug_rails_cookie_session_store
Rails compatible Plug session store -
phx_component_helpers
Extensible Phoenix liveview components, without boilerplate -
multiverse
Elixir package that allows to add compatibility layers via API gateways. -
filterable
Filtering from incoming params in Elixir/Ecto/Phoenix with easy to use DSL. -
access pass
provides a full user authentication experience for an API. Includes login,logout,register,forgot password, forgot username, confirmation email and all that other good stuff. Includes plug for checking for authenticated users and macro for generating the required routes. -
better_params
Cleaner request parameters in Elixir web applications ๐ -
scrivener_headers
Scrivener pagination with headers and web linking -
phoenix_pubsub_rabbitmq
RabbitMQ adapter for Phoenix's PubSub layer -
plug_checkup
PlugCheckup provides a Plug for adding simple health checks to your app -
plug_statsd
Send connection response time and count to statsd -
plug_rest
REST behaviour and Plug router for hypermedia web applications in Elixir -
trailing_format_plug
An elixir plug to support legacy APIs that use a rails-like trailing format: http://api.dev/resources.json -
Votex
Implements vote / like / follow functionality for Ecto models in Elixir. Inspired from Acts as Votable gem in Ruby on Rails -
phoenix_html_simplified_helpers
Some helpers for phoenix html( truncate, time_ago_in_words, number_with_delimiter, url_for, current_page? )
Elixir and Phoenix Application Security Platform
Do you think we are missing an alternative of phoenix_meta_tags or a related project?
Popular Comparisons
README
PhoenixMetaTags
This is a library helps generate meta tags for a website.
Default Usage
From a struct like this:
%{
title: "Phoenix Title",
description: "Phoenix Descriptions",
url: "https://phoenix.meta.tags",
image: "https://phoenix.meta.tags/logo.png"
}
will become:
# Default tags
<title>Phoenix Title</title>
<meta content="Phoenix Title" name="title">
<meta content="Phoenix Descriptions" name="description">
#Open Graph tags
<meta content="website" property="og:type">
<meta content="https://phoenix.meta.tags" property="og:url">
<meta content="Phoenix Title" property="og:title">
<meta content="Phoenix Descriptions" property="og:description">
<meta content="https://phoenix.meta.tags/logo.png" property="og:image">
#Twitter tags
<meta content="summary_large_image" name="twitter:card">
<meta content="https://phoenix.meta.tags" name="twitter:url">
<meta content="Phoenix Title" name="twitter:title">
<meta content="Phoenix Descriptions" name="twitter:description">
<meta content="https://phoenix.meta.tags/logo.png" name="twitter:image">
Advanced Usage
Other key value of tags map will be rendered individualy by key. Nested map will be rendered by flat-representation of keys. For example:
map = %{
title: "Phoenix Title",
description: "Phoenix Descriptions",
url: "https://phoenix.meta.tags",
image: "https://phoenix.meta.tags/logo.png",
fb: %{
name: "facebook",
size: %{
width: 100,
height: 200,
position: %{
x: 10,
y: 15
}
}
}
}
In addition to default tags like above example, the rendered tags will have more:
<meta content="facebook" property="fb:name">
<meta content=100 property="fb:size:width">
<meta content=200 property="fb:size:height">
<meta content=10 property="fb:size:position:x">
<meta content=15 property="fb:size:position:y">
Instead of a nested map, you can also use a string-key map, this also delivers the same result:
map = %{
"title" => "PhoenixTags",
"fb:name" => "facebook",
"fb:size:width" => 100,
"fb:size:height" => 200,
"fb:size:position:x" => 10,
"fb:size:position:y" => 15
}
Tag Value Override
In default rendering, the og:title tag will get value from title. If you re-define og:title value, the new value will be override the default title value. For example:
map = %{
title: "Phoenix Title",
og: %{
title: "Override"
}
}
Will have ouput:
<title>Phoenix Title</title>
<meta content="Phoenix Title" name="title">
<meta content="Override" property="og:title">
Installation
The package can be installed
by adding phoenix_meta_tags
to your list of dependencies in mix.exs
:
def deps do
[
{:phoenix_meta_tags, ">= 0.1.8"}
]
end
In your Web Module add this:
def view do
quote do
...
use PhoenixMetaTags.TagView # Add this
end
end
def controller do
quote do
...
use PhoenixMetaTags.TagController # Add this
end
end
Also put this render function inside your <head> tag of app.html.eex:
<head>
<%= render_tags_all(assigns[:meta_tags] || %{})%> # Add this
</head>
Usage
Wherever you want to render meta tags, jut put it before render your view:
conn
|> put_meta_tags(
%{
title: "Phoenix Title",
description: "Phoenix Descriptions",
url: "https://phoenix.meta.tags",
image: "https://phoenix.meta.tags/logo.png"
})
|>render("index.html")
Or, use it as a plug:
@meta %{
title: "Phoenix Title",
description: "Phoenix Descriptions",
url: "https://phoenix.meta.tags",
image: "https://phoenix.meta.tags/logo.png"
}
plug :put_meta_tags, @meta
Default value
You can put the default value for meta tags in your config file. This config will be merge with runtime tags before rendering.
config :phoenix_meta_tags,
title: "Phoenix Title Default",
description: "Phoenix Descriptions Default",
url: "https://phoenix.meta.tags.default",
image: "https://phoenix.meta.tags.default/logo.png",
"og:text": "Hello Open Graph",
fb: %{
name: "facebook",
size: %{
width: 100,
height: 200,
position: %{
x: 10,
y: 15
}
}
}