Create the layer README on create-layer

When using `configuration-layer/create-layer`, the `README.org` file is
not created from the template. This change corrects this.

Close #3259
This commit is contained in:
Fabien Dubosson 2015-11-16 14:13:06 +01:00
parent 7a8487cd68
commit 028c53fbd7
6 changed files with 7 additions and 6 deletions

View File

@ -215,8 +215,9 @@ layer directory."
"this layer already exists.") name))
(t
(make-directory layer-dir t)
(configuration-layer//copy-template name "extensions" layer-dir)
(configuration-layer//copy-template name "packages" layer-dir)
(configuration-layer//copy-template name "extensions.el" layer-dir)
(configuration-layer//copy-template name "packages.el" layer-dir)
(configuration-layer//copy-template name "README.org" layer-dir)
(message "Configuration layer \"%s\" successfully created." name)))))
(defun configuration-layer/make-layer (layer)
@ -408,9 +409,9 @@ If LAYER_DIR is nil, the private directory is used."
(let ((src (concat configuration-layer-template-directory
(format "%s.template" template)))
(dest (if layer-dir
(concat layer-dir "/" (format "%s.el" template))
(concat layer-dir "/" (format "%s" template))
(concat (configuration-layer//get-private-layer-dir name)
(format "%s.el" template)))))
(format "%s" template)))))
(copy-file src dest)
(find-file dest)
(save-excursion

View File

@ -56,7 +56,7 @@ layers in. For example a layer for a language would go in the
It is recommended to join a =README.org= file with your layer:
- ideally this file should document the packages of your layer as well as the
key bindings associated with them
- a template is provided in =~/.emacs.d/core/templates/layer-README.template=,
- a template is provided in =~/.emacs.d/core/templates/README.org.template=,
use it as much as possible
- another good practice is to start from the =README.org= of an existing layer
- if a logo exists for the layer you can add it at the top of the =README.org=

View File

@ -328,7 +328,7 @@ as an help command.
* Writing documentation
Spacemacs provides an example layer =README.org= file in
=~/.emacs.d/core/templates/layer-README.template=.
=~/.emacs.d/core/templates/README.org.template=.
** Spacing in documentation
Spacemacs tries to keep the documentation consistent between all layers by