i-net-software / dokuwiki-plugin-siteexport

DokuWiki plugin to export pages or namespaces to static html
https://www.dokuwiki.org/plugin:siteexport
GNU General Public License v2.0
24 stars 12 forks source link

Full searchable index developed from Indexmenu Plugin #70

Closed rgleason closed 7 years ago

rgleason commented 7 years ago

When I use siteexport of the "fullindex.txt" page ---Later note I've deleted this page and have revised it to be a fulll TOC that is flat and open https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:toc I put it under the namespace because that appears to be what you prefer by the forms.

which has this indexmenu code: ==== Indexmenu Navigation TOC ==== {{indexmenu>:opencpn:opencpn_user_manual#1|js#drktheme navbfar msort nsort}} Later note: Code changed to: [[:opencpn:opencpn_user_manual]] <-- Have to add this parent page somehow or is that automatic? {{indexmenu>:opencpn:opencpn_user_manual#5|msort nsort nojs}} --See bottom notes now.

===== Alternative Indexmenu ===== {{indexmenu>. | notoc nojs}}

I get this linked page output when using siteexport and cgkedit format. full-indexmen

We would like to have the fully expanded menu in the output, with links to all the pages so that the index and pages are searchable. Is there a way to do this?


READ indexmenu > TOC.txt (similar to the pipe command Dos DIR > List.txt0

Last night I realized that everything needed is in the Indexmenu we've setup. The only thing missing is a reader that will read it line by line and copy it to the end of a file. (Similar to the dos command "DIR > List.txt" ) This would be something done in PHP code but could be very simple, which would complete with a TOC file that SiteExport would read and make the html document.

To get the expanded searchable linked TOC at the head of the document, we would add a page similar to "fullindex.txt" and paste in the TOC created.


Delete or not include "Blank" pages and associated Namespaces There is one other small thing that would be helpful.

Do not include blank pages and associated namespaces [check]

To get indexmenu to sort properly whenever we have a page with no associated namespace, we added a "blank" page underneath and entered a line "This page left blank intentionally." That gets indexmenu to sort properly because it is then just sorting namespaces.

We will have to delete these pages and namespaces in the html manually, but if there were some way not to include those namespaces and blank pages, it would be great. I am trying to figure out how to do that. Perhaps all the pages have to really be "blank" with no text!

Thank you Gerry

rgleason commented 7 years ago

Gerry, I think I got this partially figured out. I changed the bottom code to

==== OpenCPN User Manual Table of Contents ==== Uses no javascript\

{{indexmenu>:opencpn:opencpn_user_manual | notoc nojs}}

Which gives us the full expanded listing.

Now I think I need to save that file as TOC.txt or something and get it into SiteExport Plugin.

Is there an easy way to do this that you have already figured out?

Look at the second Table of Contents for the Opencpn User Manual here https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:toc

rgleason commented 7 years ago

Maybe there is a way I can just put an indexmenu TOC code in somewhere:

{{indexmenu>:opencpn:opencpn_user_manual | notoc nojs}}

Maybe I can just put that into a TOC.txt file and reference the TOC.txt file in the SiteExport Plugin.

rgleason commented 7 years ago

Actually, now I notice that the above TOC is not in the same order as the Left Navigation Javascript menu! It is not recognizing the indexmenu sort code. We could just move the TOC lines into the right order manually after the htiml document is made, but that is not very elegant and is repetitive work.

I'll have to dive into indexmenu stuff now.

rgleason commented 7 years ago

User Manual Export

For the flat non-expandable fully open indexmenu I don't need to use javascript. Code:

{{indexmenu>:opencpn:opencpn_user_manual#5|msort nsort nojs}}

{{indexmenu>:[path to namespace#[levels to open] | msort nsort  nojs}}

msort - Looks for the custom sorting number specified with the {{indexmenu_n>N}} at top of each page.

nsort -By default, pages without metadata tag {{indexmenu_n>N}} are sorted by page name (the default DokuWiki way), but you can override this behaviour adding also the tsort or dsort option in the indexmenu syntax. By default namespaces are not sorted, you need the nsort option for this.

nojs - no javascript is used, so the dokuwiki renderer is used rather than indexmenu.

navbar - Not used because we don't need it for creating an export document.

Example: https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:toc

rgleason commented 7 years ago

Here is a documentation page for the OpenCPN.org "Books" Indexmenu Plugin showing how to build a TOC page for a namespace that can be used in SiteExport.

https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:edit_user_manual:test_navigation_toc#siteexport_pluginopencpn_user_manual_toc

Here is a documentation page for the OpenCPN.org "Books" SiteExport Plugin showing how to use the TOC page in SiteExport and what configuration settings we use. https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:edit_user_manual:site_export_plugin

There is also information about setting up the debug.txt file in case the plugin is not working.

We are still trying to get it to complete, however.

rgleason commented 7 years ago

I am closing this but the two links above have very good examples and documentation and getting debug working that would be useful to others.

We are still having some trouble with completion. Do have the debug file working.