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

How to run linkinator for "PUG" files #535

Open
CBoensel opened this issue Jan 23, 2023 · 3 comments
Open

How to run linkinator for "PUG" files #535

CBoensel opened this issue Jan 23, 2023 · 3 comments

Comments

@CBoensel
Copy link

CBoensel commented Jan 23, 2023

I'd like to run linkinator as a lint step for a Node express app that uses "pug" as a templating engine.

See https://pugjs.org/api/getting-started.html.

Syntax examples of an <a>-tags would be...

  • a(href=link)
  • a(href='#{link}')
  • a.my-css-class(href=link)

I noticed markdown is supported. Any change, pug could be supported too?

@CBoensel
Copy link
Author

@JustinBeckwith Help or any insights would still be appreciated if you can bare a minute, please.

@JustinBeckwith
Copy link
Owner

👋 ultimately linkinator works by scanning and parsing HTML files. Even for the markdown support, it first has to do a compilation step where it's converted to HTML and served from a web server first. Chances are - you'd be better off actually running your site with node, and then pointing linkinator to the local url instead of trying to statically scan from the file system. All linkinator ./path does anyway is use a tiny homebrew webserver to host the files :)

@CBoensel
Copy link
Author

Thanks, had a look to the code base. Will evaluate if it's worth the effort. Appreciate your response.

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

2 participants