-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML Export #9
Comments
I guess that it is possible. I tried with ox-twbs and I haven't been successful yet. When the user exports a page to html by using M-x org-wiki-export-html or M-x org-wiki-export-html-sync the function below is invoked and transforms the hyperlink wiki:page to (defun org-wiki--org-link (path desc backend)
"Creates an html org-wiki pages when exporting to html.
Example: The hyperlink [[wiki:Linux][Dealing with Linux]]
will be exported to <a href='Linux.html'>Dealing with Linux</a>"
(cl-case backend
(html (format
"<a href='%s.html'>%s</a>"
path
(or desc path))))) Add the protocols: ;;; Custom Protocols
(add-hook 'org-mode-hook
(lambda ()
(org-add-link-type "wiki"
#'org-wiki--open-page
#'org-wiki--org-link )
(org-add-link-type "wiki-asset-sys"
#'org-wiki--protocol-open-assets-with-sys
#'org-wiki--asset-link))) I tried to modify this function to the code below. But it didn't work. A wiki link wiki:page that corresponds to file page.org should be exported to It will require more time to implement. I will work on this. (defun org-wiki--org-link (path desc backend)
"Creates an html org-wiki pages when exporting to html.
Example: The hyperlink [[wiki:Linux][Dealing with Linux]]
will be exported to <a href='Linux.html'>Dealing with Linux</a>"
(cl-case backend
(html (format
"<a href='%s.html'>%s</a>"
path
(or desc path))))
(twbs (format
"<a href='%s.html'>%s</a>"
path
(or desc path)))) This code was inspired by Embedding Youtube videos with org-mode links Best regards. |
Yep - I was having this same problem.
Thanks! I wish my elisp skills were better so that I could help. Should I come up with a solution, I'll post it here. |
Have you by any chance made any progress on this? I can get org-wiki to reliably export using ox-pandoc as a backend, but continue to have a problem with it not translating the links. They remain saying |
Is it possible to use other export backends for org-wiki for html? I was hoping to use ox-twbs if possible. One thing I've noticed though is that the links don't export well. A file named 'file.org' will export to 'file.html' but the link will only be to 'file' without the 'html' suffix.
The text was updated successfully, but these errors were encountered: