Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize rmarkdown template #30

Merged
merged 7 commits into from
Nov 27, 2020
Merged

Conversation

henrywangnl
Copy link
Contributor

Optimized the rmarkdown template for writing post to save my life.

---
params:
  post_title: "The Post Title"
title: "`r params$post_title`"
date: "`r format(Sys.time(), '%Y-%m-%dT%H:%M:%S')`"
output: hugodown::md_document
slug: "`r gsub(' ', '-', tolower(params$post_title))`"
status: "publish"
comment_status: "open"
categories:
  - category1
  - category2
tags:
  - tag1
  - tag2
  - tag3
---

@maelle
Copy link
Collaborator

maelle commented Nov 9, 2020

(and thank you!!)

@henrywangnl
Copy link
Contributor Author

hmmm, the R CMD Check failed because of slugify package I think.

output: hugodown::md_document
status: "publish"
slug: "the-post-slug"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait should this be kept? the users could still want to choose their own slug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be default we will handle slug in wp_post() but users can still overwrite it if they manually provide slug in the YAML header. However, slug is not shown in the default template. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the delay, I think I'd like to keep it in the template because folks might wonder how to add it?

@henrywangnl
Copy link
Contributor Author

henrywangnl commented Nov 26, 2020 via email

@maelle
Copy link
Collaborator

maelle commented Nov 27, 2020

ok then! :-)

@maelle maelle merged commit 76b675d into baranovskypd:main Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants