Hugo and Prettier

It is not a Hugo question. I am a Vim user and would like to use prettier for Hugo. The question is, how can I configure prettier for the md and html files?

Try adding "proseWrap": "always" to you your .prettierrc. Docs:

1 Like

It works fine. Thank you

I wrote a small plugin for prettier, which formats html without breaking the {{ }}:


To use it with GoHugo or basic .html files, you’ll have to override the used parser inside your .prettierrc file:

  "overrides": [
      "files": ["*.html"],
      "options": {
        "parser": "go-template"