harp icon indicating copy to clipboard operation
harp copied to clipboard

Error - unknown filter ":markdown"

Open big-r81 opened this issue 2 years ago • 2 comments

Hi,

I wanted to update our visual guide.

I installed harp with

sudo npm install -g harp

Afterwards I did a

harp compile _src-fauxton-visual-guide fauxton-visual-guide

and I'm getting no error message, but the directory 'fauxton-visual-guide' is empty.

So i started harp as a local server with

harp _src-fauxton-visual_guide

and getting the following error message (in the browser):

Error - unknown filter ":markdown"

/Users/big-r/Documents/Developer/CouchDB/couchdb-www/_src-fauxton-visual-guide/index.jade

   168| 
   169|             [Verify](#verifyinstall) verifies your installation and allows you to
   170|             check whether all of the components of your CouchDB installation are
   171|             correctly installed.
 > 172|         
   173|         div.chapter#_all_dbs
   174|           :markdown
   175|             # Databases

Harp v0.41.2  [Documentation](http://harpjs.com/docs/)

Did I missed something?

big-r81 avatar Apr 21 '22 10:04 big-r81

This issue appears to have a broader scope, it applies not only to harp. The same error message has been showing up in official Pug (aka. Jade) documentation since 2020: https://github.com/pugjs/pug/issues/3249

Anyway, it can be fixed by installing jstransformer-markdown-it package, restarting harp and changing the opening line to :markdown-it, as suggested on stackoverflow.

(It feels disturbing that the injected markdown will perhaps be processed by a different package than native .md files but I couldn't find any functional difference between the two.)

addam avatar Mar 03 '23 14:03 addam

Hello @addam , I'm a trying to do the steps you describe, but I'm a bit lost. I've installed the transformer through npm, but still doesn't work, seems there a missing step to tell harpjs to add that filter to pug, could you please provide more info on the config process? (I'm a newbie to the js ecosystem, sorry).

crisrojas avatar Mar 25 '24 02:03 crisrojas