Skip to content

propose changes to the New Post addin#432

Merged
yihui merged 15 commits intorstudio:masterfrom
maelle:newpostaddintweaks
Mar 4, 2020
Merged

propose changes to the New Post addin#432
yihui merged 15 commits intorstudio:masterfrom
maelle:newpostaddintweaks

Conversation

@maelle
Copy link
Contributor

@maelle maelle commented Mar 2, 2020

I'm proposing two changes to the very cool New Post addin:

  • If there's no blogdown.author option and whoami is installed, try to guess the author name using whoami.

  • The possible subdirectories are the combination of the option blogdown.subdir if it exists, '' and existing subdirectories; the selected value is either `blogdown.subdir or the first option; it is possible to create a subdirectory from the addin. (edited after getting feedback from @gadenbuie)

These suggestions might reduce the setup efforts needed to use the addin.

Opening a PR instead of an issue is a bit bold, and I don't assume my PR will be merged, but it was easier to communicate my ideas by implementing them. 🙂

@gadenbuie
Copy link
Member

@maelle The drop-down for blog directories has been something I've wanted for a while, so I'm very glad to see this PR!

maelle and others added 3 commits March 3, 2020 11:52
Co-Authored-By: Garrick Aden-Buie <gadenbuie@mail.usf.edu>
@maelle
Copy link
Contributor Author

maelle commented Mar 3, 2020

@gadenbuie what do you think of this new version? I updated my first comment. Thanks for your feedback!

Copy link
Collaborator

@yihui yihui left a comment

Choose a reason for hiding this comment

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

I love these ideas! Thank you!

Would you mind posting a screenshot? I just want to double check if the width of the select input is good.

BTW, I'll make some cosmetic changes before I merge this PR, and you don't need to worry about my style preferences.

R/utils.R Outdated

option2 <- list.dirs(file.path(site_root(), "content"),
full.names = FALSE,
recursive = FALSE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess it makes sense to exclude _files and _cache folders.

@maelle
Copy link
Contributor Author

maelle commented Mar 4, 2020

Glad you liked the ideas @yihui! Now it's mostly @gadenbuie's code 😁

image

@yihui yihui merged commit 57cbe5a into rstudio:master Mar 4, 2020
yihui added a commit that referenced this pull request Mar 4, 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.

3 participants