I set nav Home is "http://mysite.com/", I have enable feature tab then tab Home not appear.
How can I add a tab Home to the menubar?
theme:
name: 'material'
feature:
tabs: true
nav:
- Home: "http://mysite.com/"
- Javascript:
- Intro: javascript/index.md
I'm not sure MkDocs is supposed to work with an external page as the first item of a nav.
See https://www.mkdocs.org/user-guide/writing-your-docs/#index-pages, https://www.mkdocs.org/user-guide/configuration/#documentation-layout, and https://www.mkdocs.org/user-guide/writing-your-docs/#configure-pages-and-navigation
Also, see the site_url property.
If disable feature tab, nav Home with custom link working done in nav.
External links won't show up in the tab section - only sections with nested pages. You can, however, extend tab.html and insert your link within the template.
Can you intergrate this feature?My external link is site_url with another subfolder.
I am creating a document page with a lot of content categories.
And because material does not support searching for content under the current tab, I created each separate mkdocs page located in different subfolders of the domain and linked them in the feature tab.
Example:
mysite.com/javascript
mysite.com/html
mysite.com/php
I'm afraid no, it's not possible with MkDocs. You can override the theme as already stated.
Closing this as answered. It's not supported by MkDocs but can easily be solved via theme extension.
I have resolved with nested based on your suggestion
theme:
name: 'material'
feature:
tabs: true
nav:
- Home:
- Intro: "http://mysite.com/"
- Javascript:
- Intro: javascript/index.md
Also, if this helps, you can open the link in new tab by using the following construct:
theme:
name: 'material'
feature:
tabs: true
nav:
- Home:
- Intro: http://mysite.com/" target="_blank
- Javascript:
- Intro: javascript/index.md
Note: There are missing quotes in the external link value. It works like SQL injection where we inject this in anchor tag.
Most helpful comment
Also, if this helps, you can open the link in new tab by using the following construct:
Note: There are missing quotes in the external link value. It works like SQL injection where we inject this in anchor tag.