Search code examples
jekyllgithub-pageschirpy

posting error in github page (build error)


  *  744:1453: ERROR: Start tag of nonvoid HTML element ends with '/>', use '>'.

> `HTML-Proofer found 42 failures!
> Error: Process completed with exit code 1.`

I want to post my .ipynb file on my blog, so I downloaded the .ipynb file as a .md file in Jupyter notebook.

When I put the .md file in the _posts folder and checked the blog through jekyll serve (using jekyll-theme-chirpy), it worked fine.

But when I tried to post that .md file to my GitHub blog, there was an error (above) in GitHub actions that I can't understand.

how can I solve this problem?

I did:

  • theme upgrade
  • I tried some things in window and mac both
  • I wrote the front matter in a .md file

Solution

  • Check you HTML code. https://rocketvalidator.com explains the message

    Self-closing syntax (“/>”) used on a non-void HTML element. Ignoring the slash and treating as a start tag.

    A slash character (/), normally used for self-closing tags, has been found in an unexpected place for a tag, and the validator has decided to ignore it and treat is as a start tag instead.

    The page also lists possible options and potential mistakes (check the link on top for the examples I left out here):

    HTML tags can go in pairs (start tag, end tag) or be self-closing.

    In HTML5, the ending slash and the preceding space is optional for self-closing tags so all of these are valid.

    A common mistake is including a slash tag on a start tag, as in the following example. If the Nu HTML checker encounters that, it will ignore the slash and just treat the tag as a start tag.