ox-publish: Remove :sitemap-sans-extension

* lisp/ox-publish.el (org-publish-sitemap): Remove property.

* doc/org.texi (Sitemap):
* lisp/ox-publish.el (org-publish-project-alist): Remove documentation.

Caches uses absolute file names as keys.  We cannot provide file names
without extension to `:sitemap-format-entry' as they are no longer
existing key, and cannot be used for `org-publish-find-property' or
`org-publish-find-title'.
This commit is contained in:
Nicolas Goaziou 2016-11-02 09:14:50 +01:00
parent baf2e0e5ee
commit 6663452588
3 changed files with 18 additions and 14 deletions

View File

@ -14572,11 +14572,6 @@ a file is retrieved with @code{org-publish-find-date}.
a sitemap entry's date is to be formatted. This property bypasses
@code{org-publish-sitemap-date-format} which defaults to @code{%Y-%m-%d}.
@item @code{:sitemap-sans-extension}
@tab When non-@code{nil}, remove filenames' extensions from the generated sitemap.
Useful to have cool URIs (see @uref{http://www.w3.org/Provider/Style/URI}).
Defaults to @code{nil}.
@end multitable
@node Generating an index

View File

@ -23,6 +23,24 @@ into
: (file (lambda () (sexp)))
*** Removal of ~:sitemap-sans-extension~
The publishing property is no longer recognized, as a consequence of
changes to site-map generation.
You can get the same functionality by setting ~:sitemap-format-entry~
to the following
#+BEGIN_SRC elisp
(lambda (entry root style)
(cond ((not (directory-name-p entry))
(format "[[file:%s][%s]]"
(file-name-sans-extension (file-relative-name entry root))
(org-publish-find-title entry)))
((eq style 'tree) (file-name-nondirectory (directory-file-name entry)))
(t (file-relative-name entry root))))
#+END_SRC
*** Change signature for ~:sitemap-function~
~:sitemap-function~ now expects to be called with two arguments. See

View File

@ -218,12 +218,6 @@ a site-map of files or summary page for a given project.
structure of the source files is reflected in the site-map).
Defaults to `tree'.
`:sitemap-sans-extension'
Remove extension from site-map's file-names. Useful to have
cool URIs (see http://www.w3.org/Provider/Style/URI).
Defaults to nil.
`:sitemap-format-entry'
Plugin function used to format entries in the site-map. It
@ -739,9 +733,6 @@ Default for SITEMAP-FILENAME is `sitemap.org'."
(insert
(let ((files (remove sitemap-filename
(org-publish-get-base-files project))))
;; Remove extensions, if requested.
(when (plist-get project-plist :sitemap-sans-extension)
(setq files (mapcar #'file-name-sans-extension files)))
;; Add directories, if applicable.
(unless (and (eq style 'list) (eq sort-folders 'ignore))
(setq files