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
Site content is not updated #5
Comments
Hello, do you eval-buffer with your blog-minimal-vars.el ? Oh, maybe I can add it before executing blog-minimal-init. |
Hello, |
Thank you, it's really a bug. I haven't updated vars when generate index.html. Now it's fixed. You can download new three *.el to change your origin files. I changed blog-minimal-preview-blog function. |
I think I have fixed it passing my test. Hope you can test it. |
Hi, |
Hmm, I check the content of |
You can try to eval (blog-minimal-render-main-index) at *scratch* buffer , and then see there is a line 'wrote **** index.html' sentance at *message* buffer. This function should be like this, you can examine whether it's same with mine or not. (defun blog-minimal-render-main-index ()
"Render main index for blog minimal."
(blog-minimal-update-vars) ;;; this function will update your configuration vars
(ht-remove blog-minimal-header-vars "high-dir")
(blog-minimal-update-index-vars t)
(let ((main-vars
(ht-merge blog-minimal-header-vars blog-minimal-person-zone-vars blog-minimal-nav-vars blog-minimal-blog-index-vars blog-minimal-footer-vars)))
(blog-minimal-string-to-file (mustache-render
"{{> main-index}}"
main-vars)
(concat blog-minimal-blog-main-dir "index.html")))) When you want to add new post, you can use (blog-minimal-render-current-article)
(blog-minimal-render-all-org-files) update index you can use this (actually it's invoked in function blog-minimal-preview-blog) (blog-minimal-render-main-index) I think blog-minimal-init is a function for your init configuration, then you don't need to invoke it. |
Hi Thief, |
Hello, |
After pulling the newest code, I tried your suggestion, the result is that index.html isn't updated at all.
|
You can see that I invoke blog-minimal-render-main-index , and invoke (blog-minimal-update-vars) in blog-minimal-render-main-index. (defun blog-minimal-preview-blog ()
"Preivew blog minimal."
(interactive)
(blog-minimal-render-main-index) ;;; here
(httpd-serve-directory blog-minimal-blog-main-dir)
(browse-url (format "http://%s:%d" "127.0.0.1" httpd-port))) (defun blog-minimal-render-main-index ()
"Render main index for blog minimal."
(blog-minimal-update-vars) ;;; here
(ht-remove blog-minimal-header-vars "high-dir")
(blog-minimal-update-index-vars t) So when its vars are changed, you invoke preview-blog which has updated vars. |
Yep, I can see the logic flow. I try debugging stacktrace by edebug already. |
你好,
Site content is not updated after
bm/config-vars
,bm/init
, andbm/preview
, but can only be updated afterbm/config-vars
,restart Emacs
,bm/init
, andbm/preview
.Is this a nomal behavior of blog-minimal?
谢谢
The text was updated successfully, but these errors were encountered: