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

Recognize theme CSS in input directory #28

Merged
merged 5 commits into from
Oct 5, 2018
Merged

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Oct 4, 2018

This PR will change the behavior of --input-dir (-I) option to recognize theme CSS in specified directory.

One of the expected use case is that there is theme CSS next to Markdown.

slides
├── slide1.md
├── slide2.md
├── slide3.md
├── my-theme1.css
└── my-theme2.css

Currently we have to specify folder twice in input arguments (or --input-dir option) and --theme-set option if you want to use these. It is bit redundant.

marp ./slides --theme-set ./slides

So we'll find out theme CSS from specified directory if --input-dir option was defined. Internally the directory will be added to the array of theme set option.

Thus, you would be OK just to run together with -I option in this case.

marp -I ./slides

In current version, it would throw an error and fail conversion when there is not @theme metadata in CSS found from theme set directories. We improve this behavior to output the warning which file had a problem. It no longer stop the conversion.

@yhatt yhatt merged commit 4c94fbd into master Oct 5, 2018
@yhatt yhatt deleted the theme-css-in-input-dir branch October 5, 2018 05:08
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

Successfully merging this pull request may close these issues.

None yet

1 participant