简体   繁体   中英

Creating Templates with HTML CSS and JS

I have to use static hosting to create a website, how can avoid duplicating code without processors like blade or php.

I'm trying to use Firebase but I can't think of anyway to do this, I would normally use blade.

The only way I can thing of is using Dreamweaver templates but I really don't want to regress to that.

The way to go on this is to use a STATIC SITE GENERATOR, that will allow you to use partials(includes in PHP) there are a lot to choose from but a good recommendation is to use middleman here is the link to MiddleMan partials docs. good luck.

I use Yeoman with Yeogurt which uses Jade by default for templating but can use Nunchucks. You can use LESS or SASS/SCSS. Really good if you want to create a nice tidy static site. It takes JSON fixtures too so you can even create data for the site and compile it all down into static html, minified css and js, and compressed images.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM