-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Convert external links to other enabled docs to internal links #714
Conversation
0f6cef2
to
1385eba
Compare
1385eba
to
344dbf6
Compare
Entry.new(name, path, type) | ||
if frag.present? && frag.include?('#') | ||
path = frag | ||
# TODO: What should `url` get changed to? |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This is a great PR, but I'm worried about the performance penalty + the fact that this significantly increases the size of the |
Using a compressed trie would probably decrease download size, but I’m not sure what effect it would have on client-side performance. |
The code looks good, but I am with Thibaut on this one. After some testing, it seems like the
I also ran some benchmarks. I'm not sure if my benchmarking method is somewhat good, but here's how I tested it:
This gave the following results:
Performance seems quite badly impacted, and I think it'll only be worse when the user has more documentations enabled. Furthermore, I don't know if it is working correctly on
Not exactly sure whether localhost links should be added or not. Overall it's a cool feature, but I don't think the performance impact and the increase in |
Closing this for now. |
Fixes #234 and might fix the issues with the internal PHP doc links.
How it works:
entry
inindex.json
gets aurl
key linking to the page where the doc was originally scraped from.app.Urls
instance in the frontend is passed eachDoc
.app.urls.get
, which returns the internal URL for the external URL, if one is available