Skip to content

Commit b314bff

Browse files
committed
Creates powershell file to do the build, this detects if you have sandcastle installed first, also overwrites the default TOC.css file with a custom slightly nicer version for the output.
1 parent d66e2e5 commit b314bff

File tree

5 files changed

+203
-38
lines changed

5 files changed

+203
-38
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ src/Umbraco.Web.UI/[Cc]onfig/appSettings.config
107107
src/Umbraco.Web.UI/[Cc]onfig/connectionStrings.config
108108
src/Umbraco.Web.UI/umbraco/plugins/*
109109
src/Umbraco.Web.UI/umbraco/js/init.js
110-
build/Help/*
110+
build/ApiDocs/Output/*

build/ApiDocs/TOC.css

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
/* File : TOC.css
2+
// Author : Eric Woodruff (Eric@EWoodruff.us)
3+
// Updated : 09/07/2007
4+
//
5+
// Stylesheet for the table of content
6+
*/
7+
8+
*
9+
{
10+
margin: 0px 0px 0px 0px;
11+
padding: 0px 0px 0px 0px;
12+
}
13+
14+
body
15+
{
16+
font-family: Segoe UI, Arial, Verdana, Helvetica, sans-serif;
17+
font-size: 0.9em;
18+
background-color: white;
19+
color: White;
20+
overflow: hidden;
21+
}
22+
23+
input
24+
{
25+
padding:5px;
26+
margin: 3px 0px 3px 0px
27+
}
28+
29+
img
30+
{
31+
border: 0;
32+
margin-left: 5px;
33+
margin-right: 2px;
34+
}
35+
36+
img.TreeNodeImg
37+
{
38+
cursor: pointer;
39+
}
40+
41+
img.TOCLink
42+
{
43+
cursor: pointer;
44+
margin-left: 0;
45+
margin-right: 0;
46+
}
47+
48+
a.SelectedNode, a.UnselectedNode
49+
{
50+
color: #333;
51+
text-decoration: none;
52+
padding: 1px 3px 1px 3px;
53+
white-space: nowrap;
54+
}
55+
56+
a.SelectedNode
57+
{
58+
background-color: #ffffff;
59+
border: solid 1px #999999;
60+
padding: 0px 2px 0px 2px;
61+
}
62+
63+
a.UnselectedNode:hover, a.SelectedNode:hover
64+
{
65+
background-color: #cccccc;
66+
border: solid 1px #999999;
67+
padding: 0px 2px 0px 2px;
68+
}
69+
70+
.Visible
71+
{
72+
display: block;
73+
margin-left: 2em;
74+
}
75+
76+
.Hidden
77+
{
78+
display: none;
79+
}
80+
81+
.Tree
82+
{
83+
background-color: #fff;
84+
color: #333;
85+
width: 300px;
86+
overflow: auto;
87+
}
88+
89+
.TreeNode, .TreeItem
90+
{
91+
white-space: nowrap;
92+
margin: 2px 2px 2px 2px;
93+
}
94+
95+
.TOCDiv
96+
{
97+
position: relative;
98+
float: left;
99+
width: 300px;
100+
height: 100%;
101+
}
102+
103+
.TOCSizer
104+
{
105+
clear: none;
106+
float: left;
107+
width: 10px;
108+
height: 100%;
109+
background-image: url("Splitter.gif");
110+
background-position:center center;
111+
background-repeat:no-repeat;
112+
position: relative;
113+
cursor: w-resize;
114+
border-left: solid 1px #CCC;
115+
}
116+
117+
.TopicContent
118+
{
119+
position: relative;
120+
float: right;
121+
background-color: white;
122+
height: 100%;
123+
}
124+
125+
.SearchOpts
126+
{
127+
padding: 5px 5px 10px 5px;
128+
color: black;
129+
width: 300px;
130+
border-bottom: solid lightgrey 1px;
131+
height: 110px !important;
132+
}
133+
134+
.NavOpts
135+
{
136+
padding: 5px 5px 6px 5px;
137+
color: black;
138+
width: 300px;
139+
border-bottom: solid lightgrey 1px;
140+
}
141+
142+
.NavOpts img {
143+
display:inline-block;
144+
margin: 0px 5px 0px 5px;
145+
}
146+
147+
.IndexOpts
148+
{
149+
padding: 5px 5px 6px 5px;
150+
color: black;
151+
width: 300px;
152+
border-bottom: solid lightgrey 1px;
153+
}
154+
155+
.IndexItem
156+
{
157+
white-space: nowrap;
158+
margin: 2px 2px 2px 2px;
159+
}
160+
161+
.IndexSubItem
162+
{
163+
white-space: nowrap;
164+
margin: 2px 2px 2px 12px;
165+
}
166+
167+
.PaddedText
168+
{
169+
margin: 10px 10px 10px 10px;
170+
}

build/csharp-api-docs.shfbproj renamed to build/ApiDocs/csharp-api-docs.shfbproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<Name>Documentation</Name>
1717
<!-- SHFB properties -->
1818
<FrameworkVersion>.NET Framework 4.5</FrameworkVersion>
19-
<OutputPath>.\Help\</OutputPath>
19+
<OutputPath>.\Output\</OutputPath>
2020
<HtmlHelpName>UmbracoClassLibrary</HtmlHelpName>
2121
<Language>en-US</Language>
2222
<BuildAssemblerVerbosity>OnlyErrors</BuildAssemblerVerbosity>
@@ -38,10 +38,10 @@
3838
<VisibleItems>Attributes, InheritedMembers, InheritedFrameworkMembers, Protected, SealedProtected</VisibleItems>
3939
<ComponentConfigurations />
4040
<DocumentationSources>
41-
<DocumentationSource sourceFile="..\src\Umbraco.Core\Umbraco.Core.csproj" />
42-
<DocumentationSource sourceFile="..\src\Umbraco.Core\bin\Release\Umbraco.Core.xml" />
43-
<DocumentationSource sourceFile="..\src\Umbraco.Web\Umbraco.Web.csproj" />
44-
<DocumentationSource sourceFile="..\src\Umbraco.Web\bin\Release\umbraco.xml" /></DocumentationSources>
41+
<DocumentationSource sourceFile="..\..\src\Umbraco.Core\Umbraco.Core.csproj" />
42+
<DocumentationSource sourceFile="..\..\src\Umbraco.Core\bin\Release\Umbraco.Core.xml" />
43+
<DocumentationSource sourceFile="..\..\src\Umbraco.Web\Umbraco.Web.csproj" />
44+
<DocumentationSource sourceFile="..\..\src\Umbraco.Web\bin\Release\umbraco.xml" /></DocumentationSources>
4545
<WebsiteSdkLinkType>None</WebsiteSdkLinkType>
4646
<HtmlSdkLinkType>None</HtmlSdkLinkType>
4747
<IncludeFavorites>False</IncludeFavorites>

build/BuildBelle.bat

Lines changed: 0 additions & 32 deletions
This file was deleted.

build/BuildDocs.ps1

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
##We cannot continue if sandcastle is not installed determined by env variable: SHFBROOT
2+
3+
if (-not (Test-Path Env:\SHFBROOT))
4+
{
5+
throw "The docs cannot be build, install Sandcastle help file builder"
6+
}
7+
8+
$PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path).FullName
9+
$BuildRoot = Split-Path -Path $PSScriptFilePath -Parent
10+
$OutputPath = Join-Path -Path $BuildRoot -ChildPath "ApiDocs\Output"
11+
$ProjFile = Join-Path -Path $BuildRoot -ChildPath "ApiDocs\csharp-api-docs.shfbproj"
12+
13+
"Building docs with project file: $ProjFile"
14+
15+
$MSBuild = "$Env:SYSTEMROOT\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"
16+
17+
# build it!
18+
& $MSBuild "$ProjFile"
19+
20+
# remove files left over
21+
Remove-Item $BuildRoot\* -include csharp-api-docs.shfbproj_*
22+
23+
# copy our custom styles in
24+
Copy-Item $BuildRoot\ApiDocs\TOC.css $OutputPath\TOC.css
25+
26+
""
27+
"Done!"

0 commit comments

Comments
 (0)