ahmadnassri / node-metalsmith-pug Goto Github PK
View Code? Open in Web Editor NEWMetalsmith plugin to convert jade files
Home Page: https://www.npmjs.com/package/metalsmith-pug
License: MIT License
Metalsmith plugin to convert jade files
Home Page: https://www.npmjs.com/package/metalsmith-pug
License: MIT License
This is causing the test command to fail.
Hello. I'm using your metalsmith-pug plugin in combination with metalsmith-include to include markdown files in the source directory (which use pug). But I seem to be having an issue with it.
I know that you aren't supporting metalsmith-include, but I'm not sure which of the two plugins is having the problem, so I opened a ticket in metalsmith-include as well.
If you look at the example shown in the metalsmith-include README content, it very similar to what I'm trying to accomplish. The home.md loads home.jade as the template, then it includes thanks.md, assigning it to thanks
. Then you can see that the thanks.md file sets the template
to thanks.jade. Then thanks.jade just outputs contents
(rendered content of home.md) and thanks
(rendered content of thanks.md).
The only main difference I can see between that example and my code, is that I'm using pug instead of jade (which I know, same thing)
The problem I'm having, is I cant get the .md file that's getting used as an included file to actually render the content using the template
configured in the .md
file..
Any idea why the includes would be including the content from the markdown files, but not the rendered pug template?
I created a temporary git repository that will show you the exact issue i'm running into.
Thanks!
I just realized, that if one file errors, because of wrong pug syntax like:
.correct
buggy*line/throws
This error is not properly handled and passed to done
callback, instead it is just ignored...
It is very important to propagate the error so that one could handle it by:
metalsmith.build((err) => {
if(err) {
// handle it here
return
}
})
Refer to the docs about proper error handling in Node:
On registry https://registry.npmjs.org/
, the "latest" version (v0.5.1) of dependency codeclimate-test-reporter
has the following deprecation notice:
codeclimate-test-reporter has been deprecated in favor of our new unified test-reporter. Please visit https://docs.codeclimate.com/docs/configuring-test-coverage for details on setting up the new test-reporter.
Marking the latest version of an npm package as deprecated results in the entire package being considered deprecated, so contact the package author you think this is a mistake.
Affected package file(s): package.json
If you don't care about this, you can close this issue and not be warned about codeclimate-test-reporter
's deprecation again. If you would like to completely disable all future deprecation warnings then add the following to your config:
"suppressNotifications": ["deprecationWarningIssues"]
First I like to say thank you for a nice work! Second I would like to say that there is a possibility that i might have misunderstood the concept of what I considered a bug. Thanks for your help!
If you have two files (one.jade, two.jade) looking like following
_one.jade_
---
title: file one
someValue: true
---
p file one
_two.jade_
---
title: file two
---
p file two
p= someValue
The _someValue_ will be true in _two.jade_.
My expectation was that file data should be isolated to the current rendering file.
Line 45 in index.js
// also use the file's own data
if (opts.useMetadata) {
fileLocals = util._extend(util._extend({}, opts.locals), data);
}
Line 58 in index.js
// render
var str = jade.compile(data.contents.toString(), opts)(fileLocals)
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Preset name not found within published preset config (monorepo:angularmaterial). Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.
As this issue mentions jade is changing to pug. Are there any plans to use pug instead of jade(now or in the future)?
I'm getting a warning on my repo because metailsmith-pug
is using a vulnerable version of pug. Can we upgrade to version 3
?
I tried to do this but I couldn't figure out how this repo generates the output file. Running npm run compile
doesn't seem to create a lib
directory.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.