-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix #891 - Adding site-wide and locale-specific support for changing the logo link #1015
Open
dylburger
wants to merge
3
commits into
vuejs:master
Choose a base branch
from
dylburger:dylburger/adding-logo-link
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks, @dylburger ! |
ulivz
force-pushed
the
master
branch
3 times, most recently
from
December 18, 2018 18:27
6c3127f
to
71574f2
Compare
ulivz
force-pushed
the
master
branch
5 times, most recently
from
January 29, 2019 11:47
316e022
to
1284944
Compare
flozero
added
complexity: easy
Easy complexity
topic: config
Relates to VuePress config
topic: theme
Relates to VuePress theme
type: enhancement
Request to enhance an existing feature
labels
Sep 5, 2019
Hello @dylburger thank's for your pr i know it's been a while a create the pr. Sorry for that. Can you please resolve the conflict ? Thank's for your time ! |
luiyongsheng
approved these changes
Jan 11, 2020
9 tasks
Conflict here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
complexity: easy
Easy complexity
topic: config
Relates to VuePress config
topic: theme
Relates to VuePress theme
type: enhancement
Request to enhance an existing feature
version: 1.x
Relates to version 1 of VuePress
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for the feature requested in #891 : adding the option to change the link to which the user is directed when clicking the logo.
I ran across this issue on my own VuePress site: I'm keeping the default base URL (
/
), but have no content at/
, only at/terms
,/privacy
, etc. We actually host a completely different app at the root of our domain, and handle routing to that app using Cloudfront cache behaviors. Specifically,Since the
router-link
tied to the logo currently does client-side routing to/
, and since I have no content at/
, users get a404
. Since I'm handling routing at the Cloudfront-level, I need to direct users to the external URL pointing them to our app (in the example above,https://domain.com
).My use case was to change the
logoLink
on a site-wide level, so I've added support for including a URL at$site.themeConfig.logoLink
. In the absence of this property, the logo link falls back to the$localePath
(existing behavior).I also thought it would be nice to add locale-specific logo links, so I first check for the presence of
$themeLocaleConfig.logoLink
, then$site.themeConfig.logoLink
, then$localePath
.I've tested this manually but extensively. Since this is my first VuePress commit, I'm sure I'm missing something, so I'm definitely open to feedback.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
fix #xxx[,#xxx]
, where "xxx" is the issue number)You have tested in the following browsers: (Providing a detailed version will be better.)
All tests done on macOS 10.14
If adding a new feature, the PR's description includes:
I didn't see any existing tests for the relevant code, but I'm happy to add / update those tests if you'd like.