Re: [External Email] Re: publishing: no default publishing function, or symbol is not defined

2021-06-19 Thread Juan Manuel Macías
Hi Christopher,

Christopher W. Ryan" via "General discussions about Org-mode. writes:

> I would expect each named entry in an index to appear once, with, if
> necessary, multiple links next to it for all the places that index tag
> occurs in the main document. At least, that's how the indices in books
> work.  Can the same be done in org mode?

I'm afraid that in HTML that is not possible. Page numbers are used in
books to refer to an index entry, but on a web site we don't have page
numbers: Where would we apply the links? What I usually do with my web
index is: use first-level entries for the general concept and second or
third level entries for concepts more concrete.

P.ej:

In document A:

#+INDEX: GNU Emacs!external packages!projectile

In document B:

#+INDEX: GNU Emacs!external packages!helm

Links to document A and B go to projectile and Helm

Anyway, I think in this scenario it's better to use tags, but
org-publish doesn't provide tags out of the box. You need to do some
elisp hacking to get something like blog tags in your web site.

Best regards,

Juan Manuel 



Re: [External Email] Re: publishing: no default publishing function, or symbol is not defined

2021-06-19 Thread Christopher W. Ryan
Oops, spoke to soon about the structure of the index.  Here is a section
of theindex.html

I
Incarceration
Incarceration
Interview
Interview
Interview
Interview
Interview
Isolation
Isolation
Isolation

I would expect each named entry in an index to appear once, with, if
necessary, multiple links next to it for all the places that index tag
occurs in the main document. At least, that's how the indices in books
work.  Can the same be done in org mode?

Thanks.

--Chris


Juan Manuel Macías wrote:
> Hi Christopher,
> 
> Christopher W. Ryan" via "General discussions about Org-mode. writes:
> 
>> I'm making my first foray into publishing a project. I'm running GNU
>> Emacs 26.2 (build 1, x86_64-w64-mingw32) of 2019-04-13, on Windows 10.
>>
>> I've defined a single project, just to try it out and learn.
> 
> As Christian Moe said, the function you need is
> `org-html-publish-to-html'.
> 
> In case it helps, I keep this blog about typography and TeX (in spanish),
> made with org-publish: https://lunotipia.juanmanuelmacias.com/index.html
> 
> The blog's public repository is at:
> https://gitlab.com/maciaschain/lunotipia
> 
> And this is the org-publish configuration for the blog:
> 
> ;; lunotipia
> ("lunotipia-notes"
>  ;; Org files
>  :base-directory "~/Git/lunotipia/org/"
>  :base-extension "org"
>  ;; HTML files
>  :publishing-directory "~/Git/lunotipia/public/"
>  :publishing-function org-html-publish-to-html
>  :recursive t
>  :auto-sitemap t
>  :sitemap-title "Textos publicados"
>  :sitemap-function my-sitemap-function-lunotipia
>  :sitemap-filename "entradas.org"
>  :sitemap-style list
>  :sitemap-sort-files anti-chronologically
>  :exclude "org-rss\\|theindex\\|acerca-de\.org"
>  :makeindex t
>  :html-postamble mi-postamble)
> 
> ;; static files
> ("lunotipia-static"
>  :base-directory "~/Git/lunotipia/org/images/"
>  :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
>  :publishing-directory "~/Git/lunotipia/public/images/"
>  :recursive t
>  :publishing-function org-publish-attachment)
> 
> And my custom sitemap function:
> 
> (defun my-sitemap-function-lunotipia (title list)
>   "Return sitemap using TITLE and LIST returned by 
> `org-blog-sitemap-format-entry'."
>   (concat "#+TITLE: " title "\n\n"
> "#+SETUPFILE:" "~/Git/lunotipia/html-lunotipia.setup"
> "\n#+SETUPFILE:" "~/Git/gnutas/macros-gnutas.setup"
> "\n#+AUTHOR:" "Juan Manuel Macías"
> "\n#+LANGUAGE:" "es"
> "\n#+begin_archive\n"
> (mapconcat (lambda (li)
>  (format "@@html:@@ %s @@html:@@" (car li)))
>(seq-filter #'car (cdr list))
>"\n")
> "\n#+end_archive\n"
> "\n#+begin_export html"
> "\n"
> "\n"
> "\n"
> "\nAcerca de..."
> "\n"
> "\n"
> "\n href=\"https://maciaschain.gitlab.io/lunotipia/rss.xml\;>RSS"
> "\n"
> "\n#+end_export\n"))
> 
> Best regards,
> 
> Juan Manuel 
>