Search code examples
markdownjekyll

How can I place a link at the beginning of a string in Jekyll?


I'm trying to place some links in a static site using Jekyll + Markdown as follows:

  - role: Scrum Master - Project Manager
    time: SEP 2019 - PRESENT
    company: [Vincae](https://vincae.com/), Brazil
    details: |
      Responsible for implementing and maintaining a scrum methodology during the development of Unreal Engine based games like [Pure Forge](https://store.steampowered.com/app/1060160/PureForge).

I have no problem with my second link in "details" but my first link under "company" is trowing the following error:

         Error: (C:/Users/raschmitt/Dropbox/Public/Coding/Jekyll/online-cv/_data/data.yml): did not find expected key while parsing a block mapping at line 92 column 5
         Error: Run jekyll build --trace for more information.

What an I doing wrong an how can I correct it?


Solution

  • YML parsing doesn't like reserved characters in unquoted string. Here it's certainly the colon ':'.

    In order to avoid reserved characters collision, simply quote or double quote your string :

      - role: Scrum Master - Project Manager
        time: SEP 2019 - PRESENT
        company: '[Vincae](https://vincae.com/), Brazil'
        details: |
          blah
          blah
    

    And output with {{ m.company | markdownify }}