I'm wondering how WonderCMS works
I wanna know how it read the database.js, find every available post, create a unique slug and make the post accessible through the slug.
How did WonderCMS read and create a slug for each post?
Re: How did WonderCMS read and create a slug for each post?
By default, WonderCMS includes a couple of pages like Home and Example.
1. Those pages are generated to database.js, once your WonderCMS website is first visited.
2. When you create a new page, for example via the menu
- we slugify the name and do a simple urlencode, and save the item to the database.js file.
3. All of the menu pages/slugs along with the content resides in database.js file.
4. If the page exists and your visitor requests that page, it will be served from the same database file.
1. Those pages are generated to database.js, once your WonderCMS website is first visited.
2. When you create a new page, for example via the menu
- we slugify the name and do a simple urlencode, and save the item to the database.js file.
3. All of the menu pages/slugs along with the content resides in database.js file.
4. If the page exists and your visitor requests that page, it will be served from the same database file.