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

Enhance docs section linking #10779

Merged
merged 3 commits into from
Oct 5, 2021

Conversation

saveman71
Copy link
Contributor

@saveman71 saveman71 commented Sep 24, 2021

Using marked's built-in slugify function ensures the links would not be broken.

Manual links are still supported, e.g.

   <h3 id="order"><a href="#order">Save/Validate Hooks</a></h3>

However note that this syntax doesn't work (didn't work previously either)

   ### [Save/Validate Hooks](#order)

Also makes the CSS better:

  • You can hover any part of the link + the "hidden" side where the icon appears
  • Handles h4, h1 and FAQ

Removes as much as possible "manual" links, but some remain (mostly HTML ones I believe, didn't want to check each one that it wouldn't break a link)

@saveman71
Copy link
Contributor Author

Would this fix #10652 @IslandRhythms ?

@IslandRhythms
Copy link
Collaborator

Request review from Valeri. The sub section linking has a PR that fixes it. I don't know if he merged it already.

@saveman71
Copy link
Contributor Author

Ah, I tried to look if anything was started and could not find it can you link it ? Also I cannot request a review myself, can you do it please?

@IslandRhythms
Copy link
Collaborator

#10748

@saveman71
Copy link
Contributor Author

saveman71 commented Sep 24, 2021

Ah! Well sorry I have undone a bit what you did haha, I wondered why I could not reproduce the issue. At first I just wanted to extend the "link icon" range's hover but got carried away.

…ctions

Followed by a commit which will remove as much as possible "manual" links.
Using marked's built-in slugify function ensures the links would not be
broken.

Manual links are still supported, e.g.
<h3 id="order"><a href="#order">Save/Validate Hooks</a></h3>

However note that this syntax doesn't work (didn't work previously either)
 ### [Save/Validate Hooks](#order)

Also makes the CSS better:
* You can hover any part of the link + the "hidden" side where the icon appears
* Handles h4
@saveman71
Copy link
Contributor Author

Rebased and fixed merge conflict

Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

Great work, thanks 👍 Sorry for the delay in merging this

@vkarpov15 vkarpov15 added this to the 6.0.10 milestone Oct 5, 2021
@vkarpov15 vkarpov15 added the docs This issue is due to a mistake or omission in the mongoosejs.com documentation label Oct 5, 2021
@vkarpov15 vkarpov15 merged commit 18b186f into Automattic:master Oct 5, 2021
@saveman71 saveman71 deleted the fix-doc-section-linking branch October 6, 2021 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants