Skip to content

Commit

Permalink
fix #750: check if Hugo has been installed before launching the "New …
Browse files Browse the repository at this point in the history
…Post" addin
  • Loading branch information
yihui committed May 11, 2023
1 parent 2c6b65d commit 630536b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: blogdown
Title: Create Blogs and Websites with R Markdown
Version: 1.16.1
Version: 1.16.2
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
person("Christophe", "Dervieux", role = "aut", email = "cderv@posit.co", comment = c(ORCID = "0000-0003-4474-2498")),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

- The RStudio addin "Quote Poem" adds `>` to every line instead of only the beginning of every paragraph now.

- The "New Post" addin will verify if Hugo has been installed before launching (thanks, @LukasWallrich, #750).

# CHANGES IN blogdown VERSION 1.16

- Added the command-line option `--preserve-tabs` to the `pandoc_args` argument of `blogdown::html_page()`, so that tabs are preserved by default in code blocks (thanks, @amarakon, #740).
Expand Down
5 changes: 4 additions & 1 deletion R/addin.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ source_addin = function(file) in_root(sys.source(
keep.source = FALSE
))

new_post_addin = function() source_addin('new_post.R')
new_post_addin = function() {
if (generator() == 'hugo') find_hugo()
source_addin('new_post.R')
}

update_meta_addin = function() source_addin('update_meta.R')

Expand Down

0 comments on commit 630536b

Please # to comment.