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

Deep link to headers in docs #610

Closed
longrunningprocess opened this issue Mar 15, 2022 · 3 comments
Closed

Deep link to headers in docs #610

longrunningprocess opened this issue Mar 15, 2022 · 3 comments

Comments

@longrunningprocess
Copy link

I think the docs would be better if there were id's on these headers for direct links to sections on the page?

image

I'd like to put something like this in my code where I need a reference:
https://daisyui.com/docs/colors/#color_names or whatever

@longrunningprocess
Copy link
Author

Thanks!

It's interesting the tool you used for those just uses numbers. I suppose it could be vulnerable to changing but maybe that's not a big deal, e.g., I might store a link to the color names using https://daisyui.com/docs/colors/#-2 and maybe someone adds a new heading above that... well that #-2 would no longer point to the color names.

@saadeghi
Copy link
Owner

saadeghi commented Mar 24, 2022

I'm using a markdown plugin (remark plugin) to automatically add IDs and links but since the actual string is in a component that does the translation, that plugin can't see the heading text and just adds numbers for having unique IDs. This was the fastest solution I could come up with. I might improve it later on.

@longrunningprocess
Copy link
Author

well, you did get that done REALLY fast, thanks again for all you do in this project!

inorganik pushed a commit to inorganik/daisyui that referenced this issue Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants