EWSoftware / SHFB

Sandcastle Help File Builder (SHFB). A standalone GUI, Visual Studio integration package, and MSBuild tasks providing full configuration and extensibility for building help files with the Sandcastle tools.
Other
2.19k stars 369 forks source link

Index on left hand side of webpage missing in Default2022 style #947

Closed MarcelVersteeg closed 2 years ago

MarcelVersteeg commented 2 years ago

Currently I am using the VS2013 style for all my generated documentation using SandCastle version 2022.10.15. I want to update the documentation to the Default2022 style. However, I noticed a difference in the generated web pages I can't explain.

With the VS2013 style, I get an index on the left hand side of the web pages, where I can click the categories in the conceptual documentation and some main namespaces I want to be displayed. However, when I use the Default2022 style, this index on the left hand side is gone. When I look at the documentation of SandCastle itself I do see the index on the left hand side, so I know it must be something with my own configuration. I have looked at any differences between the project used to generate the SandCastle documentation and mine, but can't spot the difference that is causing the index to disappear.

My documentation project is as follows:

<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!-- Import the common properties to support NuGet restore -->
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <!-- A framework version is required for NuGet restore.  This can be any valid version -->
    <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
    <!-- The configuration and platform will be used to determine which assemblies to include from solution and
         project documentation sources -->
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{dac7195d-25b9-44b8-bfba-b24cfc78bc3d}</ProjectGuid>
    <SHFBSchemaVersion>2017.9.26.0</SHFBSchemaVersion>
    <!-- AssemblyName, Name, and RootNamespace are not used by SHFB but Visual Studio adds them anyway -->
    <AssemblyName>Documentation</AssemblyName>
    <RootNamespace>Documentation</RootNamespace>
    <Name>Documentation</Name>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <!-- SHFB properties -->
    <FrameworkVersion>.NET Framework 4.8</FrameworkVersion>
    <OutputPath>..\bin\_Documentation\</OutputPath>
    <IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath>
    <HtmlHelpName>RoyaltyCalculator</HtmlHelpName>
    <Language>en-US</Language>
    <HelpFileFormat>Website</HelpFileFormat>
    <SyntaxFilters>C#, XAML Usage</SyntaxFilters>
    <PresentationStyle>Default2022</PresentationStyle>
    <CleanIntermediates>True</CleanIntermediates>
    <KeepLogFile>True</KeepLogFile>
    <DisableCodeBlockComponent>False</DisableCodeBlockComponent>
    <IndentHtml>False</IndentHtml>
    <BuildAssemblerVerbosity>AllMessages</BuildAssemblerVerbosity>
    <SaveComponentCacheCapacity>100</SaveComponentCacheCapacity>
    <BuildLogFile>bin\Build.log</BuildLogFile>
    <HelpTitle>Documentation Help Title</HelpTitle>
    <HelpFileVersion>1.0.0.0</HelpFileVersion>
    <NamingMethod>HashedMemberName</NamingMethod>
    <ContentPlacement>AboveNamespaces</ContentPlacement>
    <RootNamespaceContainer>False</RootNamespaceContainer>
    <NamespaceGrouping>True</NamespaceGrouping>
    <MaximumGroupParts>2</MaximumGroupParts>
    <Preliminary>False</Preliminary>
    <CopyrightText>Just an example</CopyrightText>
    <SdkLinkTarget>Blank</SdkLinkTarget>
    <VisibleItems>Attributes, ExplicitInterfaceImplementations, InheritedMembers, InheritedFrameworkMembers, Internals, Privates, PrivateFields, Protected, SealedProtected, EditorBrowsableNever, NonBrowsable</VisibleItems>
    <MissingTags>Summary, Parameter, Returns, Namespace, TypeParameter</MissingTags>
    <WarnOnMissingSourceContext>False</WarnOnMissingSourceContext>
    <WorkingPath>bin\_intermediate\</WorkingPath>
    <ComponentConfigurations>
      <ComponentConfig id="API Token Resolution" enabled="True">
        <component id="API Token Resolution">{@TokenFiles}
          <replace elements="/*//token" item="string(.)" />
        </component>
      </ComponentConfig>
      <ComponentConfig id="Code Block Component" enabled="True">
        <component id="Code Block Component">
          <basePath value="{@HtmlEncProjectFolder}" />
          <outputPaths>
            {@HelpFormatOutputPaths}
          </outputPaths>
          <allowMissingSource value="false" />
          <removeRegionMarkers value="false" />
          <colorizer syntaxFile="{@CoreComponentsFolder}Colorizer\highlight.xml" styleFile="{@CoreComponentsFolder}Colorizer\highlight.xsl" stylesheet="{@CoreComponentsFolder}Colorizer\highlight.css" scriptFile="{@CoreComponentsFolder}Colorizer\highlight.js" disabled="{@DisableCodeBlockComponent}" language="cs" tabSize="0" numberLines="false" outlining="false" keepSeeTags="false" defaultTitle="true" />
        </component>
      </ComponentConfig>
      <ComponentConfig id="Syntax Component" enabled="True">
        <component id="Syntax Component">
          <syntax input="/document/reference" output="/document/syntax" renderReferenceLinks="false" />
          <generators>
            {@SyntaxFilters}
          </generators>
          <containerElement name="codeSnippetGroup" addNoExampleTabs="true" includeOnSingleSnippets="true" groupingEnabled="{@CodeSnippetGrouping}" />
          <configurations>
            <generator id="C#" />
            <generator id="Visual Basic">
              <includeLineContinuation value="false" />
            </generator>
            <generator id="Visual Basic Usage">
              <includeLineContinuation value="false" />
            </generator>
            <generator id="Managed C++" />
            <generator id="F#" />
            <generator id="J#" />
            <generator id="JScript" />
            <generator id="JavaScript" />
            <generator id="XAML Usage" />
            <generator id="ASP.NET" />
            <generator id="X#" />
          </configurations>
        </component>
      </ComponentConfig>
    </ComponentConfigurations>
    <DocumentationSources>
      <DocumentationSource sourceFile="SomeSolution.sln" />
    </DocumentationSources>
    <!-- Using the builder as downloaded using the NuGet package -->
    <ComponentPath>$(MSBuildThisFileDirectory)..\bin\_packages\ewsoftware.shfb.netframework\4.8.0.2\tools\Data\.NETFramework\</ComponentPath>
    <PlugInConfigurations>
      <PlugInConfig id="Table of Contents Exclusion" enabled="True">
        <configuration />
      </PlugInConfig>
    </PlugInConfigurations>
    <TransformComponentArguments>
      <Argument Key="logoFile" Value="icon.png" xmlns="" />
      <Argument Key="logoHeight" Value="64" xmlns="" />
      <Argument Key="logoWidth" Value="64" xmlns="" />
      <Argument Key="logoAltText" Value="" xmlns="" />
      <Argument Key="logoPlacement" Value="left" xmlns="" />
      <Argument Key="logoAlignment" Value="left" xmlns="" />
      <Argument Key="maxVersionParts" Value="" xmlns="" />
      <Argument Key="defaultLanguage" Value="cs" xmlns="" />
      <Argument Key="includeEnumValues" Value="true" xmlns="" />
      <Argument Key="baseSourceCodeUrl" Value="" xmlns="" />
      <Argument Key="requestExampleUrl" Value="" xmlns="" />
    </TransformComponentArguments>
    <ProjectSummary>Root namespace</ProjectSummary>
  </PropertyGroup>
  <!-- There are no properties for these groups.  AnyCPU needs to appear in order for Visual Studio to perform
       the build.  The others are optional common platform types that may appear. -->
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
  </PropertyGroup>
  <PropertyGroup>
    <!-- Using the builder as downloaded using the NuGet package -->
    <SHFBROOT Condition=" '$(SHFBROOT)' == '' ">$(MSBuildThisFileDirectory)..\bin\_packages\ewsoftware.shfb\2022.10.15\tools\</SHFBROOT>
  </PropertyGroup>
  <!-- Uncomment this to use the NuGet packages when SHFB is not installed locally, e.g. in the CI build pipeline.
       Update the package versions to the latest releases. -->
  <ItemGroup>
    <PackageReference Include="EWSoftware.SHFB" Version="2022.10.15" />
    <PackageReference Include="EWSoftware.SHFB.NETFramework" Version="4.8.0.2" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="icons\icon.png">
      <ImageId>icon</ImageId>
      <AlternateText>Some Text</AlternateText>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <Folder Include="Content" />
    <Folder Include="Content\Projects" />
    <Folder Include="Content\Versions" />
    <Folder Include="Documentation" />
    <Folder Include="icons" />
  </ItemGroup>
  <ItemGroup>
    <ContentLayout Include="Layout.content" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Content\Introduction.aml" />
  </ItemGroup>
  <ItemGroup>
    <XamlConfiguration Include="XAML.xamlcfg" />
  </ItemGroup>
  <!-- Import the common build targets during NuGet restore because before the packages are being installed, $(SHFBROOT) is not set yet -->
  <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" Condition="'$(MSBuildRestoreSessionId)' != ''" />
  <!-- Import the SHFB build targets during build -->
  <Import Project="$(SHFBROOT)\SandcastleHelpFileBuilder.targets" Condition="'$(MSBuildRestoreSessionId)' == ''" />
  <!-- The pre-build and post-build event properties must appear *after* the targets file import in order to be
       evaluated correctly. -->
  <PropertyGroup>
    <PreBuildEvent>
    </PreBuildEvent>
    <PostBuildEvent>
    </PostBuildEvent>
    <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
  </PropertyGroup>
</Project>

And my Layout.content file is as follows:

<?xml version="1.0" encoding="utf-8"?>
<Topics>
  <Topic id="Introduction" visible="True" isDefault="true" title="Introduction">
    <HelpKeywords>
      <HelpKeyword index="K" term="Introduction" />
    </HelpKeywords>
  </Topic>
</Topics>

Is there something I am overlooking that I need to change in my project?

EWSoftware commented 2 years ago

Are you running this through the local web server or are you trying to view it on the file system? If the latter, the browser will block all the script and it won't show the TOC. Using the View Help File option in the SHFB toolbar will start the local web server if it can.

MarcelVersteeg commented 2 years ago

I was indeed opening the files directly from my local file system. Using the local web server, I was indeed able to see the TOC.