-
Notifications
You must be signed in to change notification settings - Fork 499
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
Load a base theme that provide defaults for all required keys #132
Comments
The base theme also allows us to introduce new theme settings without the risk of breaking existing themes. |
Once we have a base theme in place, we should remove all the unnecessary fallbacks when we check for keys...or, these fallbacks should be preconfigured. Case in point:
We have to assume we're going to have a value for the |
Now that I have Asciidoctor PDF 1.5.0.alpha.8, do I assume that theme base + overriding is working yet, or do I still need to copy the base theme? |
It's best to start with the default theme and modify it at this point. I'm
still working on the base theme feature. It will make the next release
(alpha.9 or beta.1).
|
Hi guys, i'm using alpha8 and can't load my custom theme. I've just put my theme file in same directory as my adoc document and ran asciidoctor-pdf myfile.adoc. The theme file is name myfile-theme.yml |
managed to load my theme using pdf-style and styledir options:
It would be nice if it used adoc file path as default pdf-stylesdir and adoc filename(plus -theme sulfix) as default pdf-style. If no pdf-style is found then use basic-theme.yml. |
Please file a separate issue for this enhancement and we'll discuss /
design / consider it there. Thanks!
|
… keys - load base theme before loading primary theme - remove unnecessary keys in default theme - update information about base theme in theming guide - minor code cleanups
… keys - load base theme before loading custom theme - read base theme from flat layout, do not postprocess - don't read base theme if using base theme - don't use base theme before loading default theme - remove unnecessary keys in default theme, reorg - update information about base theme in theming guide - fix image_align key in theming guide - remove most defensive fallbacks when using theme keys - minor code cleanups
… keys - load base theme before loading custom theme - read base theme from flat layout, do not postprocess - don't read base theme if using base theme - don't use base theme before loading default theme - remove unnecessary keys in default theme, reorg - update information about base theme in theming guide - fix image_align key in theming guide - remove most defensive fallbacks when using theme keys - minor code cleanups
… keys - load base theme before loading custom theme - read base theme from flat layout, do not postprocess - don't read base theme if using base theme - don't use base theme before loading default theme - remove unnecessary keys in default theme, reorg - update information about base theme in theming guide - fix image_align key in theming guide - remove most defensive fallbacks when using theme keys - minor code cleanups
resolves #132 load a base theme with defaults for required keys
Currently, each theme must provide all required values or else the converter will crash. It would be better if a theme only had to specify values for keys it wants to override / customize. This can be accomplished by introducing a base theme. The base theme should be loaded before the specified theme and provide defaults for all required values.
You can think of the base theme as a “CSS reset”.
The text was updated successfully, but these errors were encountered: