Update css
[worg.git] / worgtest-init.el
blob9834f431f01c62c2fc33d3f0771231b9a44a2bac
1 (mapc (lambda (e)
2 (add-to-list 'load-path e))
3 worg-add-load-path)
5 (require 'org)
6 (require 'htmlize)
8 ;; to have things work correctly in batch-mode
9 (require 'font-lock)
10 (require 'cc-mode)
11 (c-after-font-lock-init)
13 (custom-set-variables
14 ;; custom-set-variables was added by Custom.
15 ;; If you edit it by hand, you could mess it up, so be careful.
16 ;; Your init file should contain only one such instance.
17 ;; If there is more than one, they won't work right.
18 '(org-modules (quote (org-jsinfo)))
19 '(safe-local-variable-values (quote ((org-tags-column . -80) (org-export-latex-image-default-option . "width=30em") (org-html-head . "<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\" />") (org-html-head-extra . "<link rel=stylesheet href=\"org-faq.css\" type=\"text/css\"> <style type=\"text/css\"> </style>") (org-export-publishing-directory . "tmp") (org-html-head . "<link rel=stylesheet href=\"freeshell2.css\" type=\"text/css\"> <style type=\"text/css\"> .tag { color: red; font-weight:bold}</style>")))))
21 (show-paren-mode 1)
22 (menu-bar-mode 0)
23 (set-face-foreground 'font-lock-keyword-face "DeepSkyBlue1")
24 (set-face-foreground 'font-lock-string-face "pale goldenrod")
26 (setq make-backup-files nil
27 vc-handled-backends nil)
29 (setq org-export-default-language "en"
30 org-export-html-extension "html"
31 org-export-with-timestamps nil
32 org-export-with-section-numbers nil
33 org-export-with-tags 'not-in-toc
34 org-export-skip-text-before-1st-heading nil
35 org-export-with-sub-superscripts '{}
36 org-export-with-LaTeX-fragments t
37 org-export-with-archived-trees nil
38 org-export-highlight-first-table-line t
39 org-export-latex-listings-w-names nil
40 org-export-html-style-include-default nil
41 org-export-htmlize-output-type 'css
42 org-startup-folded nil
43 org-export-allow-BIND t
44 org-publish-list-skipped-files t
45 org-publish-use-timestamps-flag t
46 org-export-babel-evaluate nil
47 org-confirm-babel-evaluate nil)
49 ;; re-export everything regardless of whether or not it's been modified
50 (setq org-publish-use-timestamps-flag nil)
52 (defun set-org-publish-project-alist ()
53 (interactive)
54 (setq org-publish-project-alist
55 `(("worg" :components ("worg-org-faq" "worg-pages" "worg-code" "worg-color-themes" "worg-images-dir" "worg-images" "worg-sources" "worg-extra" "worg-bibtex"))
56 ("worg-org-faq"
57 :base-directory ,worg-base-directory
58 :base-extension "dummy"
59 :include ("org-faq.org")
60 :html-extension "html"
61 :publishing-directory ,worg-publish-directory
62 :publishing-function org-html-publish-to-html
63 :section-numbers nil
64 :table-of-contents nil
65 :style "<link rel=\"stylesheet\" title=\"Standard\" href=\"/worg/style/worg.css\" type=\"text/css\" />
66 <link rel=\"alternate stylesheet\" title=\"Zenburn\" href=\"/worg/style/worg-zenburn.css\" type=\"text/css\" />
67 <link rel=\"alternate stylesheet\" title=\"Classic\" href=\"/worg/style/worg-classic.css\" type=\"text/css\" />
68 <link rel=\"stylesheet\" href=\"https://orgmode.org/css/lightbox.css\" type=\"text/css\" media=\"screen\" />
69 <link rel=\"SHORTCUT ICON\" href=\"/org-mode-unicorn.ico\" type=\"image/x-icon\" />
70 <link rel=\"icon\" href=\"/org-mode-unicorn.ico\" type=\"image/ico\" />"
71 :recursive t
72 :html-preamble ,(org-get-file-contents (concat worg-base "preamble.html"))
73 :html-postamble "<div id=\"show_source\"><input type=\"button\" value=\"Show Org source\" onClick='show_org_source()'></div><div id=\"license\"><p>Documentation from the https://orgmode.org/worg/ website (either in its HTML format or in its Org format) is licensed under the <a href=\"http://www.gnu.org/copyleft/fdl.html\">GNU Free Documentation License version 1.3</a> or later. The code examples and css stylesheets are licensed under the <a href=\"http://www.gnu.org/licenses/gpl.html\">GNU General Public License v3</a> or later.</p></div>"
75 ("worg-pages"
76 :base-directory ,worg-base-directory
77 :base-extension "org"
78 :exclude "FIXME"
79 :makeindex t
80 :auto-sitemap nil
81 :sitemap-ignore-case t
82 :html-extension "html"
83 :publishing-directory ,worg-publish-directory
84 :publishing-function (org-html-publish-to-html)
85 :htmlized-source nil
86 :section-numbers nil
87 :table-of-contents nil
88 :style "<link rel=\"stylesheet\" title=\"Standard\" href=\"/worg/style/worg.css\" type=\"text/css\" />
89 <link rel=\"alternate stylesheet\" title=\"Zenburn\" href=\"/worg/style/worg-zenburn.css\" type=\"text/css\" />
90 <link rel=\"alternate stylesheet\" title=\"Classic\" href=\"/worg/style/worg-classic.css\" type=\"text/css\" />
91 <link rel=\"stylesheet\" href=\"https://orgmode.org/css/lightbox.css\" type=\"text/css\" media=\"screen\" />
92 <link rel=\"SHORTCUT ICON\" href=\"/org-mode-unicorn.ico\" type=\"image/x-icon\" />
93 <link rel=\"icon\" href=\"/org-mode-unicorn.ico\" type=\"image/ico\" />"
94 :recursive t
95 :html-preamble ,(org-get-file-contents (concat worg-base "preamble.html"))
96 :html-postamble "<div id=\"show_source\"><input type=\"button\" value=\"Show Org source\" onClick='show_org_source()'></div><div id=\"license\"><p>Documentation from the https://orgmode.org/worg/ website (either in its HTML format or in its Org format) is licensed under the <a href=\"http://www.gnu.org/copyleft/fdl.html\">GNU Free Documentation License version 1.3</a> or later. The code examples and css stylesheets are licensed under the <a href=\"http://www.gnu.org/licenses/gpl.html\">GNU General Public License v3</a> or later.</p></div>"
98 ("worg-code"
99 :base-directory ,worg-base-code-directory
100 :base-extension "html\\|css\\|png\\|js\\|bz2\\|el\\|sty\\|awk\\|pl"
101 :html-extension "html"
102 :publishing-directory ,(concat worg-htmlroot "/code/")
103 :recursive t
104 :publishing-function org-publish-attachment)
105 ("worg-color-themes"
106 :base-directory ,worg-base-color-themes-directory
107 :base-extension "el"
108 :html-extension "html"
109 :publishing-directory ,(concat worg-htmlroot "/code/elisp/")
110 :recursive t
111 :publishing-function org-publish-attachment)
112 ("worg-images-dir"
113 :base-directory ,worg-base-images-directory
114 :base-extension "png\\|jpg\\|gif\\|pdf\\|cvs\\|css"
115 :publishing-directory ,(concat worg-htmlroot "/images/")
116 :recursive t
117 :publishing-function org-publish-attachment)
118 ("worg-images"
119 :base-directory ,worg-base-directory
120 :base-extension "png\\|jpg\\|gif\\|pdf\\|csv\\|css\\|tex"
121 :publishing-directory ,worg-publish-directory
122 :recursive t
123 :publishing-function org-publish-attachment)
124 ("worg-sources"
125 :base-directory ,worg-base-directory
126 :base-extension "org"
127 :publishing-directory ,(concat worg-htmlroot "/sources/")
128 :recursive t
129 :publishing-function org-publish-attachment)
130 ("worg-extra"
131 :base-directory ,worg-base-directory
132 :base-extension "css"
133 :publishing-directory ,worg-publish-directory
134 :publishing-function org-publish-attachment)
135 ("worg-bibtex"
136 :base-directory ,(concat worg-base "org-contrib/bibtex/")
137 :base-extension "bib"
138 :publishing-directory ,(concat worg-htmlroot "/org-contrib/bibtex/")
139 :recursive nil
140 :publishing-function org-publish-attachment)
143 (setq worg-base-directory worg-base)
144 (setq worg-base-code-directory (concat worg-base "code/"))
145 (setq worg-base-color-themes-directory (concat worg-base "code/elisp/"))
146 (setq worg-base-images-directory (concat worg-base "images/"))
147 (setq worg-publish-directory worg-htmlroot)
148 (set-org-publish-project-alist)
150 (defun worg-fix-symbol-table ()
151 (when (string-match "org-symbols\\.html" buffer-file-name)
152 (goto-char (point-min))
153 (while (re-search-forward "<td>&amp;\\([^<;]+;\\)" nil t)
154 (replace-match (concat "<td>&" (match-string 1)) t t))))
156 (defun publish-worg-old nil
157 "Publish Worg."
158 (interactive)
159 (add-hook 'org-publish-after-export-hook 'worg-fix-symbol-table)
160 (let ((org-format-latex-signal-error nil)
161 (worg-base-directory worg-base)
162 (worg-base-code-directory (concat worg-base "code/"))
163 (worg-base-color-themes-directory (concat worg-base "code/elisp/"))
164 (worg-base-images-directory (concat worg-base "images/"))
165 (worg-publish-directory worg-htmlroot))
166 (set-org-publish-project-alist)
167 (org-publish-project "worg")))
169 (defun publish-worg nil
170 "Publish Worg."
171 (interactive)
172 (add-hook 'org-publish-after-export-hook 'worg-fix-symbol-table)
173 (let ((org-format-latex-signal-error nil)
174 (worg-base-directory worg-base)
175 (worg-base-code-directory (concat worg-base "code/"))
176 (worg-base-color-themes-directory (concat worg-base "code/elisp/"))
177 (worg-base-images-directory (concat worg-base "images/"))
178 (worg-publish-directory worg-htmlroot))
179 (set-org-publish-project-alist)
180 (message "Emacs %s" emacs-version)
181 (org-version)
182 (org-publish-project "worg")))
184 (defun parse-org-quotes ()
185 "Create ~/orgmode.org/org-quotes.js from org-quotes.org."
186 (interactive)
187 (load (concat worg-base "code/elisp/worg-fortune.el"))
188 (worg-write-fortune-file
189 (concat worg-base "org-quotes.org")
190 "~/orgmode.org/org-quotes.js"
192 "r_text[%d] = \"%s\";" "\n"
193 'worg-fortune-insert-javascript-pre
194 'worg-fortune-insert-javascript-post))