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:
parent
7a8487cd68
commit
028c53fbd7
|
@ -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
|
||||
|
|
|
@ -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=
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue