[deploy] Configure the community_member_label (rails console update required) (#7564)

* feat: add base site config

* chore: rename developer/developers

* feat: update to use community_member_label

* chore: amend text

* chore: update spec

* chore: extra space
This commit is contained in:
Ridhwana 2020-04-28 16:56:29 +02:00 committed by GitHub
parent ee373fa6c0
commit a9b2508664
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 50 additions and 18 deletions

View file

@ -32,7 +32,9 @@ class Internal::ConfigsController < Internal::ApplicationController
campaign_sidebar_enabled
campaign_sidebar_image
community_description
community_member_description tagline
community_member_description
community_member_label
tagline
favicon_url
ga_view_id ga_fetch_rate
logo_png

View file

@ -177,6 +177,10 @@ module ApplicationHelper
mail_to email, text || email, additional_info
end
def community_members_label
SiteConfig.community_member_label.pluralize
end
# Creates an app internal URL
#
# @note Uses protocol and domain specified in the environment, ensure they are set.

View file

@ -14,6 +14,7 @@ class SiteConfig < RailsSettings::Base
# Community Content
field :community_description, type: :string, default: "A constructive and inclusive social network. Open source and radically transparent."
field :community_member_description, type: :string, default: "amazing humans who code."
field :community_member_label, type: :string, default: "user"
field :tagline, type: :string, default: "We're a place where coders share, stay up-to-date and grow their careers."
field :mascot_user_id, type: :integer, default: 1

View file

@ -11,7 +11,7 @@
<h3 class="manage-page-success"><%= flash[:pins_success] %></h3>
<% end %>
<h2>Tools:</h2>
<p><strong>Suggest a Tweet:</strong> Help get your post in front of more developers by suggesting a tweet that <a href="https://twitter.com/<%= SiteConfig.social_media_handles["twitter"] %>">@<%= SiteConfig.social_media_handles["twitter"] %></a> editors can use.
<p><strong>Suggest a Tweet:</strong> Help get your post in front of more <%= community_members_label %> by suggesting a tweet that <a href="https://twitter.com/<%= SiteConfig.social_media_handles["twitter"] %>">@<%= SiteConfig.social_media_handles["twitter"] %></a> editors can use.
<p><strong>Experience Level of Post:</strong> The best target dev experience level— a <em>gentle</em> indicator to help show the post to the people who will benefit the most.
<h2>Tips:</h2>
<ol>

View file

@ -18,8 +18,8 @@
<section class="header-card card">
<h1 class="pro-header">Pro Dashboard for <%= @user_or_org.name %></h1>
<p>Welcome to the Pro Dashboard, the home of in-depth user metrics so that authors can make data-driven decisions about the developer ecosystem.</p>
<p>This dashboard highlights deep insights especially relevant to developer relations, authors, and serious bloggers.</p>
<p>Welcome to the Pro Dashboard, the home of in-depth user metrics so that authors can make data-driven decisions about the <%= SiteConfig.community_member_label %> ecosystem.</p>
<p>This dashboard highlights deep insights especially relevant to <%= SiteConfig.community_member_label %> relations, authors, and serious bloggers.</p>
</section>
<%= render "shared/stats" %>

View file

@ -50,6 +50,15 @@
<div class="alert alert-info">Used in pre-login banners.</div>
</div>
<div class="form-group">
<%= f.label :community_member_label, "Community member name" %>
<%= f.text_field :community_member_label,
class: "form-control",
value: SiteConfig.community_member_label,
placeholder: "" %>
<div class="alert alert-info">Used to determine what a member will be called e.g developer, hobbyist etc.</div>
</div>
<div class="form-group">
<%= f.label :tagline, "Tagline" %>
<%= f.text_field :tagline,

View file

@ -14,7 +14,7 @@
<div>
👋 <b>Looking for work?</b> <a href="<%= app_url("/listings/jobs") %>">Browse job openings</a> or create an <a href="<%= app_url("/listings/forhire") %>">available for hire</a> listing.
<br />
🔍 <b>Hiring developers?</b> Post your position(s) on <a href="<%= app_url(page_post_a_job_url) %>"><%= community_name %> Listings</a>.
🔍 <b>Hiring <%= community_members_label %>?</b> Post your position(s) on <a href="<%= app_url(page_post_a_job_url) %>"><%= community_name %> Listings</a>.
</div>
<center style="margin-top:50px;">
@ -29,7 +29,7 @@
You can change it any time in the future. Happy coding!
<% elsif @user.follows.size == 0 %>
<b>
<%= community_name %> Digest is a new periodic email featuring the best posts from our community of developers.
<%= community_name %> Digest is a new periodic email featuring the best posts from our community of <%= community_members_label %>.
</b>
<br /><br />
Your digest is not yet customized. Follow the people and technologies on

View file

@ -1,34 +1,34 @@
<h1>Gold Sponsorship</h1>
<p>
🏆 The Gold Standard. This is our highest level of community sponsorship, and we work with just three Gold partners each month. Here are more details about our most substantial sponsorship package:
🏆 The Gold Standard. This is our highest level of community sponsorship, and we work with just three Gold partners each month. Here are more details about our most substantial sponsorship package:
</p>
<h3>
👀 Dedicated homepage logo + tagline placement
</h3>
<p>
Your company will receive prominent logo and tagline placement directly on the <%= community_name %> homepage, where it will be seen by hundreds of thousands of unique visitors each month. This is the most prime real estate on the platform, dedicated just for our Gold sponsors.
Your company will receive prominent logo and tagline placement directly on the <%= community_name %> homepage, where it will be seen by hundreds of thousands of unique visitors each month. This is the most prime real estate on the platform, dedicated just for our Gold sponsors.
</p>
<h3>
🙌 Inclusion in our weekly newsletter, and the option to add a boosted article to every newsletter
</h3>
<p>
Each week, we send a newsletter to ~150k subscribed developers, seeing ~30% open rates for each issue. Your logo and a short blurb will be featured at the bottom of each email.
Each week, we send a newsletter to ~150k subscribed <%= community_members_label %>, seeing ~30% open rates for each issue. Your logo and a short blurb will be featured at the bottom of each email.
</p>
<p>
As a Gold sponsor, you will have an exclusive opportunity to include one boosted article in each weekly newsletter. This is an incredible channel to promote your work to a highly-targeted audience of passionate developers.
As a Gold sponsor, you will have an exclusive opportunity to include one boosted article in each weekly newsletter. This is an incredible channel to promote your work to a highly-targeted audience of passionate <%= community_members_label %>.
</p>
<h3>
👋 Top real estate on the dedicated sponsorships page, including a full write-up
</h3>
<p>
The dedicated sponsorship page lists all the organizations that support the community. You will receive top placement, featuring not just your logo, but a full write-up that highlights your company and emphasizes the most important aspects of your companys message. It will stand tall amongst all other sponsors on the page.
The dedicated sponsorship page lists all the organizations that support the community. You will receive top placement, featuring not just your logo, but a full write-up that highlights your company and emphasizes the most important aspects of your companys message. It will stand tall amongst all other sponsors on the page.
</p>
<h3>
💪 Prominent placement in our monthly sponsor-awareness thread
</h3>
<p>
Each month, we publish an awareness and recognition thread where we highlight the organizations that support the community. You will receive the most prominent placement, including a full write-up about your product or service. This thread will serve to drive major awareness, engagement, and positive association to your company.
Each month, we publish an awareness and recognition thread where we highlight the organizations that support the community. You will receive the most prominent placement, including a full write-up about your product or service. This thread will serve to drive major awareness, engagement, and positive association to your company.
</p>
<p>
It will also include a call-to-action to follow your organization directly in the post.
@ -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_name %> Community and broader ecosystem that you are an important community supporter, providing a natural draw for increased engagement on the platform. And, of course, youll have bragging rights and company pride knowing that youre supporting a wonderful community.
As a Gold sponsor, you will receive special flair that lives on your organization page. This visual cue will show the <%= community_name %> Community and broader ecosystem that you are an important community supporter, providing a natural draw for increased engagement on the platform. And, of course, youll have bragging rights and company pride knowing that youre supporting a wonderful community.
</p>
<% unless user_signed_in? %>
<h2>Email <%= email_link(:business) %> for pricing information</h2>

View file

@ -10,11 +10,11 @@
<h1>Partner With <img src="<%= asset_path "rainbowdev.svg" %>" /> </h1>
<h3>🚀 Reach</h3>
<p>
<%= community_name %> serves millions of unique visitors per month. This highly-targeted developer audience is comprised of registered members (<%= number_with_delimiter(User.estimated_count) %>) and visitors from the open web — many of whom visit <%= community_name %> as part of their daily routine. You may be interested in the <a href="https://www.similarweb.com/website/dev.to">public analytics available on SimilarWeb</a>.
<%= community_name %> serves millions of unique visitors per month. This highly-targeted <%= SiteConfig.community_member_label %> audience is comprised of registered members (<%= number_with_delimiter(User.estimated_count) %>) and visitors from the open web — many of whom visit <%= community_name %> as part of their daily routine. You may be interested in the <a href="https://www.similarweb.com/website/dev.to">public analytics available on SimilarWeb</a>.
</p>
<h3>❤️ Community</h3>
<p>
<%= community_name %> is committed to maintaining an inclusive and constructive environment, and welcomes developers of all backgrounds and experience levels. We work with a large group of community moderators who help us uphold and enforce our <a href="https://dev.to/code-of-conduct">Code of Conduct</a>.
<%= community_name %> is committed to maintaining an inclusive and constructive environment, and welcomes <%= community_members_label %> of all backgrounds and experience levels. We work with a large group of community moderators who help us uphold and enforce our <a href="https://dev.to/code-of-conduct">Code of Conduct</a>.
</p>
<h3>💎 Quality</h3>
<p>

View file

@ -25,7 +25,7 @@
<% title "Podcasts" %>
<%= content_for :page_meta do %>
<link rel="canonical" href="<%= app_url(pod_path) %>" />
<meta name="description" content="Discover technical podcasts for developers">
<meta name="description" content="Discover technical podcasts for <%= community_members_label %>">
<meta name="keywords" content="software development,engineering,rails,javascript,ruby">
<meta property="og:type" content="article" />
@ -33,14 +33,14 @@
<meta property="og:title" content="Podcasts on <%= community_qualified_name %>" />
<meta property="og:image" content="http://i.imgur.com/e5tJ9L9.png">
<meta property="og:description" content="Discover technical podcasts for developers" />
<meta property="og:description" content="Discover technical podcasts for <%= community_members_label %>" />
<meta property="og:site_name" content="<%= community_qualified_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:description" content="Discover technical podcasts for developers" />
<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 %>
<% end %>

View file

@ -147,4 +147,14 @@ RSpec.describe ApplicationHelper, type: :helper do
expect(email_link(text: "text", additional_info: additional_info)).to eq("<a href=\"mailto:hi@dev.to?body=This%20is%20a%20longer%20body%20with%20a%20question%20mark%20%3F%20%0A%20and%20a%20newline&amp;subject=This%20is%20a%20long%20subject\">text</a>")
end
end
describe "#community_members_label" do
before do
allow(SiteConfig).to receive(:community_member_label).and_return("hobbyist")
end
it "returns the pluralized community_member_label" do
expect(community_members_label).to eq("hobbyists")
end
end
end

View file

@ -52,6 +52,12 @@ RSpec.describe "/internal/config", type: :request do
expect(SiteConfig.community_member_description).to eq(description)
end
it "updates the community_member_label" do
name = "developer"
post "/internal/config", params: { site_config: { community_member_label: name }, confirmation: confirmation_message }
expect(SiteConfig.community_member_label).to eq(name)
end
it "updates the tagline" do
description = "Hey hey #{rand(100)}"
post "/internal/config", params: { site_config: { tagline: description }, confirmation: confirmation_message }