Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions BuildVersion.msbuildproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<!--
Workaround annoying recurring bug: (IDE, MSBUILD, NoTargets?) Force x86 to AnyCPU.
Bug is that anything cares or sets a default that the IDE can't set causing it to occur.
-->
<Platform Condition="'$(Platform)'=='x86'">AnyCPU</Platform>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'" />

<ItemGroup>
<None Include="Build-docs.ps1"/>
</ItemGroup>
Expand Down
21 changes: 10 additions & 11 deletions docfx/documentation.msbuildproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<!--
Workaround annoying recurring bug: (IDE, MSBUILD, NoTargets?) Force x86 to AnyCPU.
Bug is that anything cares or sets a default that the IDE can't set causing it to occur.
-->
<Platform Condition="'$(Platform)'=='x86'">AnyCPU</Platform>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'" />
<!--
This projects serves as a convenient placeholder to reference the doc files. It uses project relative include
and exclude patterns to simplify referencing ALL files but skipping over the generated API files.
(Getting docfx to generate files into a folder outside of the build tree (IntermediateOutputPath) but then
reference content from that is an exercise in frustration - problem unsolved. So this is used instead.)
-->

<ItemGroup>
<!--Every FILE in this folder except this project file itself-->
<None Include="*.*" Exclude="$(MSBuildThisFile)" />
<None Include="templates/**"/>
<None Include="templates/**" />
</ItemGroup>

<ItemGroup>
<!--Everything in the LLVM sub-folders except the API folder as that contains generated files -->
<None Include="llvm/**" Exclude="llvm/api/**" />
Expand All @@ -24,36 +28,31 @@
<None Include="llvm/api/*.png" />
<None Include="llvm/api/llvm-xref.yml" />
</ItemGroup>

<ItemGroup>
<!--Everything in the runtime-utils sub-folders except the API folder as that contains generated files -->
<None Include="runtime-utils/**" Exclude="runtime-utils/api/**" />
<!-- Explicitly call out the non-generated files in the API folder-->
<None Include="runtime-utils/api/index.md" />
</ItemGroup>

<ItemGroup>
<!--Everything in the extensions sub-folders except the API folder as that contains generated files -->
<None Include="extensions/**" Exclude="extensions/api/**" />
<!-- Explicitly call out the non-generated files in the API folder-->
<None Include="extensions/api/index.md" />
</ItemGroup>

<ItemGroup>
<!--Everything in the antlr-utils sub-folders except the API folder as that contains generated files -->
<None Include="antlr-utils/**" Exclude="antlr-utils/api/**" />
<!-- Explicitly call out the non-generated files in the API folder-->
<None Include="antlr-utils/api/index.md" />
</ItemGroup>

<ItemGroup>
<!--Everything in the interop-helpers sub-folders except the API folder as that contains generated files -->
<None Include="interop-helpers/**" Exclude="interop-helpers/api/**" />
<!-- Explicitly call out the non-generated files in the API folder-->
<None Include="interop-helpers/api/index.md" />
</ItemGroup>

