Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move assets to the folder as well #79

Open
ghost opened this issue Feb 26, 2020 · 1 comment
Open

Move assets to the folder as well #79

ghost opened this issue Feb 26, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 26, 2020

I have a sample pug file inside src:

doctype html
html(lang="en")
  head
    title= pageTitle
  body
    h1 Title
    script
      include assets/js/myfile.js

I have another folder called build
If I use pug src --out build I get index.html that includes the js inside the file.
Is there a way I can move the assets folder to build folder and just link them from that folder?

@paul-f-maxson
Copy link

Sounds like what you want is a block for scripts in the head, something like this:

//- layout.pug
html
  head
    block scripts
      script(src='/myscript.js')

This is a pug thing really, not specific to the cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant