Re: 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/)]

2020-02-11 Thread Bastien
Hi Arne,

ArneBab  writes:

> 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.

>From the latest master branch, using an empty org-html-extension will
behave as expected: no trailing period on the file name or on links
to .org files.

Can you try it and let us know if it helps dealing with "cool" URLs?

-- 
 Bastien



Re: 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/)]

2020-02-05 Thread Bastien
Hi Arne,

can you provide a patch for this?

Thanks!

-- 
 Bastien



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/)]

2019-11-02 Thread ArneBab

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")