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

href in an a tag doesnt work #3390

Open
GrantBaum opened this issue Sep 14, 2022 · 2 comments
Open

href in an a tag doesnt work #3390

GrantBaum opened this issue Sep 14, 2022 · 2 comments

Comments

@GrantBaum
Copy link

Pug Version: your version number here
8.15.0
Node Version: your version number here
8.15.0

Input JavaScript Values

Input Pug

a(href='views/about.pug') About

Expected HTML

should take me to about.pug

error

cannot GET about.pug

Additional Comments

@yashdodani
Copy link

Can you provide more clarity on your issue, as considering only this much information about the issue is difficult. Please provide with more code and comments to make this issue more clear and understandable.

@webdiscus
Copy link

webdiscus commented Oct 22, 2022

@GrantBaum

In href must be a public path to HTML file. Pug engine not analyse content of string attributes.

wrong

a(href='views/about.pug') About

You must know the path to the compiled HTML page yourself.
For example, if Pug templates are compiled into <PROJECT_PATH>/dist/pages/ directory, then correct href will be :

a(href='pages/about.html') About

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

3 participants