masasam / emacs-easy-hugo

Emacs major mode for managing hugo
https://gohugo.io/tools/editors/#emacs
GNU General Public License v3.0
362 stars 26 forks source link

Change postdir of a specific blog #46

Closed minorugh closed 6 years ago

minorugh commented 6 years ago

I'm using emacs-easy-hugo with multiple blog, and postdir setting is used by default.

However, I'd like to change postdir setting for specific one blog. Give me a hint on how to deal with it.

masasam commented 6 years ago

Hi @minorugh . Thank you for comment.

The following is the setting you want.

(setq easy-hugo-basedir "~/src/mainblog/")
(setq easy-hugo-url "https://yourmainblog")
(setq easy-hugo-sshdomain "blogdomain")
(setq easy-hugo-root "/home/mainblog/")
(setq easy-hugo-bloglist '(((easy-hugo-basedir . "~/src/blog2/")
            (easy-hugo-url . "https://yourblog2domain")
            (easy-hugo-postdir . "content/blog")
            (easy-hugo-sshdomain . "blogdomain2")
            (easy-hugo-root . "/home/blog2/"))))

Hope this helps.

minorugh commented 6 years ago

Hi @masasam. Thank you for advice.

I tried that setting already. The article list correctly "content/blog" It will be changed. However, When 'new-post' is executed, it's added to "content/post" instead of "content/blog".

masasam commented 6 years ago

Hi @minorugh . Your customized function is running instead of easy-hugo standard function. See https://github.com/minorugh/emacs.d/blob/master/inits/80_easy-hugo.el#L75-L93

Hope this helps.

minorugh commented 6 years ago

Sorry @masasam . Just now I also noticed there was a problem with my settings. I will check my settings again and report correctly.

Thanks.

minorugh commented 6 years ago

@masasam.

After comment out my custmized function it worked fine. Sorry to trouble you. really sorry. My customization function can be solved by devising template.

I,m sorry for a childish follower, please help me without abandoning. Thank you so much.

masasam commented 6 years ago

Hi @minorugh .

Mistakes are not ashamed. Because sharing the source code with everyone is to cooperate with ideas and bug fixes.