Base solution for your next web application
Open Closed

Docs Module Integration #9158


User avatar
0
BigCDogCrew created

Now that I have completed the first release version of my AspNetZero project, I want to go back and put all of my user guides into an online website. I have looked at the Abp Docs Module and I believe it will serve my need very well, but I am a little bit fuzzy on how to integrate the Docs module with AspNetZero.

Here are may goals:

  1. add a Docs module to my AspNetZero project
  2. my project consists of mutliple products which are identified by name (a product), version (software release version) , and edition (abp edition).
  3. user login accounts on the main product must drive that user's access to appropriate documentation.
  4. I use Mercurial for revision control and would prefer not to have to move to GIT.

My questions:

  1. Is there a guide somewhere that explains how to add the Docs module to an AspNetZero project?
  2. Looking at Abp Docs Module,
    1. Step 1 - Download
      1. it seemed like maybe this step has already been satisfied by using the AspNetZero project; that this step 1 should be skipped.
    2. Step 2 - Referencing Docs Module Packages
      1. The choice to manually install the nuget packages felt like the most likely path to success. However, the AspNetZero project does not contain a project that I could identify as equivalent to "Acme.MyProject.Domain". The others (EntityFrameworkCore, Application, and Web) are all obvious...but the Domain appears to be missing. Do I need to add it? And what is the best way to do that to assure the projects are properly linked?
    3. Step 3 - Adding Module Dependencies
      1. Adding the DependsOn statements seems pretty straightforward. However, none of the AspNetZero module extension classes match the example "MyProject...." classes in the Abp Docs examples. Some clarification might be helpful.
    4. Step 4 - Database Integration
      1. Again, this seems fairly straight forward, but the Abp examples differ slightly from the AspNetZero code. Clarification would be helpful.
      2. In the Abp example code, it seemslike the addition of "builder.ConfigureDocs();" is the only required additional code....and I assume that can be added just after the "base.OnModelCreating(modelBuilder);" that appears in theOnModelCreating function of the AspNetZero ProjectNameDbContext class.
      3. adding of the migration and updating the database are straight forward and are expected to work as described.
    5. Step 5 - Linking Docs Module
      1. The "ConfigureMainMenuAsync" function does not exist in the AspNetZero project.
      2. It appears as though perhaps the new menu item should be added in the SetNavigation function of AppNavigationProvider.cs
        1. after the code shown below in Code Sample 1, add something like the code shown below in Code Sample 2.
    6. Step 6 - Adding New Docs Project
      1. No questions about this particular step.
    7. Step 7 - Creating a New Document
      1. No questions about this particular step.
    8. Step 8 - Creating the Navigation Document
      1. No questions about this particular step.
  3. What is the mechanism for integrating user-authentication to assure that some documents are only visible to users who have sufficient feature/permission credentials?

Code Sample 1

public override void SetNavigation(INavigationProviderContext context)
        {
            var menu = context.Manager.Menus[MenuName] = new MenuDefinition(MenuName, new FixedLocalizableString("Main Menu"));

Code Sample 2

                menu.AddItem(new MenuItemDefinition(
                        AppPageNames.Host.Documents,
                        L("Documents"),
                        url: "Documents",
                        icon: "flaticon-more",
                        permissionDependency: new SimplePermissionDependency(AppPermissions.Pages_Administration_Host_Documents)
                    )
                );

2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi

    Zero uses the aspnetboilerplate framework, and the docs module uses abpframework.

    Although they are very similar and developed by a team, they cannot be used together.

    This is similar to angular.js and angular.

    You can use the docs module in a separate project, such as the VoloDocs.Web project in the module.

  • User Avatar
    0
    BigCDogCrew created

    Ugh. Not the answer I was hoping for. I'll use a separate project as you suggest. Thank you for the clarification.