Comments (7)
Hi!
Could you run the function wrapped in (debug (your-code-here ...))
, and post the full stack trace?
from org-static-blog.
not sure if this is what you meant (I do not have much xp in elisp... still climbing the learning curve =p)
I tried to run (org-static-blog-publish)
in the scratch buffer. This is what I got:
Debugger entered--Lisp error: (error "Unknown \"nil\" back-end: Aborting export")
signal(error ("Unknown \"nil\" back-end: Aborting export"))
error("Unknown \"%s\" back-end: Aborting export" nil)
org-export-barf-if-invalid-backend(nil)
org-export-as(org-static-blog-post-bare nil nil nil nil)
(setq result (org-export-as 'org-static-blog-post-bare nil nil nil nil))
(progn (if buffer-exists (insert-buffer-substring buffer-exists) (insert-file-contents post-filename)) (org-mode) (goto-char (point-min)) (org-map-entries (lambda nil (setq org-map-continue-from (point)) (org-cut-subtree)) org-static-blog-no-post-tag) (setq result (org-export-as 'org-static-blog-post-bare nil nil nil nil)) (switch-to-buffer current-buffer) result)
(unwind-protect (progn (if buffer-exists (insert-buffer-substring buffer-exists) (insert-file-contents post-filename)) (org-mode) (goto-char (point-min)) (org-map-entries (lambda nil (setq org-map-continue-from (point)) (org-cut-subtree)) org-static-blog-no-post-tag) (setq result (org-export-as 'org-static-blog-post-bare nil nil nil nil)) (switch-to-buffer current-buffer) result) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (if buffer-exists (insert-buffer-substring buffer-exists) (insert-file-contents post-filename)) (org-mode) (goto-char (point-min)) (org-map-entries (lambda nil (setq org-map-continue-from (point)) (org-cut-subtree)) org-static-blog-no-post-tag) (setq result (org-export-as 'org-static-blog-post-bare nil nil nil nil)) (switch-to-buffer current-buffer) result) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(with-current-buffer temp-buffer (unwind-protect (progn (if buffer-exists (insert-buffer-substring buffer-exists) (insert-file-contents post-filename)) (org-mode) (goto-char (point-min)) (org-map-entries (lambda nil (setq org-map-continue-from (point)) (org-cut-subtree)) org-static-blog-no-post-tag) (setq result (org-export-as 'org-static-blog-post-bare nil nil nil nil)) (switch-to-buffer current-buffer) result) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-buffer temp-buffer (unwind-protect (progn (if buffer-exists (insert-buffer-substring buffer-exists) (insert-file-contents post-filename)) (org-mode) (goto-char (point-min)) (org-map-entries (lambda nil (setq org-map-continue-from (point)) (org-cut-subtree)) org-static-blog-no-post-tag) (setq result (org-export-as 'org-static-blog-post-bare nil nil nil nil)) (switch-to-buffer current-buffer) result) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(with-temp-buffer (if buffer-exists (insert-buffer-substring buffer-exists) (insert-file-contents post-filename)) (org-mode) (goto-char (point-min)) (org-map-entries (lambda nil (setq org-map-continue-from (point)) (org-cut-subtree)) org-static-blog-no-post-tag) (setq result (org-export-as 'org-static-blog-post-bare nil nil nil nil)) (switch-to-buffer current-buffer) result)
(let ((current-buffer (current-buffer)) (buffer-exists (org-static-blog-file-buffer post-filename)) (result nil)) (with-temp-buffer (if buffer-exists (insert-buffer-substring buffer-exists) (insert-file-contents post-filename)) (org-mode) (goto-char (point-min)) (org-map-entries (lambda nil (setq org-map-continue-from (point)) (org-cut-subtree)) org-static-blog-no-post-tag) (setq result (org-export-as 'org-static-blog-post-bare nil nil nil nil)) (switch-to-buffer current-buffer) result))
(save-excursion (let ((current-buffer (current-buffer)) (buffer-exists (org-static-blog-file-buffer post-filename)) (result nil)) (with-temp-buffer (if buffer-exists (insert-buffer-substring buffer-exists) (insert-file-contents post-filename)) (org-mode) (goto-char (point-min)) (org-map-entries (lambda nil (setq org-map-continue-from (point)) (org-cut-subtree)) org-static-blog-no-post-tag) (setq result (org-export-as 'org-static-blog-post-bare nil nil nil nil)) (switch-to-buffer current-buffer) result)))
(let ((org-html-doctype "html5") (org-html-html5-fancy t)) (save-excursion (let ((current-buffer (current-buffer)) (buffer-exists (org-static-blog-file-buffer post-filename)) (result nil)) (with-temp-buffer (if buffer-exists (insert-buffer-substring buffer-exists) (insert-file-contents post-filename)) (org-mode) (goto-char (point-min)) (org-map-entries (lambda nil (setq org-map-continue-from (point)) (org-cut-subtree)) org-static-blog-no-post-tag) (setq result (org-export-as 'org-static-blog-post-bare nil nil nil nil)) (switch-to-buffer current-buffer) result))))
org-static-blog-render-post-content("~/repos/blog/posts/2022-01-13-test.org")
(concat (org-static-blog-post-preamble post-filename) (org-static-blog-render-post-content post-filename) (org-static-blog-post-postamble post-filename))
(org-static-blog-template (org-static-blog-get-title post-filename) (concat (org-static-blog-post-preamble post-filename) (org-static-blog-render-post-content post-filename) (org-static-blog-post-postamble post-filename)) (org-static-blog-get-description post-filename))
(let ((current-buffer (current-buffer)) (buffer-exists (org-static-blog-file-buffer (org-static-blog-matching-publish-filename post-filename))) (result nil) (contents (org-static-blog-template (org-static-blog-get-title post-filename) (concat (org-static-blog-post-preamble post-filename) (org-static-blog-render-post-content post-filename) (org-static-blog-post-postamble post-filename)) (org-static-blog-get-description post-filename)))) (if buffer-exists (switch-to-buffer buffer-exists) (find-file (org-static-blog-matching-publish-filename post-filename))) (erase-buffer) (insert contents) (setq result (progn)) (basic-save-buffer) (unless buffer-exists (kill-buffer)) (switch-to-buffer current-buffer) result)
(save-excursion (let ((current-buffer (current-buffer)) (buffer-exists (org-static-blog-file-buffer (org-static-blog-matching-publish-filename post-filename))) (result nil) (contents (org-static-blog-template (org-static-blog-get-title post-filename) (concat (org-static-blog-post-preamble post-filename) (org-static-blog-render-post-content post-filename) (org-static-blog-post-postamble post-filename)) (org-static-blog-get-description post-filename)))) (if buffer-exists (switch-to-buffer buffer-exists) (find-file (org-static-blog-matching-publish-filename post-filename))) (erase-buffer) (insert contents) (setq result (progn)) (basic-save-buffer) (unless buffer-exists (kill-buffer)) (switch-to-buffer current-buffer) result))
(org-static-blog-with-find-file (org-static-blog-matching-publish-filename post-filename) (org-static-blog-template (org-static-blog-get-title post-filename) (concat (org-static-blog-post-preamble post-filename) (org-static-blog-render-post-content post-filename) (org-static-blog-post-postamble post-filename)) (org-static-blog-get-description post-filename)))
org-static-blog-publish-file("~/repos/blog/posts/2022-01-13-test.org")
org-static-blog-publish()
eval((org-static-blog-publish) nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
from org-static-blog.
what it looks to me is that (org-export-define-derived-backend 'org-static-blog-post-bare 'html :translate-alist '((template . (lambda (contents info) contents))))
failed to create a working backend on my setup.
Do you have any hint on why that may be?
from org-static-blog.
interesting enough I made it work by putting the (org-export-define-derived-backend 'org-static-blog-post-bare 'html :translate-alist '((template . (lambda (contents info) contents))))
above the call on the function org-static-blog-render-post-content
from org-static-blog.
interesting enough I made it work by putting the
(org-export-define-derived-backend 'org-static-blog-post-bare 'html :translate-alist '((template . (lambda (contents info) contents))))
above the call on the functionorg-static-blog-render-post-content
actually this is wrong. it works when i go to the file and execute the back end with C-x C-e. Not sure why this is happening but must some miss setup on my end
from org-static-blog.
I suspect that something about the way you import org-static-blog is different from the way it is meant to be done. The line you mentioned is usually automatically executed when org-static-blog is require
d, triggered by the autoload on the org-static-blog-publish-*
functions.
from org-static-blog.
that makes sense! I was using use-package to import the lib. It was fixed when I put the setup under :config
instead of :init
.
thanks for the help!
from org-static-blog.
Related Issues (20)
- Cannot output files to blog directory HOT 5
- Have `index.html` and other `html` files in different locations HOT 1
- Annoying warnings HOT 1
- Is this still maintained? HOT 3
- Last package (20221018.933) is broken. Just a typo. HOT 2
- Backend unset or broken: `org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export` HOT 4
- Is there a way to run multiple blogs with this package? HOT 1
- Icorrect table rendering HOT 6
- Show only post titles in multipost pages (no preview, no contents) HOT 4
- Is it possible to support navigation in tags.html HOT 1
- Why everything get's re rendered? HOT 6
- Add a publish-to (eg local/prod) function? HOT 2
- Perhaps use `org-collect-keywords` to extract date? HOT 5
- Drafts are published to directory relative to posts directory instead of drafts directory HOT 6
- Warning : 'the function ‘list-length’ is not known tobe defined.' HOT 1
- customize index page HOT 3
- Publish not working all the time HOT 1
- Generated blog posts goes to "example.com/$file-name" HOT 1
- Switch from ox-publish to org-static-blog HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org-static-blog.