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

[Enhancement?] add_local_*() functions #465

Closed
KasperThystrup opened this issue Jul 2, 2020 · 4 comments
Closed

[Enhancement?] add_local_*() functions #465

KasperThystrup opened this issue Jul 2, 2020 · 4 comments
Labels

Comments

@KasperThystrup
Copy link
Contributor

KasperThystrup commented Jul 2, 2020

There doesn't seem to be an option for golem to physically copy a local file like an image to www/.

Keeping up with the philosophy to document most of the development process in the dev files, I suggest to implement golem::add_local_* functions. These functions could contain arguments for determining whether to hard copy or link target file.

If this is integrated, you could likewise include a section in the 02_dev.R template which contains add_local_*() functions (e.g.golem::add_local_image()).

@KasperThystrup KasperThystrup changed the title [Enhancement?] add_local_*() to www [Enhancement?] add_local_*() functions Jul 2, 2020
@ColinFay
Copy link
Member

ColinFay commented Jul 2, 2020

hey,

That would make perfect sense to have that (I was under the impression that I had an issue for implementing that but apparently not :) )

The correct convention for naming would be use_*, following the pattern of use_external_css.

Would you be willing to make a PR implementing that?

@ColinFay
Copy link
Member

ColinFay commented Oct 1, 2020

Thanks again for the idea!

There is now a use_external_file() that will allow you to do the add from an online file.
https://github.com/ThinkR-open/golem/blob/dev/R/use_files.R#L200

I suppose we could implement a use_local_ version of these use_external_ functions

@ColinFay ColinFay added Difficulty: novice effort: medium good first issue Good for newcomers hacktoberfest Issues for the hacktoberfest labels Oct 1, 2020
@KasperThystrup
Copy link
Contributor Author

Sorry that I didn't answer you back in July, my notifications settings were off...

I have just forked Golem, I will look into it now!

@KasperThystrup
Copy link
Contributor Author

Functionality has been added, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants