You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any workaround for adding external links in the pages menu generated by mkdocs? I've got a Scala project that is using mkdocs and have some externally-hosted Scaladoc content that I'd love to be able to reference in the menu itself.
My current workaround is to create pages for the documentation with metadata and Javascript to redirect to the documentation.
Reacted by Philip Tellis, sortedletter, Ben Elgar, kbhutiya and Aleksander Baranowski
Actually, the proper way to do this would be with a custom theme. You could insert the external links directly in the template. I suppose, with some work on #607 this could be even easier.
Outside of that, the only way to support such a feature would be by creating a new setting, which we do not want to do (we would prefer to have less settings, not more). Perhaps a Plugin could address this if/when that becomes available (see #206).
In either case, I see no reason to open this issue. There is nothing for us to do outside of those other issues.
@gsouf unfortunately, I don't have a good answer for that question. Neither @d0ugal or myself have a big block of time to spend reviewing the Plugin API and we don't want to only create a half-built system (which might not work when the other half gets implemented later). I realize that we have punted quite a large number of feature requests to the Plugin API and we should probably focus our attention there, but without the time (we work on this in our spare time), I can't give any indication of when things will move forward on that front.
Activity
d0ugal commentedon Dec 23, 2015
You could add custom JavaScript and have that add the links you want. http://www.mkdocs.org/user-guide/configuration/#extra_javascript
Otherwise, what you have done works. There isn't anything in MkDocs that supports this.
gsouf commentedon Apr 5, 2016
Adding javascript to redirect is an ugly workarround, and that needs to set a page that will live here for nothing.
Could you consider reopening the issue?
waylan commentedon Apr 5, 2016
Actually, the proper way to do this would be with a custom theme. You could insert the external links directly in the template. I suppose, with some work on #607 this could be even easier.
Outside of that, the only way to support such a feature would be by creating a new setting, which we do not want to do (we would prefer to have less settings, not more). Perhaps a Plugin could address this if/when that becomes available (see #206).
In either case, I see no reason to open this issue. There is nothing for us to do outside of those other issues.
gsouf commentedon Apr 5, 2016
@waylan thanks, about the plugin API, is there any contribution than can be done to help to speed up its development?
waylan commentedon Apr 5, 2016
@gsouf unfortunately, I don't have a good answer for that question. Neither @d0ugal or myself have a big block of time to spend reviewing the Plugin API and we don't want to only create a half-built system (which might not work when the other half gets implemented later). I realize that we have punted quite a large number of feature requests to the Plugin API and we should probably focus our attention there, but without the time (we work on this in our spare time), I can't give any indication of when things will move forward on that front.