Set up documentation publishing
This commit is contained in:
parent
13c5b1d24b
commit
1070d4b56a
|
@ -1,5 +1,6 @@
|
|||
auto-save-list/
|
||||
elpa/
|
||||
doc/export/
|
||||
ac-comphist.dat
|
||||
eproject.lst
|
||||
.smex-items
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
;;; core-spacemacs.el --- Spacemacs Core File
|
||||
;;
|
||||
;; Copyright (c) 2012-2014 Sylvain Benner
|
||||
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(require 'org)
|
||||
(require 'ox-publish)
|
||||
(require 's)
|
||||
(require 'dash)
|
||||
|
||||
(defvar spacemacs--category-names
|
||||
'(("config-files" . "Configuration files")
|
||||
("email" . "E-mail")
|
||||
("irc" . "IRC")
|
||||
("lang" . "Programming languages"))
|
||||
"Special names for categories. Used to generate the layers list.")
|
||||
|
||||
(defun spacemacs//generate-layers-from-path (path level)
|
||||
"Add all layers found in PATH to the current buffer, at org level LEVEL."
|
||||
(let* ((all-subs (directory-files path t nil nil))
|
||||
(layers (-filter (lambda (p)
|
||||
(eq 'layer (configuration-layer//directory-type p)))
|
||||
all-subs))
|
||||
(categories (-filter (lambda (p)
|
||||
(eq 'category (configuration-layer//directory-type p)))
|
||||
all-subs)))
|
||||
(message "%S" layers)
|
||||
(dolist (l layers)
|
||||
(let ((layer-name (file-name-nondirectory l))
|
||||
(target-path (concat (file-relative-name
|
||||
l (concat user-emcas-directory "layers"))
|
||||
"/README.org")))
|
||||
(insert (format "- [[file:%s][%s]]\n" target-path layer-name))))
|
||||
(dolist (c categories)
|
||||
(let* ((category-name (substring (file-name-nondirectory c) 1))
|
||||
(pretty-name (or (cdr (assoc category-name spacemacs--category-names))
|
||||
(s-capitalize (replace-regexp-in-string
|
||||
"-" " " category-name)))))
|
||||
(message "%S" category-name)
|
||||
(unless (string= "distribution" category-name)
|
||||
(insert (format "\n%s %s\n" level pretty-name))
|
||||
(spacemacs/generate-layers-from-path c (concat level "*"))
|
||||
)))))
|
||||
|
||||
(defun spacemacs//generate-layers-file ()
|
||||
"Generate the layers list file."
|
||||
(interactive)
|
||||
(with-temp-buffer
|
||||
(org-mode)
|
||||
(insert "#+TITLE: Configuration layers\n\n")
|
||||
(insert "* Table of Contents\n")
|
||||
(org-set-tags-to '("TOC_4_org" "noexport"))
|
||||
(insert "* General layers\n")
|
||||
(spacemacs//generate-layers-from-path configuration-layer-directory "*")
|
||||
(write-file (concat user-emacs-directory "layers/LAYERS.org"))))
|
||||
|
||||
(defun spacemacs/publish-doc ()
|
||||
"Publishe the documentation to doc/export/."
|
||||
(interactive)
|
||||
(let* ((header
|
||||
"<link rel=\"stylesheet\" type=\"text/css\"
|
||||
href=\"http://www.pirilampo.org/styles/readtheorg/css/htmlize.css\"/>
|
||||
<link rel=\"stylesheet\" type=\"text/css\"
|
||||
href=\"http://www.pirilampo.org/styles/readtheorg/css/readtheorg.css\"/>
|
||||
<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js\"></script>
|
||||
<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js\"></script>
|
||||
<script type=\"text/javascript\"
|
||||
src=\"http://www.pirilampo.org/styles/lib/js/jquery.stickytableheaders.js\"></script>
|
||||
<script type=\"text/javascript\"
|
||||
src=\"http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js\"></script>")
|
||||
(publish-target (concat spacemacs-docs-directory "export/"))
|
||||
(org-publish-project-alist
|
||||
`(("spacemacs"
|
||||
:components ("spacemacs-doc"
|
||||
"spacemacs-doc-static"
|
||||
"layers-doc"
|
||||
"layers-doc-static"))
|
||||
("spacemacs-doc"
|
||||
:base-directory ,spacemacs-docs-directory
|
||||
:base-extension "org"
|
||||
:publishing-directory ,(concat publish-target "doc/")
|
||||
:publishing-function org-html-publish-to-html
|
||||
:headline-levels 4
|
||||
:html-head ,header)
|
||||
("layers-doc"
|
||||
:base-directory ,(concat user-emacs-directory "layers/")
|
||||
:base-extension "org"
|
||||
:recursive t
|
||||
:publishing-directory ,(concat publish-target "layers/")
|
||||
:publishing-function org-html-publish-to-html
|
||||
:preparation-function spacemacs/generate-layers-file
|
||||
:exclude "extensions"
|
||||
:html-head ,header)
|
||||
("spacemacs-doc-static"
|
||||
:base-directory ,spacemacs-docs-directory
|
||||
:base-extension "png"
|
||||
:recursive t
|
||||
:publishing-directory ,(concat publish-target "doc/")
|
||||
:publishing-function org-publish-attachment)
|
||||
("layers-doc-static"
|
||||
:base-directory ,(concat user-emacs-directory "layers/")
|
||||
:base-extension "png"
|
||||
:recursive t
|
||||
:publishing-directory ,(concat publish-target "layers/")
|
||||
:publishing-function org-publish-attachment))))
|
||||
(org-publish-project "spacemacs")))
|
||||
|
||||
(provide 'core-documentation)
|
|
@ -1,4 +1,4 @@
|
|||
#+SETUPFILE: theme-readtheorg.setup
|
||||
#+TITLE: Contribute to Spacemacs
|
||||
|
||||
* Contribute to Spacemacs :TOC_4_org:noexport:
|
||||
- [[Pull Request Guidelines][Pull Request Guidelines]]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#+SETUPFILE: theme-readtheorg.setup
|
||||
#+TITLE: Spacemacs Conventions
|
||||
|
||||
* Spacemacs conventions :TOC_4_org:noexport:
|
||||
- [[Code guidelines][Code guidelines]]
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#+SETUPFILE: theme-readtheorg.setup
|
||||
#+TITLE: Spacemacs documentation
|
||||
|
||||
* Spacemacs documentation :TOC_4_org:noexport:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#+SETUPFILE: theme-readtheorg.setup
|
||||
#+TITLE: Frequently Asked Questions
|
||||
|
||||
* FAQ :TOC_4_org:noexport:
|
||||
- [[Common][Common]]
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#+TITLE: Configuration layers
|
||||
|
||||
* Configuration Layers :TOC_4_org:noexport:
|
||||
- [[Introduction][Introduction]]
|
||||
- [[Nomenclature][Nomenclature]]
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#+TITLE: Quick start
|
||||
|
||||
* Configuration :TOC_4_org:noexport:
|
||||
- [[Configuration layers][Configuration layers]]
|
||||
- [[Dotfile (.spacemacs)][Dotfile (.spacemacs)]]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#+SETUPFILE: theme-readtheorg.setup
|
||||
#+TITLE: Migrating from Vim
|
||||
|
||||
* Migrating from vim :TOC_4_org:noexport:
|
||||
- [[Purpose of this document][Purpose of this document]]
|
||||
|
|
|
@ -0,0 +1,144 @@
|
|||
#+TITLE: Configuration layers
|
||||
|
||||
* Table of Contents :TOC_4_org:noexport:
|
||||
- [[General layers][General layers]]
|
||||
- [[Configuration files][Configuration files]]
|
||||
- [[E-mail][E-mail]]
|
||||
- [[Frameworks][Frameworks]]
|
||||
- [[Fun][Fun]]
|
||||
- [[IRC][IRC]]
|
||||
- [[Keyboard layouts][Keyboard layouts]]
|
||||
- [[Programming languages][Programming languages]]
|
||||
- [[Source control][Source control]]
|
||||
- [[Tools][Tools]]
|
||||
- [[Vim][Vim]]
|
||||
- [[Window management][Window management]]
|
||||
|
||||
* General layers
|
||||
- [[file:auto-completion/README.org][auto-completion]]
|
||||
- [[file:better-defaults/README.org][better-defaults]]
|
||||
- [[file:chinese/README.org][chinese]]
|
||||
- [[file:chrome/README.org][chrome]]
|
||||
- [[file:colors/README.org][colors]]
|
||||
- [[file:cscope/README.org][cscope]]
|
||||
- [[file:deft/README.org][deft]]
|
||||
- [[file:finance/README.org][finance]]
|
||||
- [[file:floobits/README.org][floobits]]
|
||||
- [[file:geolocation/README.org][geolocation]]
|
||||
- [[file:gtags/README.org][gtags]]
|
||||
- [[file:ibuffer/README.org][ibuffer]]
|
||||
- [[file:jabber/README.org][jabber]]
|
||||
- [[file:nixos/README.org][nixos]]
|
||||
- [[file:org/README.org][org]]
|
||||
- [[file:osx/README.org][osx]]
|
||||
- [[file:prodigy/README.org][prodigy]]
|
||||
- [[file:restclient/README.org][restclient]]
|
||||
- [[file:search-engine/README.org][search-engine]]
|
||||
- [[file:semantic/README.org][semantic]]
|
||||
- [[file:shell/README.org][shell]]
|
||||
- [[file:smex/README.org][smex]]
|
||||
- [[file:spell-checking/README.org][spell-checking]]
|
||||
- [[file:spotify/README.org][spotify]]
|
||||
- [[file:syntax-checking/README.org][syntax-checking]]
|
||||
- [[file:themes-megapack/README.org][themes-megapack]]
|
||||
- [[file:theming/README.org][theming]]
|
||||
|
||||
* Configuration files
|
||||
- [[file:+config-files/ansible/README.org][ansible]]
|
||||
- [[file:+config-files/dockerfile/README.org][dockerfile]]
|
||||
- [[file:+config-files/puppet/README.org][puppet]]
|
||||
- [[file:+config-files/salt/README.org][salt]]
|
||||
- [[file:+config-files/terraform/README.org][terraform]]
|
||||
|
||||
* E-mail
|
||||
- [[file:+email/gnus/README.org][gnus]]
|
||||
|
||||
* Frameworks
|
||||
- [[file:+frameworks/django/README.org][django]]
|
||||
- [[file:+frameworks/react/README.org][react]]
|
||||
- [[file:+frameworks/ruby-on-rails/README.org][ruby-on-rails]]
|
||||
|
||||
* Fun
|
||||
- [[file:+fun/emoji/README.org][emoji]]
|
||||
- [[file:+fun/games/README.org][games]]
|
||||
- [[file:+fun/xkcd/README.org][xkcd]]
|
||||
|
||||
* IRC
|
||||
- [[file:+irc/erc/README.org][erc]]
|
||||
- [[file:+irc/rcirc/README.org][rcirc]]
|
||||
|
||||
* Keyboard layouts
|
||||
- [[file:+keyboard-layouts/bepo/README.org][bepo]]
|
||||
|
||||
* Programming languages
|
||||
- [[file:+lang/agda/README.org][agda]]
|
||||
- [[file:+lang/asciidoc/README.org][asciidoc]]
|
||||
- [[file:+lang/autohotkey/README.org][autohotkey]]
|
||||
- [[file:+lang/c-c++/README.org][c-c++]]
|
||||
- [[file:+lang/clojure/README.org][clojure]]
|
||||
- [[file:+lang/common-lisp/README.org][common-lisp]]
|
||||
- [[file:+lang/csharp/README.org][csharp]]
|
||||
- [[file:+lang/d/README.org][d]]
|
||||
- [[file:+lang/elixir/README.org][elixir]]
|
||||
- [[file:+lang/elm/README.org][elm]]
|
||||
- [[file:+lang/emacs-lisp/README.org][emacs-lisp]]
|
||||
- [[file:+lang/erlang/README.org][erlang]]
|
||||
- [[file:+lang/ess/README.org][ess]]
|
||||
- [[file:+lang/extra-langs/README.org][extra-langs]]
|
||||
- [[file:+lang/fsharp/README.org][fsharp]]
|
||||
- [[file:+lang/go/README.org][go]]
|
||||
- [[file:+lang/haskell/README.org][haskell]]
|
||||
- [[file:+lang/html/README.org][html]]
|
||||
- [[file:+lang/idris/README.org][idris]]
|
||||
- [[file:+lang/ipython-notebook/README.org][ipython-notebook]]
|
||||
- [[file:+lang/java/README.org][java]]
|
||||
- [[file:+lang/javascript/README.org][javascript]]
|
||||
- [[file:+lang/latex/README.org][latex]]
|
||||
- [[file:+lang/lua/README.org][lua]]
|
||||
- [[file:+lang/markdown/README.org][markdown]]
|
||||
- [[file:+lang/nim/README.org][nim]]
|
||||
- [[file:+lang/ocaml/README.org][ocaml]]
|
||||
- [[file:+lang/php/README.org][php]]
|
||||
- [[file:+lang/purescript/README.org][purescript]]
|
||||
- [[file:+lang/python/README.org][python]]
|
||||
- [[file:+lang/racket/README.org][racket]]
|
||||
- [[file:+lang/ruby/README.org][ruby]]
|
||||
- [[file:+lang/rust/README.org][rust]]
|
||||
- [[file:+lang/scala/README.org][scala]]
|
||||
- [[file:+lang/scheme/README.org][scheme]]
|
||||
- [[file:+lang/shell-scripts/README.org][shell-scripts]]
|
||||
- [[file:+lang/sml/README.org][sml]]
|
||||
- [[file:+lang/sql/README.org][sql]]
|
||||
- [[file:+lang/typescript/README.org][typescript]]
|
||||
- [[file:+lang/vimscript/README.org][vimscript]]
|
||||
- [[file:+lang/windows-scripts/README.org][windows-scripts]]
|
||||
- [[file:+lang/yaml/README.org][yaml]]
|
||||
|
||||
* Source control
|
||||
- [[file:+source-control/git/README.org][git]]
|
||||
- [[file:+source-control/github/README.org][github]]
|
||||
- [[file:+source-control/perforce/README.org][perforce]]
|
||||
- [[file:+source-control/version-control/README.org][version-control]]
|
||||
|
||||
* Tools
|
||||
- [[file:+tools/dash/README.org][dash]]
|
||||
- [[file:+tools/evernote/README.org][evernote]]
|
||||
- [[file:+tools/fasd/README.org][fasd]]
|
||||
- [[file:+tools/pandoc/README.org][pandoc]]
|
||||
- [[file:+tools/ranger/README.org][ranger]]
|
||||
- [[file:+tools/tmux/README.org][tmux]]
|
||||
- [[file:+tools/vagrant/README.org][vagrant]]
|
||||
- [[file:+tools/wakatime/README.org][wakatime]]
|
||||
- [[file:+tools/ycmd/README.org][ycmd]]
|
||||
|
||||
* Vim
|
||||
- [[file:+vim/evil-commentary/README.org][evil-commentary]]
|
||||
- [[file:+vim/evil-snipe/README.org][evil-snipe]]
|
||||
- [[file:+vim/unimpaired/README.org][unimpaired]]
|
||||
- [[file:+vim/vim-empty-lines/README.org][vim-empty-lines]]
|
||||
- [[file:+vim/vim-powerline/README.org][vim-powerline]]
|
||||
- [[file:+vim/vinegar/README.org][vinegar]]
|
||||
|
||||
* Window management
|
||||
- [[file:+window-management/eyebrowse/README.org][eyebrowse]]
|
||||
- [[file:+window-management/perspectives/README.org][perspectives]]
|
Loading…
Reference in New Issue