Closed noctuid closed 8 years ago
Sorry, no preview inside org-page, I always publish the site into nginx to preview it.
I use this function for previewing new posts:
(defun op/do-preview ()
(interactive)
(let ((op/repository-org-branch (car (vc-git-branches))))
(op/do-publication nil nil "~/Desktop/org-page-preview/preview" nil nil)))
Then I serve the files with http-server locally.
(defun codefalling/test-org-page ()
"test the org-page's main repository"
(interactive)
(op/do-publication t nil "~/codefalling.com.build")
(httpd-serve-directory "~/codefalling.com.build")
(browse-url (format "http://%s:%d" system-name httpd-port)))
Same with @rudolfochrist,got this idea from emacs-china
simple-httpd required.
@CodeFalling I really like that EMACS-only solution. Do you think you've got the time to turn this into a pull request? I think many people would profit from it.
@rudolfochrist @kelvinh RR ready,waiting for merging
That's really a great solution, thank you, I will verify the PR later.
Awesome :+1:
@CodeFalling Thanks! I love the idea to use simple-httpd.
Is there some way to preview the site before committing/pushing? It would be nice to see what the different themes look like as well as how the posts look when styled before publishing.