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

The Distillery: How to create a gallery in Distill #93

Open
utterances-bot opened this issue Aug 20, 2023 · 5 comments
Open

The Distillery: How to create a gallery in Distill #93

utterances-bot opened this issue Aug 20, 2023 · 5 comments

Comments

@utterances-bot
Copy link

The Distillery: How to create a gallery in Distill

https://distillery.rbind.io/posts/2021-04-11-how-to-create-a-gallery-in-distill/

Copy link

Hi, nice tutorial !!!

I've been trying to embed a gallery using your tips. However, the images do not show up. It shows an icon as the image was not found, and no errors appear on R. Would you mind looking at my site repository? I am trying to figure out what could be wrong (https://github.com/souzayuri/souzayuri.github.com). Thanks

@jhelvy
Copy link
Owner

jhelvy commented Aug 21, 2023

@etiennebacher any tips?

@etiennebacher
Copy link
Contributor

@souzayuri it's because the folder _gallery is not moved in the folder docs so docs/gallery.html cannot find the images.

In my case, I use github actions to automatically copy _gallery inside docs after I render the website. In your case, you don't use github actions so I suppose that you build the website locally and then push the changes on github. This means that you have to copy yourself _gallery inside docs.

Another option is to use github actions to automatically build the website and push the changes any time you modify something on the repo. You can use my .yml file for this (just don't forget to remove the line about the CV as this is specific to my website): https://github.com/etiennebacher/personal_website_distill/blob/master/.github/workflows/main.yml

Copy link

Hi @etiennebacheretie, and thank you for reaching out to me.
I added a function to copy the _gallery folder inside the docs folder after I render the website. I noticed that in your case, you are using a folder named _site instead of docs. In my case, my files are being sent to the docs folder instead, and I renamed it in the main.yml file. I can see the GitHub action is working because it copies the folder and files. However, the Gallery tab on my website still doesn't display the photos. Any idea of what could be happening or what I am doing wrong?

I really appreciate your help!

@etiennebacher
Copy link
Contributor

I don't think the github action worked, there is no run for the file you created:

image

Problem is that in your main.yml, the first 4 lines say that the action must run if there's a commit pushed on the branch master, but your branch is main. If you replace master by main, it should work.

FYI, you probably don't need to install all the packages I install in the github action

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

No branches or pull requests

4 participants