From: ArneBab <arne_bab@web.de>
To: emacs-orgmode@gnu.org
Subject: Bug: export html with nice urls [9.1.9 (release_9.1.9-65-g5e4542 @ /gnu/store/djza93lqjcndsldf4794bp8mvipd6fz4-emacs-26.3/share/emacs/26.3/lisp/org/)]
Date: Sat, 02 Nov 2019 12:49:21 +0100 [thread overview]
Message-ID: <87k18izef2.fsf@web.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 12866 bytes --]
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
https://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
When publishing a website from org-mode there is no option to transform
org-links to cool urls (without extension). There is the option to not
switch to a .html extension, but no way to strip the extension
alltogether.
This is one of the two final pieces which prevent making the site really
nice.
I already have a hack for the sitemap with nice URLs, but that’s just
that: a hack.
;; TODO: use cool uris, partially breaks local viewing, requires site/.htaccess. see http://www.w3.org/Provider/Style/URI
(defun org-publish-sitemap-default-entry-cool-url (entry style project)
"Default format for site map ENTRY, as a string.
ENTRY is a file name. STYLE is the style of the sitemap.
PROJECT is the current project."
(cond ((not (directory-name-p entry))
(format "[[file:%s][%s]]"
(file-name-sans-extension entry) ;; this is the cool url
(org-publish-find-title entry project)))
((eq style 'tree)
;; Return only last subdir.
(file-name-nondirectory (directory-file-name entry)))
(t entry)))
To make this work with every org-link would require hacking
org-html-link to not only allow keeping the org-link (if
:html-link-org-files-as-html is nil), but also to allow stripping the
extension alltogether.
It would be great to have this option, because then the org-documents
would keep working while the export would work well (with the link from
filename-sans-extension to html-file done transparently via htaccess).
Best wishes,
Arne
PS: this is for https://www.draketo.de/index — not yet official, but
already usable; I’ve been planning to switch to org-mode for my site
for years, and now I’m almost there.
Emacs : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10)
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ /gnu/store/djza93lqjcndsldf4794bp8mvipd6fz4-emacs-26.3/share/emacs/26.3/lisp/org/)
current state:
==============
(setq
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
org-time-stamp-custom-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a %H:%M>")
org-enforce-todo-dependencies t
org-odt-format-headline-function 'org-odt-format-headline-default-function
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
org-mode-hook '(#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-show-block-all append
local]
5]
#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-babel-show-result-all
append local]
5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
org-archive-hook '(org-attach-archive-delete-maybe)
org-confirm-elisp-link-function 'yes-or-no-p
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"]
org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
org-babel-pre-tangle-hook '(save-buffer)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-babel-load-languages '((C . t) (R . t) (asymptote) (awk) (calc) (clojure)
(comint) (css) (ditaa . t) (dot . t)
(emacs-lisp . t) (fortran) (gnuplot . t) (haskell)
(io) (java) (js) (latex) (ledger) (lilypond)
(lisp) (matlab) (maxima) (mscgen) (ocaml) (octave)
(org . t) (perl) (picolisp) (plantuml)
(python . t) (ref) (ruby) (sass) (scala) (scheme)
(screen) (shell . t) (shen) (sql) (sqlite))
org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"]
org-feed-alist '(("Weltenwald, alt" "http://www.draketo.de/rss.xml"
"external-rss.org.in" "Weltenwald, alt" :parse-feed
org-feed-parse-rss-feed/nonreversed :template
"\n* %h\n %U\n %(parse-html-string \"%description\")\n %a\n")
)
org-occur-hook '(org-first-headline-recenter)
org-structure-template-alist '(("k" "#+begin_kasten\n?\n#+end_kasten"
"<div class=\"kasten\">?</div>")
("s" "#+BEGIN_SRC ?\n\n#+END_SRC")
("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE")
("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE")
("v" "#+BEGIN_VERSE\n?\n#+END_VERSE")
("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM")
("c" "#+BEGIN_CENTER\n?\n#+END_CENTER")
("C" "#+BEGIN_COMMENT\n?\n#+END_COMMENT")
("l" "#+BEGIN_EXPORT latex\n?\n#+END_EXPORT")
("L" "#+LaTeX: ")
("h" "#+BEGIN_EXPORT html\n?\n#+END_EXPORT")
("H" "#+HTML: ")
("a" "#+BEGIN_EXPORT ascii\n?\n#+END_EXPORT")
("A" "#+ASCII: ") ("i" "#+INDEX: ?")
("I" "#+INCLUDE: %file ?"))
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
org-babel-tangle-lang-exts '(("python" . "py") ("D" . "d") ("C++" . "cpp")
("emacs-lisp" . "el") ("elisp" . "el"))
org-confirm-shell-link-function 'yes-or-no-p
org-link-parameters '(("id" :follow org-id-open)
("rmail" :follow org-rmail-open :store
org-rmail-store-link)
("mhe" :follow org-mhe-open :store org-mhe-store-link)
("irc" :follow org-irc-visit :store org-irc-store-link)
("info" :follow org-info-open :export org-info-export
:store org-info-store-link)
("gnus" :follow org-gnus-open :store
org-gnus-store-link)
("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete org-bbdb-complete-link :store
org-bbdb-store-link)
("w3m" :store org-w3m-store-link) ("file+sys")
("file+emacs") ("doi" :follow org--open-doi-link)
("elisp" :follow org--open-elisp-link)
("file" :complete org-file-complete-link)
("ftp" :follow
(lambda (path) (browse-url (concat "ftp:" path))))
("help" :follow org--open-help-link)
("http" :follow
(lambda (path) (browse-url (concat "http:" path))))
("https" :follow
(lambda (path) (browse-url (concat "https:" path))))
("mailto" :follow
(lambda (path) (browse-url (concat "mailto:" path))))
("news" :follow
(lambda (path) (browse-url (concat "news:" path))))
("shell" :follow org--open-shell-link))
org-latex-format-headline-function 'org-latex-format-headline-default-function
org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function
org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
org-html-format-headline-function 'org-html-format-headline-default-function
org-publish-project-alist '(("arnebab-org-serviceworker" :base-directory
"/home/arne/eigenes/Webseiten/arnebab-org/"
:publishing-directory
"/home/arne/eigenes/Webseiten/arnebab-org/site/"
:base-extension "js" :recursive nil
:publishing-function org-publish-attachment
:include ["sw.js"])
("arnebab-org-static-wissen" :base-directory
"/home/arne/eigenes/Webseiten/arnebab-org/wissen" :publishing-directory "/home/arne/eigenes/Webseiten/arnebab-org/site/wissen" :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|webm\\|opus" :recursive t :publishing-function org-publish-attachment :exclude "org-templates\\|.*html\\|.*~\\|site\\|\\..*emacs\\.d\\|org-timestamps\\|arnebab-[0-9]\\.[0-9]\\.[0-9]")
("arnebab-org-static-software" :base-directory
"/home/arne/eigenes/Webseiten/arnebab-org/software" :publishing-directory "/home/arne/eigenes/Webseiten/arnebab-org/site/software" :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|webm\\|opus" :recursive t :publishing-function org-publish-attachment :exclude "org-templates\\|.*html\\|.*~\\|site\\|\\..*emacs\\.d\\|org-timestamps\\|arnebab-[0-9]\\.[0-9]\\.[0-9]")
("arnebab-org-static-rollenspiel" :base-directory
"/home/arne/eigenes/Webseiten/arnebab-org/rollenspiel" :publishing-directory "/home/arne/eigenes/Webseiten/arnebab-org/site/rollenspiel" :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|webm\\|opus" :recursive t :publishing-function org-publish-attachment :exclude "org-templates\\|.*html\\|.*~\\|site\\|\\..*emacs\\.d\\|org-timestamps\\|arnebab-[0-9]\\.[0-9]\\.[0-9]")
("arnebab-org-static-politik" :base-directory
"/home/arne/eigenes/Webseiten/arnebab-org/politik" :publishing-directory "/home/arne/eigenes/Webseiten/arnebab-org/site/politik" :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|webm\\|opus" :recursive t :publishing-function org-publish-attachment :exclude "org-templates\\|.*html\\|.*~\\|site\\|\\..*emacs\\.d\\|org-timestamps\\|arnebab-[0-9]\\.[0-9]\\.[0-9]")
("arnebab-org-static-kreatives" :base-directory
"/home/arne/eigenes/Webseiten/arnebab-org/kreatives" :publishing-directory "/home/arne/eigenes/Webseiten/arnebab-org/site/kreatives" :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|webm\\|opus" :recursive t :publishing-function org-publish-attachment :exclude "org-templates\\|.*html\\|.*~\\|site\\|\\..*emacs\\.d\\|org-timestamps\\|arnebab-[0-9]\\.[0-9]\\.[0-9]")
("arnebab-org-static-ich" :base-directory
"/home/arne/eigenes/Webseiten/arnebab-org/ich"
:publishing-directory
"/home/arne/eigenes/Webseiten/arnebab-org/site/ich" :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|webm\\|opus" :recursive t :publishing-function org-publish-attachment :exclude "org-templates\\|.*html\\|.*~\\|site\\|\\..*emacs\\.d\\|org-timestamps\\|arnebab-[0-9]\\.[0-9]\\.[0-9]")
("arnebab-org-static-anderes" :base-directory
"/home/arne/eigenes/Webseiten/arnebab-org/anderes" :publishing-directory "/home/arne/eigenes/Webseiten/arnebab-org/site/anderes" :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|webm\\|opus" :recursive t :publishing-function org-publish-attachment :exclude "org-templates\\|.*html\\|.*~\\|site\\|\\..*emacs\\.d\\|org-timestamps\\|arnebab-[0-9]\\.[0-9]\\.[0-9]")
("arnebab-org-static" :base-directory
"/home/arne/eigenes/Webseiten/arnebab-org/assets" :publishing-directory "/home/arne/eigenes/Webseiten/arnebab-org/site/assets/" :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|webm\\|opus" :recursive t :publishing-function org-publish-attachment :exclude "org-templates\\|.*html\\|.*~\\|site\\|\\..*emacs\\.d\\|org-timestamps\\|arnebab-[0-9]\\.[0-9]\\.[0-9]")
("arnebab-org-org" :base-directory
"/home/arne/eigenes/Webseiten/arnebab-org"
:publishing-directory
"/home/arne/eigenes/Webseiten/arnebab-org/site/"
:base-extension "org" :publishing-function
org-html-publish-to-html :section-numbers nil
:with-toc t :html-html5-fancy t :html-viewport
nil :html-preamble nil :with-sub-superscript nil
:broken-links t :recursive t :auto-sitemap t
:sitemap-sort-files anti-chronologically
:sitemap-sort-folders first
:sitemap-format-entry
org-publish-sitemap-default-entry-cool-url
:exclude
"org-templates\\|.*html\\|arnebab-[0-9]\\.[0-9]\\.[0-9]"
:include ["index.org"])
("arnebab-org" :components
("arnebab-org-static-anderes"
"arnebab-org-static-ich"
"arnebab-org-static-kreatives"
"arnebab-org-static-politik"
"arnebab-org-static-rollenspiel"
"arnebab-org-static-software"
"arnebab-org-static-wissen"
"arnebab-org-static" "arnebab-org-org")
)
)
)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1076 bytes --]
next reply other threads:[~2019-11-02 11:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-02 11:49 ArneBab [this message]
2020-02-05 8:16 ` Bug: export html with nice urls [9.1.9 (release_9.1.9-65-g5e4542 @ /gnu/store/djza93lqjcndsldf4794bp8mvipd6fz4-emacs-26.3/share/emacs/26.3/lisp/org/)] Bastien
2020-02-11 8:37 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k18izef2.fsf@web.de \
--to=arne_bab@web.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).