Replies: 2 comments 2 replies
-
Okay, so project:
type: website
post-render:
- "cp -rnv static/. _site/" The With the |
Beta Was this translation helpful? Give feedback.
-
I tried to use the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm in the process of migrating a blog from Hugo (blogdown) to Quarto and have stumbled on a small problem. With Hugo, a special folder named
static
is used to store files that become available on the website at the website root. A file atstatic/blog/cat.png
becomes{site_url}/blog/cat.png
on the final site.Is it possible to map project resources from their relative project path to a new path in the rendered site? I'm envisioning something like
but AFAICT no such syntax exists for Quarto. (More realistically, I'd probably do
"static:/"
to mean copy files instatic/
into the site root.)One alternative I've considered is to move everything out of static into the right place within the website repo structure. This will work, but it will also require a decent bit of metadata surgery to ensure that static files that Quarto shouldn't attempt to render are skipped. For example, it was helpful to have
static/
as a place to put files that I knew wouldn't be touched by the site generator and would appear in my site as-is.Also, I have a lot of small top-level files that I'd rather not have cluttering the repo. Storing them in
static/
certainly added some overhead complexity but made it a lot easier to locate the post content quickly.Although... after writing out the above, the alternative I'll likely use for now is a post-render script to copy
static/
into_site
.Beta Was this translation helpful? Give feedback.
All reactions