![]() There are several different ways to interact with quarto. The styles.css file can be used to specify custom CSS rules that will apply to the whole site.Those can be set by editing the posts/_metadata.yml file. The _quarto.yml file is used for settings that will apply across the entire site, but you will often want to configure settings that only apply to your blog posts. I don’t notice this at first, but the fact that there are two of them is important. yml extension are the YAML files used to configure the blog. These contain source code for the blog posts (the two files in the posts folder), the home page (the index.qmd file in the project root folder) and a standalone “about me” page for the blog (the about.qmd file). qmd extension are the quarto markdown documents. Quarto create-project quarto-blog -type website:blog Creating project at /home/danielle/GitHub/sites/quarto-blog:Ĭoming from an R markdown background, this is very familiar: I install it in the usual way from the command line: I’d also suggest Nick Tierney’s notes on making the switch, which is very helpful also.Īfter doing my background reading, I go to the get started page on the quarto website to download the installer file. If you’re an R markdown user considering making the jump to quarto and haven’t already read her summary of where things are at, you won’t regret it. The very first thing I do is go read Alison Hill’s wonderful We don’t talk about quarto blog post. Will it work? Will everything turn out to be reproducible? I hope so…) Getting started (I am a little nervous: porting a blog often involves recomputing things. Intrigued, I decided to play around with it for a while, and ended up making the decision to port this blog from distill to quarto. Now out of stealth mode and attracting no end of attention, quarto offers the promise of being a cross-platform, cross-format, open source publishing tool based on pandoc. It’s never been worth considering changing to something new though, because distill has so many things that I do like. However, along the way I’ve found a few things that have bothered me about using distill. At the time I made the deliberate choice to use distill as my blogging platform rather than something that would require a static site generator like hugo or jeykll, and I don’t regret that choice. I also added some CSS styling that is not described here, to limit the code to what is really necessary.A little over a year ago I decided to start blogging again, and set up this site. However, you can also check the repo of my website to have a clearer view of how to do so. In this post, I tried to explain how to build a gallery with a simple example. # Make list of tidytuesday plots I want to show in the gallery The purpose of the function below is to download a plot for a specific week in a specific year in the repo containing my plots. Therefore, I created a function to make it as easy as possible for me to update the plots I want to display in the gallery. I have started participating to #tidytuesday this year, and the main reason I wanted to create a gallery was to display my favorite plots. If you haven’t set up GitHub Actions yet, you can check my previous post, or check my current GitHub Actions for this site. ![]() We also have to add magick and httr in the list of packages to install. We need to add fs::dir_copy("_gallery/img", "_site/_gallery/img") in GitHub Actions so that the images are found when the gallery is built. LightGallery(document.getElementById('lightgallery')) We can just copy-paste it in an R Markdown file. We now have to add the CSS and the JavaScript code. First, I create a function to resize a single image, and I will apply it to all the images I have: To automatically create these thumbnails, we can use the function image_resize() in the package magick. As we saw above, lightgallery.js also requires thumbnails in addition to full-size images. Keep in mind that Distill is (purposely) less flexible than other tools, such as Make the gallery with R Create thumbnailsįirst, store your (full-size) images in a folder, let’s say _gallery/img. This post shows how to create a gallery on a Distill website. Note: This post was originally written by Etienne Bacher and was copied here on see the original post here for a potentially updated version.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |