-
Notifications
You must be signed in to change notification settings - Fork 0
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
example of writing chunks using functions #7
Conversation
No spelling errors! 🎉 |
No broken url errors! 🎉 |
👀 Quick preview of website here * * note not all html features will be properly displayed in the "quick preview" but it will give you a rough idea. Updated at 2025-01-07 with changes from the latest commit 2a8d45d |
@kweav looks cool and great start! I wonder if we can write some more generic functions too or make use of a config file to make copy and pasting easier. |
Can we practice on a cheatsheet we haven't made yet and add it to the _site.yml so we can more easily preview it? |
I like the idea of a config file a lot! Are you imagining a config file for each cheatsheet? |
Practice the way I was doing it (e.g., try this but with course setup), or by trying to make it even more generic/use of a config file? course setup sounds good! and adding that as a new page on _site.yml so we can preview it. I think what you wrote is really great and pretty universal, but then we might have many steps that we want to write out (aka copy paste) fairly uniquely - I was thinking we could write functions that try to figure out what icon to put based on the text or we could have a config to fill in the html for the icons (and check boxes) (this could be pretty simple I think) |
was thinking overall for common things that we add like icons and the check boxes |
Maybe let's add a new page to _site.yml based on your test and then we can merge this? |
oops sorry I didn't mean to edit your comment earlier haha sometimes I do that |
I've added two R files and an example output Rmarkdown from running one of the R scripts.
The first R file (
echo_chunks.R
) has functions that you can supply argument to and it'll return the text. The second R file (write_cheatsheets.R
) calls those functions, concatenating the output together and writes them to an Rmarkdown file that can then be knitted.How does this look? I can keep putting chunk functions in
echo_chunks.R
if you like the look of this