What is the design of the website of document type?

problem description

There are many websites of

document type. At present, vue-cli converts markdown files directly into pages through webpack plug-ins. There is a problem that each markdown file must be registered for routing, resulting in a huge route

.

I want to know how to design the whole website, or have good examples for reference.


vuepress
https://vuepress.vuejs.org/zh/


you can scan the folder where md is stored and automatically generate router .


but the front-end runtime does not have the ability to scan folders, and all I can think of is to do an automatic generation before release and package the router hard code into the final front-end code. Every new article should be published by generate first. In fact, this is the way of traditional static website generators such as jekyll, hugo, hexo, where the route code is packaged into html. Of course, vuepress, nuxt, and gatsby just put the hard code of the route into js.

I hope that every time a new article is published, you only need to upload the md file directly to achieve automatic update. After thinking about it, it seems impossible for gitbook to change at least two places: routing configuration file and uploading md file.


A VuePress website is a single-page application driven by Vue, Vue Router and webpack.

Menu