Giter VIP home page Giter VIP logo

Comments (4)

BenceSzalai avatar BenceSzalai commented on May 17, 2024 1

All you need to do is modify webpack.plugins.js to instead of using path.basename(dir) which throws away the directory path, extract the html "filename" from dir including the relative path compared to src. Something like:

const filename = path.relative(config.paths.src, dir);

Actually this could be updated in the repo, as it would be more versatile.

Together with changing line 58 as:

const generateHTMLPlugins = () => glob.sync(`./${config.paths.src}/**/*.html`).map((dir) => {

which would allow the src path to be properly modified here, but that is not directly related to this issue, just saying, as once config.paths.src is being used to generate the relative filenames it'd be preferable to use that to gather the files as well instead of hardcoded src as of now.

from static-site-boilerplate.

CharnjeetIotasol avatar CharnjeetIotasol commented on May 17, 2024

Have you found any way to load style and script on subfolder.

from static-site-boilerplate.

kesavanv avatar kesavanv commented on May 17, 2024

You will be able to organize HTML files in folders, by adding the below code

filename = dir.substring(6);
in https://github.com/ericalli/static-site-boilerplate/blob/master/config/webpack.plugins.js#L60

Can be done better, if we alter the actual code.

from static-site-boilerplate.

redordev avatar redordev commented on May 17, 2024

Would be great if we could have different directories and root level pages e.g.

contact.html
index.html
insights.html
service.html
team.html
blog/story1.html
blog/story2.html
insights/insight1.html
insights/insight2.html
services/service1.html
services/service2.html
team/member1.html
team/member2.html

Any idea how to change the script to do this?

from static-site-boilerplate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.