The route is customizable through the tagsBasePath option.The component is Tags list page: /tags.The routes are fully customizable through the slug front matter.The component is Post pages: /1/algolia-docsearch-migration, /2/announcing-docusaurus-two-beta.Posts list pages: /, /page/2, /page/3.The component used for Markdown pages is React pages are directly used as the route's component. Pages routing are straightforward: the file paths directly map to URLs, without any other way to customize. Next, let's look at how the three plugins structure their own "boxes of subroutes". For example, in Docs-only mode, we mentioned that configuring routeBasePath: '/' for docs means that all routes that the docs plugin create would not have the /docs prefix, yet it doesn't prevent you from having more subroutes like /blog created by other plugins. For example, when given a route /docs/configuration, Docusaurus first enters the /docs branch, and then searches among the subroutes created by the docs plugin.Ĭhanging routeBasePath can effectively alter your site's route structure. You can think about the route structure like this:Īny route will be matched against this nested route config until a good match is found. By default, the docs plugin puts its routes under /docs the blog plugin, /blog and the pages plugin, /. It defines where the plugins append their routes to. Routing in content plugins Įvery content plugin provides a routeBasePath option. In this section, we will begin by talking about routing within the three content plugins (docs, blog, and pages), and then go beyond to talk about the underlying routing system. Docusaurus' routing system follows single-page application conventions: one route, one component.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |