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

Does remark-html work only from the command line? #7

Closed
kahwee opened this issue Feb 22, 2016 · 4 comments
Closed

Does remark-html work only from the command line? #7

kahwee opened this issue Feb 22, 2016 · 4 comments
Labels
🙋 no/question This does not need any changes

Comments

@kahwee
Copy link

kahwee commented Feb 22, 2016

I encounter an issue when trying to use only command line to execute remark. This is my .remarkrc

{
  "output": true,
  "plugins": {
    "lint": {
      "no-shell-dollars": false
    },
    "github": true,
    "comment-config": true,
    "toc": true,
    "validate-links": true,
    "html": true
  },
  "settings": {
    "commonmark": true,
    "bullet": "*"
  }
}

I then execute

remark history.md --output history.html

This does not seem to work. Is remark-html intended to be used in conjunction with .remarkrc or do I have to do this programmatically.

Thanks.

@wooorm
Copy link
Member

wooorm commented Feb 22, 2016

Please provide more information, such as version numbers, contents of files.

remark-html works with .remarkrc files on the CLI, and programatically on the API.

P.S. Read the docs/

@kahwee
Copy link
Author

kahwee commented Feb 22, 2016

I upload my files to GitHub: https://github.com/kahwee/remark-test2

The exact error message is:

> remark testing.md --output testing.html

testing.md
        1:1  error    Error: Invalid value `true` for setting `options`
    at raise (/Users/kahwee/projects/remark-test2/node_modules/remark/lib/utilities.js:37:11)
    at Of.compilerPrototype.setOptions (/Users/kahwee/projects/remark-test2/node_modules/remark/lib/stringify.js:881:9)
    at Of.Compiler (/Users/kahwee/projects/remark-test2/node_modules/remark/lib/stringify.js:822:10)
    at new Of (/Users/kahwee/projects/remark-test2/node_modules/unherit/index.js:58:22)
    at Of.HTMLCompiler (/Users/kahwee/projects/remark-test2/node_modules/remark-html/index.js:57:26)
    at Processor.stringify (/Users/kahwee/projects/remark-test2/node_modules/unified/index.js:226:16)
    at Ware.stringify (/Users/kahwee/projects/remark-test2/node_modules/remark/lib/cli/file-pipeline/stringify.js:56:35)
    at Ware.<anonymous> (/Users/kahwee/projects/remark-test2/node_modules/wrap-fn/index.js:75:16)
    at Ware.<anonymous> (/Users/kahwee/projects/remark-test2/node_modules/wrap-fn/index.js:57:27)
    at next (/Users/kahwee/projects/remark-test2/node_modules/ware/lib/index.js:85:20)

✖ 1 error

To execute the test, run npm run build

Pardon me if I missed some details in remark docs.

Thanks.

@wooorm
Copy link
Member

wooorm commented Feb 22, 2016

Oh I see, don't use 'true' as the value for the keys in '.remarkrc', instead use 'null', in which case they default to an empty object!

@wooorm wooorm closed this as completed Feb 22, 2016
@kahwee
Copy link
Author

kahwee commented Feb 22, 2016

Hey thank you @wooorm, that explains.

Do you mind if I contact you through email? I want to improve Node.js guides generator based on nodejs/node#4866

I want to know what your thoughts on how I should be implementing this where there is a template involved. Should I fork remark-html to do this?

@wooorm wooorm changed the title Does remark-html work only with command line and .remarkrc Does remark-html work only from the command line? Aug 15, 2019
@wooorm wooorm added the 🙋 no/question This does not need any changes label Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes
Development

No branches or pull requests

2 participants