Closed apreshill closed 3 years ago
This comes from new_site()
with sample = TRUE
. It currently assumes that the website organization will be
first
content/
\-- blog/
\-- ...
or
content/
\-- post/
\-- ...
and if he does not exist it will create the latter.
https://github.com/rstudio/blogdown/blob/b860d27fb475eeb7401fbc0542d46962eeac17b7/R/hugo.R#L163-L172
For international website, it will always create the sample at the root and not in folder.
I believe the key to detect would be languages
first, and if defaultContentLanguage
is set with defaultContentLanguageInSubdir = TRUE
then, put the post in default language folder. Other is the two latter keys are not defined, defaultContentLanguage
will be en
by default, not under a subdir by default.
Should be fixed now. Thanks for the report!
When I start a new site with a multilingual theme, the sample R Markdown post always ends up in the wrong place, see:
https://github.com/apreshill/introduce-yourself/tree/master/content https://github.com/apreshill/zzo/tree/master/content
Perhaps we could detect the combo of
defaultContentLanguage
anddefaultContentLanguageInSubdir
keys in the YAML?https://gohugo.io/content-management/multilingual/#configure-languages
https://github.com/apreshill/zzo/blob/bff76d2d4e5ed5ea07e76f2f770aab06f9a6b469/config.yaml#L4-L5
Checklist
When filing a feature request, please check the boxes below to confirm that you have provided us with the information we need. Have you:
[x] searched for an existing feature request to avoid creating duplicate requests? If you find an existing feature request, please give it a thumbs-up reaction, as we'll use these reactions to help prioritize the implementation of these features in the future.
[x] provided a clear and concise description of the problem this proposed feature would address? For example, I struggle to do
[...]
with blogdown.[x] provided a clear and concise description of what you want to happen?
[x] provided a clear and concise description of alternative solutions or workarounds you've considered?
[x] added any other context or screenshots about your feature request?