Search code examples
markdownjekyllkramdown

jekyll won't render text after pdf is embedded into an article


I have the following in an article

---
id: 1001
title: 'Cost of Self-Hosting a VPN server in AWS'
date: 2019-07-09T15:49:03-04:00
---

Some text

<object data="/assets/uploads/2019/07/09/Aws-Bill-Jun2019.pdf" width="1000" height="1000" type='application/pdf' />

Some more text

Now jekyll correctly renders the initial text block as well as the PDF but the text after the pdf isn't rendered, nor is the footer and navigation.

I don't want to be doing any self promotion but you can see this in action here. If you view the page source then there are a couple of paragraphs after the pdf, these don't show up on the page.

Does anyone have any idea as to why this is happening? I followed this, to embed the PDF. Are there some issues when an object is embedded into the page along with markdown, i.e. markdown is mixed with HTML.


Solution

  • <object> closing tag is mandatory.

    Tag omission : None, both the starting and ending tag are mandatory.

    This will resolve your problem.

    <object 
      data="/assets/uploads/2019/07/09/Aws-Bill-Jun2019.pdf" 
      width="1000" 
      height="1000" 
      type="application/pdf"></object>