[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 78fe979 22/36: Support htmlize.el in Rakefile doc target
From: |
Noam Postavsky |
Subject: |
[elpa] master 78fe979 22/36: Support htmlize.el in Rakefile doc target |
Date: |
Sat, 11 Jun 2016 19:21:11 +0000 (UTC) |
branch: master
commit 78fe979b7b4634ce2ef4d89363f1e1471a901230
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Support htmlize.el in Rakefile doc target
Htmlized output can now be produced by
rake doc[/path/to/htmlize/]
* Rakefile (doc): Add htmlize argument.
* doc/yas-doc-helper.el (yas--generate-html-batch): Tell org to use css
selectors only when exporting htmlized faces.
* doc/stylesheets/manual.css: Add styles for faces used by org export.
---
Rakefile | 8 ++++++--
doc/stylesheets/manual.css | 33 +++++++++++++++++++++++++++++++++
doc/yas-doc-helper.el | 3 ++-
3 files changed, 41 insertions(+), 3 deletions(-)
diff --git a/Rakefile b/Rakefile
index 9986b75..f88237b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -45,8 +45,12 @@ task :release => [:package, 'doc:archive'] do
end
desc "Generate document"
-task :doc do
- sh "#{$EMACS} -Q -L . --batch -l doc/yas-doc-helper.el" +
+task :doc, [:htmlize] do |t, args|
+ load_path = '-L .'
+ if args[:htmlize]
+ load_path += " -L #{args[:htmlize]}"
+ end
+ sh "#{$EMACS} -Q #{load_path} --batch -l doc/yas-doc-helper.el" +
" -f yas--generate-html-batch"
end
diff --git a/doc/stylesheets/manual.css b/doc/stylesheets/manual.css
index f2677c5..9580347 100644
--- a/doc/stylesheets/manual.css
+++ b/doc/stylesheets/manual.css
@@ -24,3 +24,36 @@ code {
margin-left: 5%;
margin-right: 10%;
}
+
+/* Styles for htmlize.el fontification. */
+
+.org-comment { color: #005000; } /* font-lock-comment-face */
+.org-keyword { font-weight: bold; } /* font-lock-keyword-face */
+.org-string { color: #8b0000; } /* font-lock-string-face */
+.org-warning { color: #ff8c00;
+ font-weight: bold; } /* warning */
+.org-warning-1 { color: #ff0000;
+ font-weight: bold; } /* font-lock-warning-face */
+.org-preprocessor { color: #483d8b; } /* font-lock-preprocessor-face */
+.org-constant { color: #008b8b; } /* font-lock-constant-face */
+.org-function-name { color: #0000ff; } /* font-lock-function-name-face */
+.org-type { color: #228b22; } /* font-lock-type-face */
+.org-variable-name { color: #a0522d; } /* font-lock-variable-name-face */
+
+.org-rst-adornment { color: #a020f0; } /* rst-adornment */
+.org-rst-block { color: #a020f0; } /* rst-block */
+.org-rst-comment { color: #b22222; } /* rst-comment */
+.org-rst-definition { color: #0000ff; } /* rst-definition */
+.org-rst-directive { color: #483d8b; } /* rst-directive */
+.org-rst-emphasis1 { font-style: italic; } /* rst-emphasis1 */
+.org-rst-emphasis2 { font-weight: bold; } /* rst-emphasis2 */
+.org-rst-external { color: #228b22; } /* rst-external */
+.org-rst-level-1 { background-color: #d9d9d9; } /* rst-level-1 */
+.org-rst-level-2 { background-color: #c7c7c7; } /* rst-level-2 */
+.org-rst-level-3 { background-color: #b5b5b5; } /* rst-level-3 */
+.org-rst-level-4 { background-color: #a3a3a3; } /* rst-level-4 */
+.org-rst-level-5 { background-color: #919191; } /* rst-level-5 */
+.org-rst-level-6 { background-color: #7f7f7f; } /* rst-level-6 */
+.org-rst-literal { color: #8b2252; } /* rst-literal */
+.org-rst-reference { color: #a0522d; } /* rst-reference */
+.org-rst-transition { color: #a020f0; } /* rst-transition */
diff --git a/doc/yas-doc-helper.el b/doc/yas-doc-helper.el
index f4cd49b..8459eb7 100644
--- a/doc/yas-doc-helper.el
+++ b/doc/yas-doc-helper.el
@@ -155,7 +155,8 @@
(let ((org-publish-use-timestamps-flag nil)
(org-export-copy-to-kill-ring nil)
(org-confirm-babel-evaluate nil)
- (make-backup-files nil))
+ (make-backup-files nil)
+ (org-html-htmlize-output-type 'css))
(org-publish "yasnippet" 'force)))
- [elpa] master 6180cc4 28/36: Fix field transform application in yas-next-field, (continued)
- [elpa] master 6180cc4 28/36: Fix field transform application in yas-next-field, Noam Postavsky, 2016/06/11
- [elpa] master 146b161 25/36: Don't indent empty lines in snippet expansion, Noam Postavsky, 2016/06/11
- [elpa] master e9406f5 26/36: Document $> and fix escaping, Noam Postavsky, 2016/06/11
- [elpa] master 6f97316 27/36: Fix outdated and misformatted docs, Noam Postavsky, 2016/06/11
- [elpa] master bd30a30 04/36: yas-dont-activate is a hook, Noam Postavsky, 2016/06/11
- [elpa] master c1b2cb7 17/36: Improve documentation for new register option, Noam Postavsky, 2016/06/11
- [elpa] master 4c6064c 01/36: Avoid potential problems with user's hooks, Noam Postavsky, 2016/06/11
- [elpa] master 5d44a9f 19/36: Revert "Disable region wrapping for trigger key expansion", Noam Postavsky, 2016/06/11
- [elpa] master beb2ba4 21/36: Fix fields following $0 + region insertion, Noam Postavsky, 2016/06/11
- [elpa] master eeb4b62 14/36: Add new tests for multi-line mirror indentation, Noam Postavsky, 2016/06/11
- [elpa] master 78fe979 22/36: Support htmlize.el in Rakefile doc target,
Noam Postavsky <=
- [elpa] master 7f03a23 07/36: Change Emacs installation method for Travis CI, Noam Postavsky, 2016/06/11
- [elpa] master 0d79e69 30/36: Extra measures to prevent premature yas-minor-mode, Noam Postavsky, 2016/06/11
- [elpa] master 497867c 32/36: Rename yas-backport-obsolete-alias, Noam Postavsky, 2016/06/11
- [elpa] master e23a053 34/36: Avoid bug in insert-file-contents with REPLACE=t, Noam Postavsky, 2016/06/11
- [elpa] master 567ada0 06/36: Decide field clearing based on command's effect, Noam Postavsky, 2016/06/11
- [elpa] master bdfab67 24/36: Make yasnippet less chatty, Noam Postavsky, 2016/06/11
- [elpa] master bbfa1f0 31/36: Add yas-backport-obsolete-alias option, Noam Postavsky, 2016/06/11
- [elpa] master bfe14f1 10/36: Test and fix problem with mirror+autofill, Noam Postavsky, 2016/06/11
- [elpa] master df229b9 23/36: Fix some doc formatting, Noam Postavsky, 2016/06/11
- [elpa] master 1b8f5b7 29/36: Don't use major-mode syntax-propertize-function, Noam Postavsky, 2016/06/11