emacsorphanage / org-page

[INACTIVE] A static site generator based on Emacs and org mode.
673 stars 99 forks source link

Site Preview #143

Closed noctuid closed 8 years ago

noctuid commented 9 years ago

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.

sillykelvin commented 9 years ago

Sorry, no preview inside org-page, I always publish the site into nginx to preview it.

rudolfochrist commented 9 years ago

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.

xcodebuild commented 8 years ago
(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.

rudolfochrist commented 8 years ago

@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.

xcodebuild commented 8 years ago

@rudolfochrist @kelvinh RR ready,waiting for merging

sillykelvin commented 8 years ago

That's really a great solution, thank you, I will verify the PR later.

rudolfochrist commented 8 years ago

Awesome :+1:

noctuid commented 8 years ago

@CodeFalling Thanks! I love the idea to use simple-httpd.