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

--theme can not be a URL #183

Open
roidelapluie opened this issue Nov 9, 2019 · 4 comments
Open

--theme can not be a URL #183

roidelapluie opened this issue Nov 9, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@roidelapluie
Copy link

I would love to see --theme support online URL's

@yhatt yhatt added the enhancement New feature or request label Nov 10, 2019
@yhatt yhatt self-assigned this Nov 19, 2019
@yhatt yhatt removed their assignment Jul 5, 2020
@simoneggler

This comment was marked as spam.

@vincent-zurczak
Copy link

Hello,

Any plan to support this feature?
I am ready to contribute if it can help.

Basically, it seems updating the theme file and extending the load function should be enough. What do you think?

@yhatt
Copy link
Member

yhatt commented Apr 19, 2023

Please notice to path preprocessing in config.ts. If remote URL(s) was passed to theme and themeSet, you should skip preprocessing to resolve theme's relative path from the location of configuration file.

marp-cli/src/config.ts

Lines 156 to 171 in 29c8c0f

const theme = await this.loadTheme()
const initialThemes = theme instanceof Theme ? [theme] : []
const themeSetPaths =
this.args.themeSet ||
(this.conf.themeSet
? (Array.isArray(this.conf.themeSet)
? this.conf.themeSet
: [this.conf.themeSet]
).map((f) => path.resolve(path.dirname(this.confPath!), f))
: [])
const themeSet = await ThemeSet.initialize(
(inputDir ? [inputDir] : []).concat(themeSetPaths),
initialThemes
)

@robertjdominguez
Copy link

I've opened a PR for this, folks 👋

#571

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants