emacsorphanage / org-page

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

Discuss org-page multi config method #127

Closed tumashu closed 9 years ago

tumashu commented 9 years ago

At moment, org-page only use emacs global variable to configure, which is a simple and easy way, but in my opinion , it has some limit when use should manager multi site. I want to add feature which let org-page read configure from others: for example: plist, xml-file, json-file and so on, the below is

my thought is like this:

| global-variable  
| plist                                                              /-->  For example (:repo-dir "/path/to/dir" :theme 'mdo ...)
| xml-file              |---  (op/read-config) ---> a configure plist ---> used by other function
| json-file                           \---> This function can be customed
| other                 

What about this approach?

sillykelvin commented 9 years ago

In my opinion, the potential users of org-page are all Emacs users, so there is no need for other configuration type like xml, json, etc, just Elisp configuration should be enough.

And, in a previous issue [#119] about "multi site management", I have mentioned that:

org-page is just a static blog generator, multi website management is not the main task.

I am trying to keep org-page simple, and focusing on blog generation features, like tag, rss etc.

However, you can still implement the features yourself as additional configuration to org-page, and publish your configuration at emacs wiki or somewhere else. :-)

tumashu commented 9 years ago

json and xml just example, in my opinion, we should use a function to get org-page config opinions instead of direct read many global variables everywhere, this is my focus.

tumashu commented 9 years ago

exchange with a function or a list, instead of many global variables

sillykelvin commented 9 years ago

global variables are not bad in Emacs, for many other packages, like helm, there also do exists many global variables to control behaviors. Besides, org-page adds prefix (as namespace) op/ before variable names to avoid name conflict.

tumashu commented 9 years ago

Multi config method not need at moment, when we need this feature, let discuss it again.