New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow title separator to be customized #7672

Merged
merged 1 commit into from Nov 2, 2016

Conversation

Projects
None yet
3 participants
@rsiddle
Contributor

rsiddle commented Nov 2, 2016

Companies may wish to use other types of separators for their <title> tags for branding purposes. This pull request keeps the default '-', however it allows others to be chosen through an initializer.

Examples

<title>Ruby on Rails Jr. Spaghetti - Site Name</title>
<title>Ruby on Rails Jr. Spaghetti | Site Name</title>
<title>Ruby on Rails Jr. Spaghetti at Site Name</title>
<title>Ruby on Rails Jr. Spaghetti @ Site Name</title>

Example overriding

# spree.rb
Spree.config do |config|
  config.title_site_name_separator = '|'
end
@@ -29,6 +29,7 @@ class AppConfiguration < Preferences::Configuration
preference :alternative_shipping_phone, :boolean, default: false # Request extra phone for ship addr
preference :always_include_confirm_step, :boolean, default: false # Ensures confirmation step is always in checkout_progress bar, but does not force a confirm step if your payment methods do not support it.
preference :always_put_site_name_in_title, :boolean, default: true
preference :title_site_name_separator, :string, default: '-' # When always_put_site_name_in_title is true, insert a separator character before the site name in the title

This comment has been minimized.

@houndci-bot

houndci-bot Nov 2, 2016

Line is too long. [173/120]

@houndci-bot

houndci-bot Nov 2, 2016

Line is too long. [173/120]

@damianlegawiec

This comment has been minimized.

Show comment
Hide comment
@damianlegawiec
Member

damianlegawiec commented Nov 2, 2016

@rsiddle nice 👍

@damianlegawiec damianlegawiec merged commit caafbdb into spree:master Nov 2, 2016

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
hound 1 violation found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment