renard / o-blog

Standalone orgmode blog exporter. DEPECATED, NOT MAINTAINED
http://renard.github.com/o-blog-v2
260 stars 58 forks source link

option to change post filenames #4

Closed exaos closed 12 years ago

exaos commented 12 years ago

At now, the post filenames are generated by sanitizing titles. But if the title is not in English or any non-Latin characters, it will be failed to get the proper names. How about adding an option to change the default post filenames? The default post filenames may be generated by using a MD5SUM instead of sanitized titles. User can change the default way by option.

renard commented 12 years ago

Hi,

Seems a good idea as long as you let user decide which function to use for filename sanitizing. The default one should be asciified titles.

exaos commented 12 years ago

I made a dirty patch to o-blog.el (https://github.com/exaos/o-blog), now I can generate blogs in Chinese. See here http://exaos.github.com/o-blog/ Snippets cannot be non-Latin characters yet. Hope to fix it later.

renard commented 12 years ago

Nice translation.

If you do write a clean patch I would be glad to include it

renard commented 12 years ago

Done in 27522ce

renard commented 12 years ago

In your example at https://github.com/exaos/el-orgsite, you do use snippets such as:

** 关于
   :PROPERTIES:
   :SNIPPET:  t
   :END:

心蛛的个人站点,记录一点私人的收藏或点滴。

(I assume this stands for the About as I don't read Chineese).

You must then change the template in other to use them:

in page_footer.html you should use:

          <lisp>(ob:post-content-html (ob:get-snippet "关于"))</lisp>

Instead of

          <lisp>(ob:post-content-html (ob:get-snippet "About"))</lisp>

Then you can use non-latin chars for snippets.

exaos commented 12 years ago

:-) Thanks. I have already changed the templates. Sorry, I should close this issue earlier.