Skip to content

Child themes, plugins, and remote files #691

Answered by rdela
rdela asked this question in Q&A
Discussion options

You must be logged in to vote

@lumeland

Technically, a theme is just a plugin to setup other plugins and load remote files. So it's possible to create a theme to load another theme and override some remote files:

export function myTheme() {
  return (site) => {
    site.use(simpleBlogTheme());
    site.remoteFile("styles.css", import.meta.resolve("overrided-styles.css");
  }
}

More about remote files: https://lume.land/docs/core/remote-files/

remote files used by simple blog: https://github.com/lumeland/theme-simple-blog/blob/main/mod.ts#L13-L41

https://fosstodon.org/@lume/113493621685611161

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rdela
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant