Post by Samuel ChristieWhat do you think of the idea of having an emacs and org-mode equivalent
to gopher/gemini - a simple hypertext web where all the files are org
documents that link to other org documents? Has somone already done that?
The servers wouldn't have to do more than serve plain text files via
http, but maybe having some publication features from within emacs would
be nice (e.g., a command to copy or link the file to the server).
It would probably need a new URL method like org-http://, because
http:// is likely to try loading it in a web browser expecting html.
But maybe emacs and/or eww could be extended to handle a response type
of text/org?
From management perspective there is a built-in feature called
org-publish-project-alist. I use it for my little website
codeisgreat.org. I keep all the files in org mode and then run the
built-in export functionality to output content in HTML. It keeps all
the org interlinks intact. Here is my .dir-locals.el configuration for
the same,
--8<---------------cut here---------------start------------->8---
((nil
.
((mode . auto-fill)
(org-publish-project-alist
.
(("pages"
:base-directory "~/work/personal/codeisgreat/src/"
:publishing-directory "~/work/personal/codeisgreat/docs/"
:publishing-function org-html-publish-to-html
:html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\" />"
:with-toc nil
:html-preamble nil
:html-postamble t
:html-postamble-format (("en" "<p class=\"creator\">Created with %c</p>"))
:section-numbers nil
:html-indent t)
("notes"
:base-directory "~/work/personal/codeisgreat/src/notes"
:publishing-directory "~/work/personal/codeisgreat/docs/notes"
:publishing-function org-html-publish-to-html
:html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"../css/main.css\" />"
:with-toc nil
:html-preamble nil
:html-postamble t
:html-postamble-format (("en" "<p class=\"creator\">Created with %c</p>"))
:section-numbers nil
:html-indent t)
("css"
:base-directory "~/work/personal/codeisgreat/src/css"
:base-extension "css"
:publishing-directory "~/work/personal/codeisgreat/docs/css"
:publishing-function org-publish-attachment)
("images"
:base-directory "~/work/personal/codeisgreat/src/images"
:base-extension "jpeg\\|jpg\\|gif\\|png"
:publishing-directory "~/work/personal/codeisgreat/docs/images"
:publishing-function org-publish-attachment)
("other"
:base-directory "~/work/personal/codeisgreat/src/other"
:publishing-directory "~/work/personal/codeisgreat/docs/other"
:publishing-function org-publish-attachment)
("website"
:components ("pages" "notes" "images" "css" "other")))))))
--8<---------------cut here---------------end--------------->8---
Then I use org-publish from one of the source files,
--8<---------------cut here---------------start------------->8---
‘C-c C-e P p’ (‘org-publish-current-project’)
Publish the project containing the current file.
--8<---------------cut here---------------end--------------->8---