Open Closed

Documentation-bug #9366


User avatar
0
DowletCsharp created

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)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    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.

  • User Avatar
    0
    DowletCsharp created

    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!

  • User Avatar
    0
    DowletCsharp created

    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.

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    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.


    Similar issue: https://abp.io/support/questions/9278/Docs-Module-not-working-with-the-FileSystem-document-source#answer-3a19db6b-af40-1362-3269-1a3ec5ba8543

  • User Avatar
    0
    DowletCsharp created

    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#L28

            public virtual async Task<IActionResult> OnGetAsync()
            {
                DocumentsUrlPrefix = _uiOptions.RoutePrefix;      // Add this line   
    
                if (_uiOptions.SingleProjectMode.Enable)
                {
                    return Redirect($"/Documents/Project/Index?version={DocsAppConsts.Latest}");
                }
                
                ...
            }
    
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    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

  • User Avatar
    0
    DowletCsharp created

    Thank you!

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Since docs module is an open-source module, the issue can be tracked from here: https://github.com/abpframework/abp/issues/23012

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on June 13, 2025, 11:37