emacsorphanage / org-page

[INACTIVE] A static site generator based on Emacs and org mode.
673 stars 99 forks source link

About fallback theme feature #125

Closed tumashu closed 9 years ago

tumashu commented 9 years ago

when a theme doesn't include *about.mustache file , org-page send error, I think this is not a good way, When org-page can't find "about.mustache" in used theme dir, it should use "about.mustache" in fallback theme instead sending error.

This feature can let custom theme easier, for users don't need to copy all template and resource files.

sillykelvin commented 9 years ago

No, users are on their own responsibility for a complete theme, and also, different themes have different styles, the about page of one theme may NOT be able to apply to another theme.

tumashu commented 9 years ago

many users just want use default template with small change, for example, different css, if had this feature, user only need manager a file.

my custom theme only change 3 file of default theme, in other words, i have to manual merge other file to let template work well with newer org-page, it,s feel bad!

tumashu commented 9 years ago

when we have many theme create by other developer, this feature can save times, like diff

thi make this feature possible:

(setq op/theme '(mytheme  mdo))
sillykelvin commented 9 years ago

If some templates are same for two theme, you could just copy them from one to another, they will be independent of each other.

If you make something like (setq op/theme '(theme1 theme2 theme3)), there will be two issues:

  1. if about template is not presented in theme1, you have to confirm whether it is presented in theme2 or theme3
  2. if theme3 is deleted (assume it contains the about template), then there will be no available about template to accomplish the publication.
tumashu commented 9 years ago
If some templates are same for two theme, you could just copy them from one to another, they will be independent of each other.

You are right, but If I had 100 themes which only be different in color with "mdo", when you update "mdo", I had to copy 100 times , a depressed thing ...

if theme3 is deleted (assume it contains the about template), then there will be no available about template to accomplish the publication.

put "mdo" to the end of list as fallback, this is not problem.

By the way, I have finish this feature, the diff seem a bit bigger, when I add docstring and check the code, I will send you to review.