Website root not part of template?

Topics: Developer Forum, User Forum
May 30, 2011 at 12:01 PM

I noticed that the website root folder is very rigid and unchangeable. The root folder contains TOC.css which pretty much dictates what the table of contents frame will look like.

In code:

namespace SandcastleBuilder.Utils.BuildEngine
    public partial class BuildProcess
                // Get the location of the web files
                webFolder = shfbFolder + @"\Web\";

Why cannot that check for web directory's existence in templateFolder and optionally get the root files from there?

Jari Turkia

May 30, 2011 at 5:47 PM

The website files are a part of SHFB, not Sandcastle which is why it only looks in the SHFB folder for them.  Also, the website files are not presentation style specific.  SHFB does support overriding the output by adding like-named files to your SHFB project in the root or like-named folders.  For example, if you add a .\Styles folder to your project and put a Presentation.css file in it with your customizations and set its BuildAction to Content, it will overwrite the default stylesheet when it is copied to the build folder and will be compiled into the help file.  You can override any of the default SHFB website files by putting customized versions of the files in the root folder of your project.



May 31, 2011 at 7:43 AM

The key seems to be to tag the file with build action "content". I completely missed that one. Now my output web-site has the required changes to make the documentation have our corporate colours. Thanks for help.

Is there a way to make changes to content XML-files (shared_content.xml to be specific) without building own presentation?

Jari Turkia

May 31, 2011 at 3:08 PM

You can add a Resource Items file to the project.  It will let you override any content item in the presentation style.