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:
- add a Docs module to my AspNetZero project
- my project consists of mutliple products which are identified by name (a product), version (software release version) , and edition (abp edition).
- user login accounts on the main product must drive that user's access to appropriate documentation.
- I use Mercurial for revision control and would prefer not to have to move to GIT.
My questions:
- Is there a guide somewhere that explains how to add the Docs module to an AspNetZero project?
- Looking at Abp Docs Module,
- Step 1 - Download
- it seemed like maybe this step has already been satisfied by using the AspNetZero project; that this step 1 should be skipped.
- Step 2 - Referencing Docs Module Packages
- 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?
- Step 3 - Adding Module Dependencies
- 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.
- Step 4 - Database Integration
- Again, this seems fairly straight forward, but the Abp examples differ slightly from the AspNetZero code. Clarification would be helpful.
- 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.
- adding of the migration and updating the database are straight forward and are expected to work as described.
- Step 5 - Linking Docs Module
- The "ConfigureMainMenuAsync" function does not exist in the AspNetZero project.
- It appears as though perhaps the new menu item should be added in the SetNavigation function of AppNavigationProvider.cs
- after the code shown below in Code Sample 1, add something like the code shown below in Code Sample 2.
- Step 6 - Adding New Docs Project
- No questions about this particular step.
- Step 7 - Creating a New Document
- No questions about this particular step.
- Step 8 - Creating the Navigation Document
- No questions about this particular step.
- Step 1 - Download
- 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)
-
0
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.
-
0
Ugh. Not the answer I was hoping for. I'll use a separate project as you suggest. Thank you for the clarification.