Hello! I have a problem with navigation in the documentation. I created an md file with documentation and added navigation for it to the navigation json file. But when I want to go to the documentation of my module! an empty page opens:
Documents disappears in the navigation and just management is written. But if I manually add Documents to the navigation, this page opens:
Thanks in advance!
8 Answer(s)
-
0
Hi, by default, when you create a document project, you need to pass the project name, the document name, and also the version. For example, https://abp.io/docs/latest/modules/docs#single-project-mode is the structure of our documentation. (
docs
-> single project name,latest
-> is the version,docs
-> this is document docs.md)In your case, you should pass the version, and also pass the project name. If you need the single project mode, like we use in our documentation site, you can follow: https://abp.io/docs/latest/modules/docs#single-project-mode
Regards.
-
0
Hi, our project is multi project. My problem is only with navigation. The root path of Documents module is: host/documents. When I go to the Management documentation the navigation should be: host/documents/en/management/index, but when I click to the Management, navigation is: host/management. When I manually type host/documents/en/management/index Management documentation is opens. Thank you!
-
0
I looked at the Docs code of the module https://github.com/abpframework/abp/blob/dev/modules/docs/src/Volo.Docs.Web/Pages/Documents/Index.cshtml.cs
There in DocumentsUrlPrefix { get; set; } the value is not set anywhere. -
0
There was a bug occurred when used documentation with FileSystem related to version. And also there is a merged PR about it: https://github.com/abpframework/abp/pull/22891
That might solve your case, too. You can apply changes of this PR in your application until this PR is shipped in the next release.
-
0
I have looked at that PR, and don't think that will fix the Navigation issue.
As you can see here: https://github.com/abpframework/abp/blob/6ad1b86220d39fd0159e5840985098cb1301fa73/modules/docs/src/Volo.Docs.Web/Pages/Documents/Index.cshtml#L34<h1>@L["Projects"]</h1> <p> <ul style="list-style-type: upper-roman;"> @foreach (var project in Model.Projects) { <li> <h3> <a href="@(Model.DocumentsUrlPrefix + project.ShortName)"> @project.Name </a> </h3> </li> } </ul> </p>
Projects should naviagte to
/Documents/Project
but actually it navigates to/Project
The issue is with
Model.DocumentsUrlPrefix
, as it is not being set
Adding following line in this file should fix the problem: https://github.com/abpframework/abp/blob/6ad1b86220d39fd0159e5840985098cb1301fa73/modules/docs/src/Volo.Docs.Web/Pages/Documents/Index.cshtml.cs#L28public virtual async Task<IActionResult> OnGetAsync() { DocumentsUrlPrefix = _uiOptions.RoutePrefix; // Add this line if (_uiOptions.SingleProjectMode.Enable) { return Redirect($"/Documents/Project/Index?version={DocsAppConsts.Latest}"); } ... }
-
0
It seems there is bug in the module, thanks for the reporting it. I'll deliver this issue to the team so they'll fix it
-
0
Thank you!
-
0
Since docs module is an open-source module, the issue can be tracked from here: https://github.com/abpframework/abp/issues/23012