W
W
wakenbyWork2021-09-24 15:32:28
Pug
wakenbyWork, 2021-09-24 15:32:28

How to store data separately in pug?

In general, I use the following structure:

├── src
│   ├── components
│       ├── article-item
│           ├── article-item.pug
│           ├── article-item.scss
│       ├── news-item
│           ├── news-item.pug
│           ├── news-item.scss


And I want to store data in json format next to pug like this:

├── src
│   ├── components
│       ├── article-item
│           ├── article-item.pug
│           ├── article-item.scss
│           ├── article-item.json
│       ├── news-item
│           ├── news-item.pug
│           ├── news-item.scss
│           ├── news-item.json


But I don’t know how to implement it ((

And if it’s not possible through json, then how is it possible?

PS: I work with pug through gulp

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2021-09-24
@delphinpro

gulp-data
But this is not a panacea - I connected everything in a bunch.
This is where brains need to be applied. If you can do it, everything will be great.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question