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

md: enable custom anchor id/href for troubleshooting guide? #922

Closed
jorgeorpinel opened this issue Jan 15, 2020 · 6 comments · Fixed by #929
Closed

md: enable custom anchor id/href for troubleshooting guide? #922

jorgeorpinel opened this issue Jan 15, 2020 · 6 comments · Fixed by #929
Labels
p1-important Active priorities to deal within next sprints 🐛 type: bug Something isn't working. type: enhancement Something is not clear, small updates, improvement suggestions website: eng-doc DEPRECATED JS engine for /doc

Comments

@jorgeorpinel
Copy link
Contributor

https://dvc.org/doc/user-guide/troubleshooting will have hardcoded H2 elements so we can choose the id to be short enough for error.dvc.org/{title} redirects (turned into URL hashes into this one page).

It would be ideal if we could use markdown instead (react-markdown renders them with a nice anchor link), but we don't control the id and href values in there, which tend to a little long.

Implement a solution to this in our JS engine? Find a better workaround than hardcoded H2s?

@jorgeorpinel jorgeorpinel added type: enhancement Something is not clear, small updates, improvement suggestions user-guide website: eng-doc DEPRECATED JS engine for /doc labels Jan 15, 2020
@jorgeorpinel
Copy link
Contributor Author

Would this imply using a special markdown syntax like

## [Too many open files error](#many-files)

(and preventing the linking default)? If so, this seems probably too much to me. "Hardcoded" H2 elements is actually technically valid Markdown anyway. We just miss the nice anchor links – which could be hardcoded in as HTML/SVG as well, BTW.

@shcheklein shcheklein added the A: docs Area: user documentation (gatsby-theme-iterative) label Jan 15, 2020
@shcheklein
Copy link
Member

[Too many open files error](#many-files) this one already has certain meaning, so not sure this is the best idea. In general yes, it should something simple and similar to this and implementation to our expandable sections I imagine.

@shcheklein shcheklein added the p1-important Active priorities to deal within next sprints label Jan 15, 2020
@jorgeorpinel
Copy link
Contributor Author

[Too many open files error](#many-files) this one already has certain meaning

When you put it in a header ## actually it throws a react render error so I guess it's available.

Another idea, just:

## Probably long title #short-hash

@jorgeorpinel jorgeorpinel removed the A: docs Area: user documentation (gatsby-theme-iterative) label Jan 18, 2020
@jorgeorpinel jorgeorpinel changed the title web: enable custom anchor id/href for troubleshooting guide? md: enable custom anchor id/href for troubleshooting guide? Jan 18, 2020
@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Jan 20, 2020

Found a bug on this. See #929 (review):

image

https://dvc.org/doc/user-guide/troubleshooting

@jorgeorpinel jorgeorpinel reopened this Jan 20, 2020
@jorgeorpinel jorgeorpinel added the 🐛 type: bug Something isn't working. label Jan 20, 2020
@shcheklein
Copy link
Member

@jorgeorpinel What browser? I can't reproduce this for some reason on my Mac

@jorgeorpinel
Copy link
Contributor Author

Chrome on Mac but O_o this just went away after a force reload. Cache issue I guess, never mind! 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1-important Active priorities to deal within next sprints 🐛 type: bug Something isn't working. type: enhancement Something is not clear, small updates, improvement suggestions website: eng-doc DEPRECATED JS engine for /doc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants