I'm creating a static site built with HTML and Javascript. I'd like to maintain a reusable html structure for the site for a subset of the pages. Similar to how Yelp organizes their file structure. For example, the user can search for different auto shops in their area. The paths will look like this:
yelp.com/biz/auto-shop-san-francisco-1
yelp.com/biz/auto-shop-san-francisco-2
Yelp's content changes but the overall structure remains the same. I'd like to implement a similar file structure hierarchy.
In order to replicate the structure I have designed something like this
--> index.html (Home page)
--> /auto-shop
--> /valvoline
--> index.js
--> index.html
--> /jiffy-lube
--> index.js
--> index.html
--> /midas
--> index.js
--> index.html
The problem is that each path /auto-shop/ will have their own custom html and javascript. How can I implement reusability so that I only have a single html to load many different auto shop pages?