<Target Name="AlwaysRun" BeforeTargets="AfterBuild">
<Message Importance="High" Text="NOTE: Building $(MSBuildProjectFile) does NOTHING, docs are built using the docfx tool. This project is simply a convenient placeholder for organizing/editing files"/>
<Message Importance="High" Text="NOTE: Building $(MSBuildProjectFile) does NOTHING, docs are built using the docfx tool. This project is simply a convenient placeholder for organizing/editing files" />
</Target>
</Project>
</Project>
160 changes: 160 additions & 0 deletions docfx/templates/Ubiquity/layout/_master.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
{{!include(/^public/.*/)}}
{{!include(favicon.ico)}}
{{!include(logo.svg)}}
<!DOCTYPE html>
<html {{#_lang}}lang="{{_lang}}"{{/_lang}}>
<head>
<meta charset="utf-8">
{{#redirect_url}}
<meta http-equiv="refresh" content="0;URL='{{redirect_url}}'">
{{/redirect_url}}
{{^redirect_url}}
<title>{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
{{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
{{#description}}<meta name="description" content="{{description}}">{{/description}}
<link rel="icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
<link rel="stylesheet" href="{{_rel}}public/docfx.min.css">
<link rel="stylesheet" href="{{_rel}}public/main.css">
<meta name="docfx:navrel" content="{{_navRel}}">
<meta name="docfx:tocrel" content="{{_tocRel}}">
{{#_noindex}}<meta name="searchOption" content="noindex">{{/_noindex}}
{{#_enableSearch}}<meta name="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
{{#_disableNewTab}}<meta name="docfx:disablenewtab" content="true">{{/_disableNewTab}}
{{#_disableTocFilter}}<meta name="docfx:disabletocfilter" content="true">{{/_disableTocFilter}}
{{#docurl}}<meta name="docfx:docurl" content="{{docurl}}">{{/docurl}}
<meta name="loc:inThisArticle" content="{{__global.inThisArticle}}">
<meta name="loc:searchResultsCount" content="{{__global.searchResultsCount}}">
<meta name="loc:searchNoResults" content="{{__global.searchNoResults}}">
<meta name="loc:tocFilter" content="{{__global.tocFilter}}">
<meta name="loc:nextArticle" content="{{__global.nextArticle}}">
<meta name="loc:prevArticle" content="{{__global.prevArticle}}">
<meta name="loc:themeLight" content="{{__global.themeLight}}">
<meta name="loc:themeDark" content="{{__global.themeDark}}">
<meta name="loc:themeAuto" content="{{__global.themeAuto}}">
<meta name="loc:changeTheme" content="{{__global.changeTheme}}">
<meta name="loc:copy" content="{{__global.copy}}">
<meta name="loc:downloadPdf" content="{{__global.downloadPdf}}">

<script type="module" src="./{{_rel}}public/docfx.min.js"></script>

<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>

{{#_googleAnalyticsTagId}}
<script async src="https://www.googletagmanager.com/gtag/js?id={{_googleAnalyticsTagId}}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', '{{_googleAnalyticsTagId}}');
</script>
{{/_googleAnalyticsTagId}}
{{/redirect_url}}
</head>

{{^redirect_url}}
<body class="tex2jax_ignore" data-layout="{{_layout}}{{layout}}" data-yaml-mime="{{yamlmime}}">
<header class="bg-body border-bottom">
{{^_disableNavbar}}
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="{{_appLogoUrl}}{{^_appLogoUrl}}{{_rel}}index.html{{/_appLogoUrl}}">
<img id="logo" class="svg" src="{{_rel}}{{{_appLogoPath}}}{{^_appLogoPath}}logo.svg{{/_appLogoPath}}" alt="{{_appName}}" >
{{_appName}}
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
{{#_enableSearch}}
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="{{__global.search}}" autocomplete="off" aria-label="Search">
</form>
{{/_enableSearch}}
</div>
</div>
</div>
</nav>
{{/_disableNavbar}}
</header>

<main class="container-xxl">
{{^_disableToc}}
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
{{/_disableToc}}

<div class="content">
<div class="actionbar">
{{^_disableToc}}
<button class="btn btn-lg border-0 d-md-none"
type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas"
aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
{{/_disableToc}}

{{^_disableBreadcrumb}}
<nav id="breadcrumb"></nav>
{{/_disableBreadcrumb}}
</div>

<article data-uid="{{uid}}">
{{!body}}
</article>

{{^_disableContribution}}
<div class="contribution d-print-none">
{{#sourceurl}}
<a href="{{sourceurl}}" class="edit-link">{{__global.improveThisDoc}}</a>
{{/sourceurl}}
{{^sourceurl}}{{#docurl}}
<a href="{{docurl}}" class="edit-link">{{__global.improveThisDoc}}</a>
{{/docurl}}{{/sourceurl}}
</div>
{{/_disableContribution}}

{{^_disableNextArticle}}
<div class="next-article d-print-none border-top" id="nextArticle"></div>
{{/_disableNextArticle}}

</div>

{{^_disableAffix}}
<div class="affix">
<nav id="affix"></nav>
</div>
{{/_disableAffix}}
</main>

{{#_enableSearch}}
<div class="container-xxl search-results" id="search-results"></div>
{{/_enableSearch}}

<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
{{{_appFooter}}}{{^_appFooter}}<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>{{/_appFooter}}
{{#_buildVersion}}- Build: {{_buildVersion}}{{/_buildVersion}}
</div>
</div>
</footer>
</body>
{{/redirect_url}}
</html>
5 changes: 5 additions & 0 deletions docfx/templates/Ubiquity/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ tutorials. (No surprise that one isn't supported) [Though it oddly IS supported
directly in the [Local MarkDig based editor](https://github.com/MadsKristensen/MarkdownEditor2022)
used to edit these files... [Go Figure! :shrug: ]

## layout/_master.tmpl
This is mostly borrowed from the official DocFX `modern` template. However, the build
version number was added to the footer. Unfortunately no simpler means was found to do
that.

## Theming
This template also updates the theme for SVG image backgrounds to improve
readability of the parse diagrams. It also updates the HighlightJS classifiers
Expand Down
Loading