Replace collective_noun with community_name (#11846) [deploy]
* Removes collective_noun and collective_noun_disabled from app * Config Generalization: replaces community_qualified_name with community_name - Generalizes SiteConfig after the removal of collective_noun field - Updates copy where necessary to be readable with community_name - Makes the community_name SiteConfig description more explicit - Adds flexibility for Admins by removing appended "community" * Adds a data_update script to remove collective_noun and collective_noun_disabled * Removes appended community from stories_controller.rb * Removes unnecessary quotation marks around SiteConfig.community_name.to_s * Makes SiteConfig community_name description more explicit * Removes topic from #email_from and replaces arg with _ * Removes argument from #email_from (facepalm) * Reverts changes to application_mailer and notify_mailer_spec * Removes default "Community" topic from application_mailer and makes topic optional * Refactors #prepopulate_new_form to resolve Code Climate failures * Refactors #email_from even further by use of a ternary operator per review suggestion * Simplifies the data_update script used to remove collective_noun per review request * Adds a data_update script to append community to community_name * Updates data_update script to correctly append Community to community_name * Removes RemoveCollectiveNounFromConfig and updates other script * Removes superfluous false from data_update script * Updates data_update script to be more idiomatic
This commit is contained in:
parent
5a384a81a7
commit
ca6ba1af7d
61 changed files with 158 additions and 203 deletions
|
|
@ -59,51 +59,39 @@ module Admin
|
|||
end
|
||||
|
||||
def prepopulate_new_form(slug)
|
||||
case slug
|
||||
when "code-of-conduct"
|
||||
html = view_context.render partial: "pages/coc_text",
|
||||
locals: {
|
||||
community_name: view_context.community_name,
|
||||
community_qualified_name: view_context.community_qualified_name,
|
||||
email_link: view_context.email_link
|
||||
}
|
||||
@page = Page.new(
|
||||
slug: params[:slug],
|
||||
body_html: html,
|
||||
title: "Code of Conduct",
|
||||
description: "A page that describes how to behave on this platform",
|
||||
is_top_level_path: true,
|
||||
)
|
||||
|
||||
when "privacy"
|
||||
html = view_context.render partial: "pages/privacy_text",
|
||||
locals: {
|
||||
community_name: view_context.community_name,
|
||||
email_link: view_context.email_link
|
||||
}
|
||||
@page = Page.new(
|
||||
slug: params[:slug],
|
||||
body_html: html,
|
||||
title: "Privacy Policy",
|
||||
description: "A page that describes the privacy policy",
|
||||
is_top_level_path: true,
|
||||
)
|
||||
when "terms"
|
||||
html = view_context.render partial: "pages/terms_text",
|
||||
locals: {
|
||||
community_name: view_context.community_name,
|
||||
email_link: view_context.email_link
|
||||
}
|
||||
@page = Page.new(
|
||||
slug: params[:slug],
|
||||
body_html: html,
|
||||
title: "Terms of Use",
|
||||
description: "A page that describes the terms of use for the application",
|
||||
is_top_level_path: true,
|
||||
)
|
||||
else
|
||||
@page = Page.new
|
||||
end
|
||||
html = view_context.render partial: "pages/coc_text",
|
||||
locals: {
|
||||
community_name: view_context.community_name,
|
||||
email_link: view_context.email_link
|
||||
}
|
||||
@page = case slug
|
||||
when "code-of-conduct"
|
||||
Page.new(
|
||||
slug: params[:slug],
|
||||
body_html: html,
|
||||
title: "Code of Conduct",
|
||||
description: "A page that describes how to behave on this platform",
|
||||
is_top_level_path: true,
|
||||
)
|
||||
when "privacy"
|
||||
Page.new(
|
||||
slug: params[:slug],
|
||||
body_html: html,
|
||||
title: "Privacy Policy",
|
||||
description: "A page that describes the privacy policy",
|
||||
is_top_level_path: true,
|
||||
)
|
||||
when "terms"
|
||||
Page.new(
|
||||
slug: params[:slug],
|
||||
body_html: html,
|
||||
title: "Terms of Use",
|
||||
description: "A page that describes the terms of use for the application",
|
||||
is_top_level_path: true,
|
||||
)
|
||||
else
|
||||
Page.new
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ class StoriesController < ApplicationController
|
|||
"publisher": {
|
||||
"@context": "http://schema.org",
|
||||
"@type": "Organization",
|
||||
"name": "#{SiteConfig.community_name} Community",
|
||||
"name": SiteConfig.community_name.to_s,
|
||||
"logo": {
|
||||
"@context": "http://schema.org",
|
||||
"@type": "ImageObject",
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ module ApplicationHelper
|
|||
derived_title = if page_title.include?(community_name)
|
||||
page_title
|
||||
elsif user_signed_in?
|
||||
"#{page_title} - #{community_qualified_name} #{community_emoji}"
|
||||
"#{page_title} - #{community_name} #{community_emoji}"
|
||||
else
|
||||
"#{page_title} - #{community_name}"
|
||||
end
|
||||
|
|
@ -173,12 +173,6 @@ module ApplicationHelper
|
|||
@community_emoji ||= SiteConfig.community_emoji
|
||||
end
|
||||
|
||||
def community_qualified_name
|
||||
return "#{community_name} #{SiteConfig.collective_noun}" unless SiteConfig.collective_noun_disabled
|
||||
|
||||
community_name
|
||||
end
|
||||
|
||||
def release_adjusted_cache_key(path)
|
||||
release_footprint = ApplicationConfig["RELEASE_FOOTPRINT"]
|
||||
return path if release_footprint.blank?
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ const emailAuthModalBody = `
|
|||
export default class ConfigController extends Controller {
|
||||
static targets = [
|
||||
'authenticationProviders',
|
||||
'collectiveNoun',
|
||||
'configModalAnchor',
|
||||
'emailAuthSettingsBtn',
|
||||
'enabledIndicator',
|
||||
|
|
|
|||
|
|
@ -45,10 +45,6 @@ module Constants
|
|||
description: "https://url.com/lander",
|
||||
placeholder: "URL campaign sidebar image will link to"
|
||||
},
|
||||
collective_noun: {
|
||||
description: "Used to describe your collective identity.",
|
||||
placeholder: "Herd"
|
||||
},
|
||||
community_copyright_start_year: {
|
||||
description: "Used to mark the year this forem was started.",
|
||||
placeholder: Time.zone.today.year.to_s
|
||||
|
|
@ -66,7 +62,7 @@ module Constants
|
|||
placeholder: "user"
|
||||
},
|
||||
community_name: {
|
||||
description: "Primary name... e.g. DEV",
|
||||
description: "Used as the primary name for your Forem, e.g. DEV, DEV Community, The DEV Community, etc.",
|
||||
placeholder: "New Forem"
|
||||
},
|
||||
credit_prices_in_cents: {
|
||||
|
|
|
|||
|
|
@ -10,12 +10,14 @@ class ApplicationMailer < ActionMailer::Base
|
|||
before_action :use_custom_host
|
||||
|
||||
default(
|
||||
from: -> { email_from("Community") },
|
||||
from: -> { email_from },
|
||||
template_path: ->(mailer) { "mailers/#{mailer.class.name.underscore}" },
|
||||
)
|
||||
|
||||
def email_from(topic)
|
||||
"#{SiteConfig.community_name} #{topic} <#{SiteConfig.email_addresses[:default]}>"
|
||||
def email_from(topic = "")
|
||||
community_name = topic.present? ? "#{SiteConfig.community_name} #{topic}" : SiteConfig.community_name
|
||||
|
||||
"#{community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
end
|
||||
|
||||
def generate_unsubscribe_token(id, email_type)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ class DeviseMailer < Devise::Mailer
|
|||
|
||||
def use_site_config_values
|
||||
Devise.mailer_sender =
|
||||
"#{SiteConfig.community_name} #{SiteConfig.collective_noun} <#{SiteConfig.email_addresses[:default]}>"
|
||||
"#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
ActionMailer::Base.default_url_options[:host] = SiteConfig.app_domain
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -55,8 +55,6 @@ class SiteConfig < RailsSettings::Base
|
|||
# Community Content
|
||||
field :community_name, type: :string, default: ApplicationConfig["COMMUNITY_NAME"] || "New Forem"
|
||||
field :community_emoji, type: :string, default: "🌱"
|
||||
field :collective_noun, type: :string, default: "Community"
|
||||
field :collective_noun_disabled, type: :boolean, default: false
|
||||
field :community_description, type: :string
|
||||
field :community_member_label, type: :string, default: "user"
|
||||
field :tagline, type: :string
|
||||
|
|
|
|||
|
|
@ -437,19 +437,6 @@
|
|||
placeholder: Constants::SiteConfig::DETAILS[:community_name][:placeholder] %>
|
||||
</div>
|
||||
|
||||
<div class="crayons-field">
|
||||
<%= admin_config_label :collective_noun %>
|
||||
<%= admin_config_description Constants::SiteConfig::DETAILS[:collective_noun][:description] %>
|
||||
<%= f.text_field :collective_noun,
|
||||
class: "crayons-textfield",
|
||||
value: SiteConfig.collective_noun,
|
||||
placeholder: Constants::SiteConfig::DETAILS[:collective_noun][:placeholder],
|
||||
disabled: SiteConfig.collective_noun_disabled,
|
||||
data: { target: "config.collectiveNoun" } %>
|
||||
<%= admin_config_label :collective_noun_disabled %>
|
||||
<%= f.check_box :collective_noun_disabled, checked: SiteConfig.collective_noun_disabled, data: { action: "config#disableTargetField", disable_target: "collectiveNoun" }, class: "crayons-checkbox" %>
|
||||
</div>
|
||||
|
||||
<div class="crayons-field">
|
||||
<%= admin_config_label :community_emoji %>
|
||||
<%= admin_config_description Constants::SiteConfig::DETAILS[:community_emoji][:description] %>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
xml.instruct! :xml, version: "1.0"
|
||||
xml.rss version: "2.0" do
|
||||
xml.channel do
|
||||
xml.title user ? user.name : community_qualified_name
|
||||
xml.author user ? user.name : community_qualified_name
|
||||
xml.title user ? user.name : community_name
|
||||
xml.author user ? user.name : community_name
|
||||
xml.description user ? user.summary : SiteConfig.community_description
|
||||
xml.link user ? app_url(user.path) : app_url
|
||||
xml.language "en"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<%= content_for :page_meta do %>
|
||||
<% title_with_timeframe(
|
||||
page_title: "#{community_qualified_name} #{community_emoji}",
|
||||
page_title: "#{community_name} #{community_emoji}",
|
||||
timeframe: params[:timeframe],
|
||||
content_for: true,
|
||||
) %>
|
||||
|
|
@ -11,13 +11,13 @@
|
|||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="<%= app_url(request.path) %>" />
|
||||
<meta property="og:title" content="<%= title_with_timeframe(page_title: community_qualified_name, timeframe: params[:timeframe]) %>" />
|
||||
<meta property="og:title" content="<%= title_with_timeframe(page_title: community_name, timeframe: params[:timeframe]) %>" />
|
||||
<meta property="og:image" content="<%= SiteConfig.main_social_image %>">
|
||||
<meta property="og:description" content="<%= SiteConfig.community_description %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="<%= title_with_timeframe(page_title: community_qualified_name, timeframe: params[:timeframe]) %>">
|
||||
<meta name="twitter:title" content="<%= title_with_timeframe(page_title: community_name, timeframe: params[:timeframe]) %>">
|
||||
<meta name="twitter:description" content="<%= SiteConfig.community_description %>">
|
||||
<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="<%= community_name %> => Search Results" />
|
||||
<meta property="og:title" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:title" content="<%= community_name %>" />
|
||||
<meta property="og:image" content="<%= SiteConfig.main_social_image %>">
|
||||
<meta property="og:description" content="<%= SiteConfig.community_description %>">
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="<%= community_name %> => Search Results">
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
<meta property="og:url" content="<%= article_url(@article) %>" />
|
||||
<meta property="og:title" content="<%= @article.title %>" />
|
||||
<meta property="og:description" content="<%= @article.description || "An article from the community" %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:creator" content="@<%= @user.twitter_username %>">
|
||||
<meta name="twitter:title" content="<%= @article.title %>">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<meta property="og:url" content="<%= tag_url(@tag_model, @page) %>" />
|
||||
<meta property="og:title" content="<%= title_with_timeframe(page_title: @tag.capitalize, timeframe: params[:timeframe]) %>" />
|
||||
<meta property="og:description" content="<%= @tag.capitalize %> content on <%= community_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:creator" content="@<%= @tag.capitalize %>">
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@
|
|||
<meta property="og:url" content="<%= app_url("/about") %>" />
|
||||
<meta property="og:title" content="About <%= community_name %>" />
|
||||
<meta property="og:image" content="<%= SiteConfig.main_social_image %>" />
|
||||
<meta property="og:description" content="<%= community_qualified_name %> is great!" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:description" content="<%= community_name %> is great!" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="About <%= community_name %>">
|
||||
<meta name="twitter:description" content="<%= community_qualified_name %> is great!">
|
||||
<meta name="twitter:description" content="<%= community_name %> is great!">
|
||||
<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content="Discussion of <%= @commentable.title %>" />
|
||||
<meta property="og:description" content="<%= @commentable.description || "#{community_name} Comment" %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:creator" content="@<%= @user.twitter_username %>">
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
<span class="end utc"><%= event.ends_at.strftime("%d %B %Y %H:%M UTC") %></span>
|
||||
<span class="timezone">America/New_York</span>
|
||||
<span class="title"><%= event.title %></span>
|
||||
<span class="organizer"><%= community_qualified_name %></span>
|
||||
<span class="organizer"><%= community_name %></span>
|
||||
<span class="organizer_email"><%= SiteConfig.email_addresses[:members] %></span>
|
||||
<span class="calname">dev-event</span>
|
||||
<span class="location"><%= event.location_url %></span>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<meta property="og:url" content="<%= app_url("/events") %>" />
|
||||
<meta property="og:title" content="<%= community_name %> Events" />
|
||||
<meta property="og:description" content="Community events." />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
<meta property="og:image" content="<%= SiteConfig.main_social_image %>">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<meta property="og:image" content="<%= SiteConfig.main_social_image %>" />
|
||||
<% end %>
|
||||
<meta property="og:description" content="<%= truncate(strip_tags(@event.description_html), length: 140) %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@
|
|||
<div class="pt-4"><%= render partial: "layouts/social_media" %></div>
|
||||
</nav>
|
||||
<hr class="crayons-footer__divider">
|
||||
<p class="fs-s crayons-footer__description"><a href="/" aria-label="<%= community_name %> Home" class="crayons-link"><%= community_qualified_name %></a> – <%= SiteConfig.community_description %></p>
|
||||
<p class="fs-s crayons-footer__description"><a href="/" aria-label="<%= community_name %> Home" class="crayons-link"><%= community_name %></a> – <%= SiteConfig.community_description %></p>
|
||||
<div class="m:-mb-4 crayons-footer__description">
|
||||
<%# The following copy is necessary for compatability with the Forem AGPL licence which requires instances to link back to the source. %>
|
||||
<p class="fs-s">Built on <a href="https://www.forem.com" class="crayons-link" target="_blank" rel="noopener">Forem</a> — the <a href="https://dev.to/t/opensource" target="_blank" rel="noopener" class="crayons-link">open source</a> software that powers <a href="https://dev.to" target="_blank" rel="noopener" class="crayons-link">DEV</a> and other inclusive communities.</p>
|
||||
<p class="fs-s">Made with love and <a href="https://dev.to/t/rails" target="_blank" rel="noopener" class="crayons-link">Ruby on Rails</a>. <%= community_qualified_name %> <span title="copyright">©</span> <%= copyright_notice %>.</p>
|
||||
<p class="fs-s">Made with love and <a href="https://dev.to/t/rails" target="_blank" rel="noopener" class="crayons-link">Ruby on Rails</a>. <%= community_name %> <span title="copyright">©</span> <%= copyright_notice %>.</p>
|
||||
<div><a href="https://www.forem.com" target="_blank" rel="noopener" class="inline-block mt-4"><%= inline_svg_tag("logo-forem.svg", aria: true, class: "crayons-icon crayons-icon--default", title: "Forem logo") %></a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="<%= app_url(request.path) %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
<% if @displayed_listing %>
|
||||
<meta property="og:title" content="<%= truncate @displayed_listing.title, length: 54 %>">
|
||||
<meta property="og:description" content="<%= community_name %> Listing" />
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
</p>
|
||||
|
||||
<p>
|
||||
Thanks so much for volunteering your time to benefit the <%= community_qualified_name %>. We sincerely appreciate your help!.</p>
|
||||
Thanks so much for volunteering your time to benefit <%= community_name %>. We sincerely appreciate your help!.</p>
|
||||
<p>
|
||||
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Tag moderation is something we're continuously iterating on, so you can expect a
|
|||
We regularly send out a biweekly Mod Newsletter to keep mods up to date on these changes, so look out for it!
|
||||
Of course, don't hesitate to reach out to us at any moment if you have any feedback — feel free to write to <%= SiteConfig.email_addresses[:contact] %> and share your thoughts.
|
||||
|
||||
Thanks so much for volunteering your time to benefit the <%= community_qualified_name %>. We sincerely appreciate your help!
|
||||
Thanks so much for volunteering your time to benefit <%= community_name %>. We sincerely appreciate your help!
|
||||
|
||||
Happy Modding!
|
||||
<%= community_name %> Team
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<meta property="og:url" content="<%= app_url("/notifications") %>" />
|
||||
<meta property="og:title" content="Notifications - <%= community_name %>" />
|
||||
<meta property="og:description" content="Notifications inbox for <%= community_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
</style>
|
||||
|
||||
<div id="onboarding-container"
|
||||
data-community-name="<%= community_qualified_name %>"
|
||||
data-community-name="<%= community_name %>"
|
||||
data-community-description="<%= SiteConfig.community_description %>"
|
||||
data-community-logo="<%= optimized_image_url(safe_logo_url(SiteConfig.onboarding_logo_image)) %>"
|
||||
data-community-background="<%= optimized_image_url(SiteConfig.onboarding_background_image, width: 1680, quality: 75, random_fallback: false) %>">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName><%= helper.community_name %> Search</ShortName>
|
||||
<Description>Find posts from the <%= helper.community_qualified_name %>.</Description>
|
||||
<Description>Find posts from <%= helper.community_name %>.</Description>
|
||||
<Contact><%= SiteConfig.email_addresses[:contact] %></Contact>
|
||||
<Url type="text/html" template="<%= URL.url("search") %>?q={searchTerms}" />
|
||||
</OpenSearchDescription>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<p>All participants of the <%= community_qualified_name %> are expected to abide by our Code of Conduct, both online and during in-person events that are hosted and/or associated with <%= community_name %> .</p>
|
||||
<p>All participants of <%= community_name %> are expected to abide by our Code of Conduct, both online and during in-person events that are hosted and/or associated with <%= community_name %> .</p>
|
||||
<h2>Our Pledge</h2>
|
||||
<p>In the interest of fostering an open and welcoming environment, we as moderators of
|
||||
<a href="<%= app_url %>"><%= community_name %></a> pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<% title "#{title} #{community_qualified_name}" %>
|
||||
<% title "#{title} #{community_name}" %>
|
||||
|
||||
<div class="crayons-layout crayons-layout--limited-l">
|
||||
<div class="crayons-card text-styles text-padding">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<title><%= community_qualified_name %> ❤️</title>
|
||||
<title><%= community_name %> ❤️</title>
|
||||
</head>
|
||||
<body>
|
||||
<%= @html_variant.html.html_safe %>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<meta property="og:title" content="Add the <%= community_name %> Badge to your personal site" />
|
||||
<meta property="og:image" content="https://thepracticaldev.s3.amazonaws.com/i/kjn1gduswyrrisc1basc.png" />
|
||||
<meta property="og:description" content="Show visitors that you are an active member of our wonderful community. Put the badge on your personal website or use it as you see fit." />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<% title "#{community_qualified_name} Code of Conduct" %>
|
||||
<% title "#{community_name} Code of Conduct" %>
|
||||
|
||||
<%= content_for :page_meta do %>
|
||||
<link rel="canonical" href="<%= app_url(code_of_conduct_path) %>" />
|
||||
<meta name="description" content="<%= community_qualified_name %> Code of Conduct">
|
||||
<meta name="description" content="<%= community_name %> Code of Conduct">
|
||||
<%= meta_keywords_default %>
|
||||
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="<%= app_url(code_of_conduct_path) %>" />
|
||||
<meta property="og:title" content="<%= community_qualified_name %> Code of Conduct" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:title" content="<%= community_name %> Code of Conduct" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="<%= community_qualified_name %> Code of Conduct">
|
||||
<meta name="twitter:title" content="<%= community_name %> Code of Conduct">
|
||||
<% end %>
|
||||
|
||||
<div class="crayons-layout crayons-layout--limited-l">
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
<% title "Contact #{community_qualified_name}" %>
|
||||
<% title "Contact #{community_name}" %>
|
||||
|
||||
<%= content_for :page_meta do %>
|
||||
<link rel="canonical" href="<%= app_url("/contact") %>" />
|
||||
<meta name="description" content="Contact #{community_qualified_name}">
|
||||
<meta name="description" content="Contact #{community_name}">
|
||||
<%= meta_keywords_default %>
|
||||
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="<%= app_url("/contact") %>" />
|
||||
<meta property="og:title" content="Contact #{community_qualified_name}" />
|
||||
<meta property="og:title" content="Contact #{community_name}" />
|
||||
<meta property="og:image" content="<%= SiteConfig.main_social_image %>" />
|
||||
<meta property="og:description" content="<%= community_qualified_name %> is great!" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:description" content="<%= community_name %> is great!" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="Contact #{community_qualified_name}">
|
||||
<meta name="twitter:description" content="<%= community_qualified_name %> is great!">
|
||||
<meta name="twitter:title" content="Contact #{community_name}">
|
||||
<meta name="twitter:description" content="<%= community_name %> is great!">
|
||||
<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">
|
||||
<% end %>
|
||||
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
<h1 class="fs-3xl s:fs-4xl l:fs-5xl fw-bold s:fw-heavy lh-tight mb-4 mt-0">Contacts</h1>
|
||||
|
||||
<p>
|
||||
<%= community_qualified_name %> would love to hear from you!
|
||||
<%= community_name %> would love to hear from you!
|
||||
</p>
|
||||
<p>
|
||||
Email: <%= email_link %> 😁
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
<meta property="og:url" content="<%= app_url("/privacy") %>" />
|
||||
<meta property="og:title" content="Privacy Policy for <%= community_name %>" />
|
||||
<meta property="og:image" content="<%= SiteConfig.main_social_image %>" />
|
||||
<meta property="og:description" content="<%= community_qualified_name %> is great!" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:description" content="<%= community_name %> is great!" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="Privacy Policy for <%= community_name %>">
|
||||
<meta name="twitter:description" content="<%= community_qualified_name %> is great!">
|
||||
<meta name="twitter:description" content="<%= community_name %> is great!">
|
||||
<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">
|
||||
<% end %>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="<%= app_url("/report-abuse") %>" />
|
||||
<meta property="og:title" content="Report Abuse" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="Report Abuse">
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
<% title @page.title %>
|
||||
<%= content_for :page_meta do %>
|
||||
<link rel="canonical" href="<%= app_url(@page.path) %>" />
|
||||
<meta name="description" content="<%= @page.title %> — <%= community_qualified_name %>">
|
||||
<meta name="description" content="<%= @page.title %> — <%= community_name %>">
|
||||
<%= meta_keywords_default %>
|
||||
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="<%= app_url(@page.path) %>" />
|
||||
<meta property="og:title" content="<%= @page.title %> — <%= community_qualified_name %>" />
|
||||
<meta property="og:title" content="<%= @page.title %> — <%= community_name %>" />
|
||||
<meta property="og:image" content="<%= @page.social_image_url || SiteConfig.main_social_image %>" />
|
||||
<meta property="og:description" content="<%= @page.description %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="<%= @page.title %> — <%= community_qualified_name %>">
|
||||
<meta name="twitter:title" content="<%= @page.title %> — <%= community_name %>">
|
||||
<meta name="twitter:description" content="<%= @page.description %>">
|
||||
<meta name="twitter:image:src" content="<%= @page.social_image_url || SiteConfig.main_social_image %>">
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
<% title("Terms of Use for the #{community_qualified_name}") %>
|
||||
<% title("Terms of Use for #{community_name}") %>
|
||||
|
||||
<%= content_for :page_meta do %>
|
||||
<link rel="canonical" href="<%= app_url("/terms") %>" />
|
||||
<meta name="description" content="Terms of Use for the <%= community_qualified_name %>">
|
||||
<meta name="description" content="Terms of Use for <%= community_name %>">
|
||||
<%= meta_keywords_default %>
|
||||
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="<%= app_url("/terms") %>" />
|
||||
<meta property="og:title" content="Terms of Use for the <%= community_qualified_name %>" />
|
||||
<meta property="og:title" content="Terms of Use for <%= community_name %>" />
|
||||
<meta property="og:image" content="<%= SiteConfig.main_social_image %>" />
|
||||
<meta property="og:description" content="<%= community_qualified_name %> is great!" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:description" content="<%= community_name %> is great!" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="Terms of Use for the <%= community_qualified_name %>">
|
||||
<meta name="twitter:description" content="<%= community_qualified_name %> is great!">
|
||||
<meta name="twitter:title" content="Terms of Use for <%= community_name %>">
|
||||
<meta name="twitter:description" content="<%= community_name %> is great!">
|
||||
<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">
|
||||
<% end %>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<h1>Bronze Sponsorship</h1>
|
||||
|
||||
<p>
|
||||
Thank you for supporting the <%= community_qualified_name %>! Here’s what to expect with a Bronze Sponsorship:
|
||||
Thank you for supporting <%= community_name %>! Here’s what to expect with a Bronze Sponsorship:
|
||||
</p>
|
||||
|
||||
<h3>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
🏆 Special flair on your organization profile page
|
||||
</h3>
|
||||
<p>
|
||||
As a Bronze sponsor, you will receive special flair that lives on your organization page. This visual cue will show the <%= community_qualified_name %> and broader ecosystem that you are an important community supporter, providing a natural draw for increased engagement on the platform. And, of course, you’ll have bragging rights and company pride knowing that you’re supporting a wonderful community.
|
||||
As a Bronze sponsor, you will receive special flair that lives on your organization page. This visual cue will show <%= community_name %> and broader ecosystem that you are an important community supporter, providing a natural draw for increased engagement on the platform. And, of course, you’ll have bragging rights and company pride knowing that you’re supporting a wonderful community.
|
||||
</p>
|
||||
<% if user_signed_in? %>
|
||||
<h3>Bronze sponsorship costs 100 credits/mo ($250 when purchased in bulk)</h3>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ It will also include a call-to-action to follow your organization directly in th
|
|||
🏆 Special flair on your organization profile page
|
||||
</h3>
|
||||
<p>
|
||||
As a Gold sponsor, you will receive special flair that lives on your organization page. This visual cue will show the <%= community_qualified_name %> and broader ecosystem that you are an important community supporter, providing a natural draw for increased engagement on the platform. And, of course, you’ll have bragging rights and company pride knowing that you’re supporting a wonderful community.
|
||||
As a Gold sponsor, you will receive special flair that lives on your organization page. This visual cue will show <%= community_name %> and broader ecosystem that you are an important community supporter, providing a natural draw for increased engagement on the platform. And, of course, you’ll have bragging rights and company pride knowing that you’re supporting a wonderful community.
|
||||
</p>
|
||||
<% unless user_signed_in? %>
|
||||
<h2>Email <%= email_link(:business) %> for pricing information</h2>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
🏆 Special flair on your organization profile page
|
||||
</h3>
|
||||
<p>
|
||||
As a Silver sponsor, you will receive special flair that lives on your organization page. This visual cue will show the <%= community_qualified_name %> and broader ecosystem that you are an important community supporter, providing a natural draw for increased engagement on the platform. And, of course, you’ll have bragging rights and company pride knowing that you’re supporting a wonderful community.
|
||||
As a Silver sponsor, you will receive special flair that lives on your organization page. This visual cue will show <%= community_name %> and broader ecosystem that you are an important community supporter, providing a natural draw for increased engagement on the platform. And, of course, you’ll have bragging rights and company pride knowing that you’re supporting a wonderful community.
|
||||
</p>
|
||||
<% if user_signed_in? %>
|
||||
<h3>Silver sponsorship costs 500 credits/mo ($1,250 when purchased in bulk)</h3>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Target your messaging with a tag sponsorship. This is a great way to increase y
|
|||
Placement on our tag overview page
|
||||
</h3>
|
||||
<p>
|
||||
Members of the <%= community_qualified_name %> head to the dedicated tags page to explore new areas of the site, and to manage which tags they follow. Your company will be listed as a sponsor directly alongside the tag you support. This placement provides visibility to all members, even if they don’t directly engage within your tag.
|
||||
Members of <%= community_name %> head to the dedicated tags page to explore new areas of the site, and to manage which tags they follow. Your company will be listed as a sponsor directly alongside the tag you support. This placement provides visibility to all members, even if they don’t directly engage within your tag.
|
||||
</p>
|
||||
<h3>
|
||||
Special flair on your organization profile page
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<meta property="og:image" content="<%= SiteConfig.main_social_image %>">
|
||||
|
||||
<meta property="og:description" content="<%= @podcast.description %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
|
|
@ -30,16 +30,16 @@
|
|||
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="<%= app_url(pod_path) %>" />
|
||||
<meta property="og:title" content="Podcasts on <%= community_qualified_name %>" />
|
||||
<meta property="og:title" content="Podcasts on <%= community_name %>" />
|
||||
<meta property="og:image" content="http://i.imgur.com/e5tJ9L9.png">
|
||||
|
||||
<meta property="og:description" content="Discover technical podcasts for <%= community_members_label %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:creator" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="Podcasts on <%= community_qualified_name %>">
|
||||
<meta name="twitter:title" content="Podcasts on <%= community_name %>">
|
||||
<meta name="twitter:description" content="Discover technical podcasts for <%= community_members_label %>" />
|
||||
<meta name="twitter:image:src" content="http://i.imgur.com/e5tJ9L9.png">
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<meta property="og:url" content="<%= app_url("/#{@podcast.slug}/#{@episode.slug}") %>" />
|
||||
<meta property="og:title" content="<%= @episode.title %>" />
|
||||
<meta property="og:description" content="<%= truncate(strip_tags(@episode.body), length: 140) %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:creator" content="@software_daily">
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="<%= app_url("/readinglist") %>" />
|
||||
<meta property="og:title" content="Reading List - <%= community_qualified_name %>" />
|
||||
<meta property="og:title" content="Reading List - <%= community_name %>" />
|
||||
<meta property="og:description" content="My saved posts." />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="Reading List - <%= community_qualified_name %>">
|
||||
<meta name="twitter:title" content="Reading List - <%= community_name %>">
|
||||
<meta name="twitter:description" content="My saved posts.">
|
||||
<% end %>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "<%= community_qualified_name %>",
|
||||
"name": "<%= community_name %>",
|
||||
"short_name": "<%= SiteConfig.app_domain %>",
|
||||
"description": "<%= SiteConfig.community_description %>",
|
||||
"start_url": "/",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="hamburger">
|
||||
<div class="hamburger__content">
|
||||
<header class="hamburger__content__header">
|
||||
<h2 class="fs-l fw-bold flex-1 break-word lh-tight"><%= community_qualified_name.to_s %></h2>
|
||||
<h2 class="fs-l fw-bold flex-1 break-word lh-tight"><%= community_name.to_s %></h2>
|
||||
|
||||
<button class="crayons-btn crayons-btn--ghost crayons-btn--icon-rounded js-hamburger-trigger shrink-0">
|
||||
<%= inline_svg_tag("x.svg", aria: true, class: "crayons-icon", title: "Close") %>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<% title = yield(:title) %>
|
||||
<title><%= title || community_qualified_name.to_s %></title>
|
||||
<title><%= title || community_name.to_s %></title>
|
||||
<% unless internal_navigation? %>
|
||||
<meta name="last-updated" content="<%= Time.current %>">
|
||||
<meta name="user-signed-in" content="<%= user_signed_in? %>">
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
<meta name="application-name" content="<%= SiteConfig.app_domain %>">
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel="search" href="<%= URL.url("open-search.xml") %>" type="application/opensearchdescription+xml" title="<%= community_qualified_name %>" />
|
||||
<link rel="search" href="<%= URL.url("open-search.xml") %>" type="application/opensearchdescription+xml" title="<%= community_name %>" />
|
||||
|
||||
<meta property="forem:name" content="<%= community_name %>" />
|
||||
<meta property="forem:logo" content="<%= optimized_image_url(SiteConfig.logo_png, width: 512, fetch_format: "png") %>" />
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
<meta property="og:url" content="<%= app_url("/tags") %>" />
|
||||
<meta property="og:title" content="Tags to follow on <%= community_name %>" />
|
||||
<meta property="og:image" content="<%= SiteConfig.main_social_image %>" />
|
||||
<meta property="og:description" content="<%= community_qualified_name %> is great!" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:description" content="<%= community_name %> is great!" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="About <%= community_name %>">
|
||||
<meta name="twitter:description" content="<%= community_qualified_name %> is great!">
|
||||
<meta name="twitter:description" content="<%= community_name %> is great!">
|
||||
<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">
|
||||
<% end %>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<meta property="og:title" content="<%= @user.name %> — <%= community_name %> Profile" />
|
||||
<meta property="og:image" content="<%= user_social_image_url(@user) %>">
|
||||
<meta property="og:description" content="<%= @user.summary %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
<meta name="twitter:description" content="<%= @user.summary %>">
|
||||
<meta name="twitter:image:src" content="<%= user_social_image_url(@user) %>">
|
||||
<% if @stories.any? %>
|
||||
<%= auto_discovery_link_tag(:rss, app_url("/feed/#{@user.username}"), title: "#{community_qualified_name} RSS Feed") %>
|
||||
<%= auto_discovery_link_tag(:rss, app_url("/feed/#{@user.username}"), title: "#{community_name} RSS Feed") %>
|
||||
<% end %>
|
||||
|
||||
<% if @user.banned %>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<meta property="og:title" content="<%= page_title %>" />
|
||||
<meta property="og:image" content="<%= SiteConfig.main_social_image %>">
|
||||
<meta property="og:description" content="All videos on <%= community_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta property="og:site_name" content="<%= community_name %>" />
|
||||
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:title" content="<%= page_title %>">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
module DataUpdateScripts
|
||||
class AppendCommunityToCommunityName
|
||||
def run
|
||||
return unless SiteConfig.collective_noun_disabled?
|
||||
|
||||
SiteConfig.where(var: "community_name").find_each do |community_name|
|
||||
community_name.update!(value: "#{community_name.value} #{SiteConfig.collective_noun}")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -10,19 +10,6 @@ RSpec.describe ApplicationHelper, type: :helper do
|
|||
end
|
||||
end
|
||||
|
||||
describe "#community_qualified_name" do
|
||||
it "equals to the full qualified community name" do
|
||||
allow(SiteConfig).to receive(:collective_noun_disabled).and_return(true)
|
||||
expected_name = SiteConfig.community_name.to_s
|
||||
expect(helper.community_qualified_name).to eq(expected_name)
|
||||
|
||||
allow(SiteConfig).to receive(:collective_noun).and_return("Flock")
|
||||
allow(SiteConfig).to receive(:collective_noun_disabled).and_return(false)
|
||||
expected_name = "#{SiteConfig.community_name} #{SiteConfig.collective_noun}"
|
||||
expect(helper.community_qualified_name).to eq(expected_name)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#beautified_url" do
|
||||
it "strips the protocol" do
|
||||
expect(helper.beautified_url("https://github.com")).to eq("github.com")
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ RSpec.describe DeviseMailer, type: :mailer do
|
|||
end
|
||||
|
||||
it "renders sender" do
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -284,7 +284,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -327,7 +327,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -355,7 +355,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -383,7 +383,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -411,7 +411,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -445,7 +445,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -475,7 +475,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
|
||||
it "renders proper sender" do
|
||||
expect(email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
expect(email["from"].value).to eq(expected_from)
|
||||
end
|
||||
|
||||
|
|
@ -509,7 +509,7 @@ RSpec.describe NotifyMailer, type: :mailer do
|
|||
end
|
||||
|
||||
it "renders proper sender" do
|
||||
expected_from = "#{SiteConfig.community_name} Community <#{SiteConfig.email_addresses[:default]}>"
|
||||
expected_from = "#{SiteConfig.community_name} <#{SiteConfig.email_addresses[:default]}>"
|
||||
|
||||
expect(moderator_email.from).to eq([SiteConfig.email_addresses[:default]])
|
||||
expect(moderator_email["from"].value).to eq(expected_from)
|
||||
|
|
|
|||
|
|
@ -193,13 +193,6 @@ RSpec.describe "/admin/config", type: :request do
|
|||
expect(SiteConfig.community_name).to eq(name_magoo)
|
||||
end
|
||||
|
||||
it "updates the collective_noun" do
|
||||
collective_noun = "Rhumba"
|
||||
post "/admin/config", params: { site_config: { collective_noun: collective_noun },
|
||||
confirmation: confirmation_message }
|
||||
expect(SiteConfig.collective_noun).to eq(collective_noun)
|
||||
end
|
||||
|
||||
it "updates the community_member_label" do
|
||||
name = "developer"
|
||||
post "/admin/config", params: { site_config: { community_member_label: name },
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ RSpec.describe "ArticlesShow", type: :request do
|
|||
"publisher" => {
|
||||
"@context" => "http://schema.org",
|
||||
"@type" => "Organization",
|
||||
"name" => "#{SiteConfig.community_name} #{SiteConfig.collective_noun}",
|
||||
"name" => SiteConfig.community_name.to_s,
|
||||
"logo" => {
|
||||
"@context" => "http://schema.org",
|
||||
"@type" => "ImageObject",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ RSpec.describe "ServiceWorker", type: :request do
|
|||
describe "GET /manifest.json" do
|
||||
it "renders file with proper text" do
|
||||
get "/manifest.json"
|
||||
expect(response.body).to include("\"name\": \"#{SiteConfig.community_name} #{SiteConfig.collective_noun}\"")
|
||||
expect(response.body).to include("\"name\": \"#{SiteConfig.community_name}\"")
|
||||
end
|
||||
|
||||
it "renders json file" do
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ RSpec.describe "StoriesShow", type: :request do
|
|||
sign_in user
|
||||
get article.path
|
||||
|
||||
title = "<title>#{CGI.escapeHTML(article.title)} - #{community_qualified_name} #{community_emoji}</title>"
|
||||
title = "<title>#{CGI.escapeHTML(article.title)} - #{community_name} #{community_emoji}</title>"
|
||||
expect(response.body).to include(title)
|
||||
end
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ RSpec.describe "StoriesShow", type: :request do
|
|||
article.update_column(:search_optimized_title_preamble, "Hey this is a test")
|
||||
get article.path
|
||||
|
||||
title = "<title>#{CGI.escapeHTML(article.title)} - #{community_qualified_name} #{community_emoji}</title>"
|
||||
title = "<title>#{CGI.escapeHTML(article.title)} - #{community_name} #{community_emoji}</title>"
|
||||
expect(response.body).to include(title)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ RSpec.describe "Admin creates new page", type: :system do
|
|||
expect(find_field("page[slug]").value).to eq("code-of-conduct")
|
||||
expect(find_field("page[is_top_level_path]").value).to eq("1")
|
||||
|
||||
text = "All participants of the #{community_qualified_name} are expected to abide by our Code of Conduct"
|
||||
text = "All participants of #{community_name} are expected to abide by our Code of Conduct"
|
||||
expect(find_field("page[body_html]").value).to include(text)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -57,17 +57,17 @@ RSpec.describe "User visits a homepage", type: :system do
|
|||
before { visit "/" }
|
||||
|
||||
it "contains the qualified community name in og:title" do
|
||||
selector = "meta[property='og:title'][content='#{community_qualified_name}']"
|
||||
selector = "meta[property='og:title'][content='#{community_name}']"
|
||||
expect(page).to have_selector(selector, visible: :hidden)
|
||||
end
|
||||
|
||||
it "contains the qualified community name in og:site_name" do
|
||||
selector = "meta[property='og:site_name'][content='#{community_qualified_name}']"
|
||||
selector = "meta[property='og:site_name'][content='#{community_name}']"
|
||||
expect(page).to have_selector(selector, visible: :hidden)
|
||||
end
|
||||
|
||||
it "contains the qualified community name in twitter:title" do
|
||||
selector = "meta[name='twitter:title'][content='#{community_qualified_name}']"
|
||||
selector = "meta[name='twitter:title'][content='#{community_name}']"
|
||||
expect(page).to have_selector(selector, visible: :hidden)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ RSpec.describe "User visits a homepage", type: :system do
|
|||
describe "link tags" do
|
||||
it "contains the qualified community name in the search link" do
|
||||
visit "/"
|
||||
selector = "link[rel='search'][title='#{community_qualified_name}']"
|
||||
selector = "link[rel='search'][title='#{community_name}']"
|
||||
expect(page).to have_selector(selector, visible: :hidden)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ RSpec.describe "User visits the videos page", type: :system do
|
|||
|
||||
describe "meta tags" do
|
||||
it "contains the qualified community name in og:site_name", js: true do
|
||||
selector = "meta[property='og:site_name'][content='#{community_qualified_name}']"
|
||||
selector = "meta[property='og:site_name'][content='#{community_name}']"
|
||||
|
||||
expect(page).to have_selector(selector, visible: :hidden)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue