Skip to content

Latest commit

 

History

History
109 lines (91 loc) · 3.32 KB

setup.org

File metadata and controls

109 lines (91 loc) · 3.32 KB

Development

When the document is tangled, we ensure that headings that end with “:” is prefixed with an additional semi-colon and run linting of the final output.

(defun package-post-tangle-hook ()
  "Post-process and lint the final output."
  (when (s-prefix? "azure" (file-name-base (buffer-file-name (current-buffer))))
    (with-current-buffer (current-buffer)
      (goto-char (point-min))
      (beginning-of-line)
      (insert ";")
      (end-of-line)
      (insert " -*- coding: utf-8; lexical-binding: t; -*-")
      (save-excursion
	(while (re-search-forward "^;; \\([A-Z][^:]+\\):$" nil 'noerror)
          (replace-match ";;; \\1:" 'fixedcase)
	  (forward-line -1)))
      (eval-buffer)
      (save-buffer)
      (package-lint-current-buffer))))

(add-hook 'org-babel-post-tangle-hook 'package-post-tangle-hook)

Publishing

(add-to-list 'org-publish-project-alist
	     `("azure-html-docs"
	       :base-directory ,default-directory
	       :publishing-directory ,(expand-file-name "docs" default-directory)
	       :publishing-function org-html-publish-to-html
	       :section-numbers nil
	       :htmlize-output-type "css"
	       :htmlized-source t))

(setq org-export-html-style-include-scripts ""
      org-export-html-style-include-default ""
      org-html-style ""
      org-html-style-default ""
      org-html-mathjax-template ""
      org-html-postamble nil
      org-html-htmlize-output-type 'css
      ;; Ignore auxiliary files made when publishing pdf's
      org-latex-logfiles-extensions
      (quote ("lof" "lot" "tex" "aux" "idx" "log" "out" "toc" "nav" "snm" "vrb"
              "dvi" "fdb_latexmk" "blg" "brf" "fls" "entoc" "ps" "spl" "bbl"))
      ;; Enforce correct indentation
      org-indent-indentation-per-level 0
      org-src-preserve-indentation nil
      org-edit-src-content-indentation 0
      org-adapt-indentation nil)
:root {
    margin: 0;
    padding: 0;
}
console.log('works');

License

(format-time-string "%Y")
Copyright (C) <<year()>> Henrik Kjerringvåg

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.