From the course: Learning GitHub Pages
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Add passthrough content - GitHub Tutorial
From the course: Learning GitHub Pages
Add passthrough content
- [Instructor] Now, you may have noticed that when we created this eleventy.js file, it processed things from the source folder and it moved them into the docs folder. In the source folder, though, we have this images sub folder, but that doesn't automatically get transferred into this docs folder. To do that, we're going to need to add something to our configuration variable, and we can do that right before our return statement. So in here, we're going to use eleventyConfig and then use a method called addPassthrough, actually, through is lowercase, PassthroughCopy, and then in here, we'll say we want to look for the source images folder and go ahead and pass it along into our destination here. So that means that I need to go ahead and stop the current process from running and rerun it again. And now it should have the images folder in here. Let's try refreshing. Sometimes you have to refresh that in order for it to…
Contents
-
-
-
-
-
-
-
(Locked)
Eleventy static sites3m 41s
-
(Locked)
Build a project3m 50s
-
(Locked)
Set up a config file3m 54s
-
(Locked)
Add passthrough content3m 46s
-
(Locked)
Create Nunjucks templates6m 12s
-
(Locked)
Include repetitive content5m 40s
-
(Locked)
Expand Eleventy with plugins6m 44s
-
(Locked)
Publish your site8m 10s
-
(Locked)
-