Menu

#12 Hugo: YAML not rendered in ouput md file

open
nobody
enhancement (4)
2016-06-21
2016-02-20
Anonymous
No

Originally created by: mwhitaker
Originally owned by: hrbrmstr

I am sure there is a reason why you left out the preserve_yaml argument in the md_document function in hugo.R, but am wondering if there might be a way to set additional values in the front matter of the Rmd file that are preserved for use in Hugo.

Discussion

  • Anonymous

    Anonymous - 2016-02-21

    Originally posted by: hrbrmstr

    Nope :-) I was just experimenting. I'll work on adding this ASAP.

     
  • Anonymous

    Anonymous - 2016-02-21
     
  • Anonymous

    Anonymous - 2016-02-21

    Originally posted by: mwhitaker

    You know, what I think happens when you set preserve_yaml=TRUE is that the front matter gets duplicated:

    ---
    title: "www"
    slug: "www"
    author: "www"
    date: "YYYY-MM-DD"
    output: markdowntemplates::hugo
    ---
    
    ---
    author: www
    date: YYYY-MM-DD
    slug: www
    status: draft
    title: www
    categories:
    
      - r
    ---
    GitHub Documents
    ----------------
    

    Btw, wanted to thank you for the cool package. Hugo in particular is very cool.

     
  • Anonymous

    Anonymous - 2016-06-21

    Originally posted by: ldecicco-USGS

    To chime in on a similar enhancement request...I'd love to add custom tags or categories or parameters to the header. For example, I would like to add something like:

    ---
    title: "Blog1"
    slug: "blog1"
    author: "me"
    date: "2016-06-13"
    category:
    
      - foo
      - bar
    tags: R
    params:
      - image: blog1/chunk1.png
    output: markdowntemplates::hugo
    ---
    

    to get:

    ---
    author: me
    date: 2016-06-15
    slug: blog1
    status: draft
    title: Blog1
    categories:
    
      - foo
      - bar
    tags: R
    image: blog1/chunk1.png
    ---
    

    Maybe this capability exists, and I've just been doing it wrong, but if not, I bet it would be really useful.

     

Log in to post a comment.