In source/_posts I have post.md and post/ directory to hold assets for post.md.
In post/ I have js/main.min.js which is being used in post.md to illustrate something.
Hexo is picking up the main.min.js and creating a post for it. How can I get around this?
The only solution I have found was to include a directory for the post under source i.e. source/post (outside / alongside source/_posts).
You can then put your assets there and refer to them in md file e.g.
<script src="/post/js/main.min.js"></script>
Btw, I have tried using _config.yml's skip_render:
skip_render:
- "**/*.js"
- "*/*.js"
- "_posts/post/js/main.min.js"
and other variations but they all result in main.min.js being rendered as a post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With