This project has moved and is read-only. For the latest updates, please go here.

SHFB - website output - Force HTML only

Topics: Developer Forum, Project Management Forum, User Forum
Dec 11, 2013 at 8:02 PM
What is the best way to turn off .aspx and force html. We want to reduce complexity.
Dec 11, 2013 at 8:18 PM
The website output contains index pages for plain HTML, ASPX, and PHP. If you don't want any particular index page to be available on your website, just delete it from the output or don't upload them to the server. There may be ways on the server to tell it which type of page to give preference to as well I should think. Bear in mind that the HTML index page is the least efficient as it has to load the entire TOC before the page gets displayed. This is not optimal when there are a large number of topics.

Dec 13, 2013 at 8:49 PM
Okay, good to know about the topic list size.

index.html calls this method when the page loads:

<body onload="javascript: Initialize('.aspx');" onresize="javascript: ResizeTree();"> <form id="IndexForm" runat="server">

Is there a way to turn things off in the javascript so this initialize method never believes it is reaching for .aspx?
Dec 16, 2013 at 5:50 PM
I haven't tried it to confirm but you can probably change the ".aspx" parameter to an empty string. It's used for syncing the TOC to the selected topic which the HTML page doesn't support anyway.

Feb 26, 2014 at 10:10 AM
Edited Feb 26, 2014 at 1:20 PM
EDIT : never mind :)
Feb 26, 2014 at 3:51 PM
The Lightweight TOC plugin removes all of the default index pages, and replaces them with a single index.html containing a redirect to the home topic. All scripting operations in this output mode are client-side, making the output suitable for hosting on servers that do not support server-side scripting (many CDNs work this way). In addition, since each page only contains table of contents information relevant to the current page (specifically, its ancestors and either siblings or children), the page load overhead associated with large sites is dramatically reduced.

A description of the redirect page can be found here:
Feb 26, 2014 at 8:43 PM
Your presentation style should define it's own web content rather than specifying that it copy the default SHFB web content. That way your plug-in wouldn't have to remove it or add alternate content.