Skip to content
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: the sidebar links to another site. #1336

Merged
merged 3 commits into from
Oct 15, 2020

Conversation

Koooooo-7
Copy link
Member

Summary
Fix #1069 , the sidebar should always direct to current site content.
SO, Removing the sidebar titles' <a> tag (if had) when the header with a link.
What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Repo settings
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
    fix "href" of sidebar headers #1069

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

@vercel
Copy link

vercel bot commented Aug 15, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/kn8xskqo0
✅ Preview: https://docsify-preview-git-fix-issue1069.docsify-core.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 15, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ccc343e:

Sandbox Source
docsify-template Configuration

src/core/render/compiler.js Outdated Show resolved Hide resolved
@sy-records
Copy link
Member

I think if the sidebar has an external link, you should click to jump.. Otherwise, why set the external link?

@Koooooo-7
Copy link
Member Author

I think if the sidebar has an external link, you should click to jump.. Otherwise, why set the external link?

it is not setting the sidebar into external link issue .

Currently, when u set the title ## [Demo Title](https://example.com) in markdown content, the sidebar doesn't direct to the title in content, it will go to the example.com directly.
it seems make no sense. Normally, the sidebar should directly to the title not external sites.

sy-records
sy-records previously approved these changes Aug 15, 2020
Copy link
Member

@sy-records sy-records left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Member

@trusktr trusktr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Can we add tests? (May want to rebase on the playwright PR, or just wait until it is merged soon)

@Koooooo-7
Copy link
Member Author

Looks good. Can we add tests? (May want to rebase on the playwright PR, or just wait until it is merged soon)

yup, waiting for the playwright PR merged.

@Koooooo-7
Copy link
Member Author

@trusktr I add a simple test at mocha, and we can also shift it with other test cases when the test set up in place.

@Koooooo-7
Copy link
Member Author

Koooooo-7 commented Sep 15, 2020

@wszydlak I have to say it is quite a long time to make it 😅 , there is something blocked about the tests rn, I mean the tests of all the projects, we r working on integrating new tests components to docsify now.
AFAIK, I would say we may hava a new version in next 2 weeks.

cc @anikethsaha I think we'd better setup the tests in place in this week. and any suggests about it?

anikethsaha
anikethsaha previously approved these changes Sep 15, 2020
@anikethsaha
Copy link
Member

I am +1 to do a patch release.
For testing change, anyway it will be a big one so we need some more time/space in order to review and land that.

Lets review some other PRs that has tests already implemented.

Copy link
Member Author

@Koooooo-7 Koooooo-7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// TODO: The test components changed now, if the test should adjust to new one?

@Koooooo-7
Copy link
Member Author

// TODO: The test components changed now, if the test should adjust to new one?

Add test.

Copy link
Member

@anikethsaha anikethsaha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@Koooooo-7 Koooooo-7 merged commit c9d4f7a into docsifyjs:develop Oct 15, 2020
trusktr added a commit that referenced this pull request Nov 2, 2020
* develop: (81 commits)
  fix: upgrade dompurify from 2.1.0 to 2.1.1 (#1402)
  fix: upgrade dompurify from 2.0.17 to 2.1.0 (#1397)
  fix: search on homepage test (#1398)
  fix: the sidebar links to another site. (#1336)
  fix: Can't search homepage content (#1391)
  fix: upgrade debug from 4.1.1 to 4.3.0 (#1390)
  fix: packages/docsify-server-renderer/package.json & packages/docsify-server-renderer/package-lock.json to reduce vulnerabilities (#1389)
  Fix eslint warnings (#1388)
  docs: add crossOriginLinks configurations details. (#1386)
  Remove Cypress screenshots
  Fix friendly message display
  Add Vue 3 compatibility
  Show dir listing & help msg for manual instance
  Add NODE_MODULES_URL global
  Jest + Playwright Testing (#1276)
  update doc (#1381)
  Fix scroll event end value
  fix: upgrade docsify from 4.11.4 to 4.11.6 (#1373)
  chore(deps): bump node-fetch in /packages/docsify-server-renderer (#1370)
  test: fix cannot search list content (#1367)
  ...
This was referenced Nov 11, 2020
@sy-records sy-records mentioned this pull request Feb 5, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken display URL's in headers "href" of sidebar headers
6 participants