Skip to content

Commit fb13ea1

Browse files
authored
setup doc site (fszlin#130)
* configure docfx * deploy gh-pages
1 parent ee5d1a8 commit fb13ea1

16 files changed

+327
-8
lines changed

.appveyor.yml

+26-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ nuget:
1818
environment:
1919
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
2020
DOTNET_CLI_TELEMETRY_OPTOUT: 1
21+
DOCFX_SOURCE_BRANCH_NAME: master
22+
GITHUB_ACCESS_TOKEN:
23+
secure: MZeiiHM6tnTZKRr0x2MsNUK/kOjSKNMZd/48f2uBs8j5bge+JygXE+flTSI16yxC
2124

2225
cache:
2326

@@ -58,17 +61,38 @@ test_script:
5861
- ps: cd test/Certes.Tests
5962
- ps: >-
6063
& $openCover "-register:user" "-target:dotnet.exe" "-targetargs:xunit -fxversion 2.0.0 -configuration Release -nobuild -maxthreads 4" "-oldstyle" "-output:./../../build/Certes.Tests.coverage.xml" "-filter:+[*]Certes.* -[*Tests*]*" "-hideskipped:All" "-returntargetcode"
61-
- ps: cd ../../
64+
- ps: cd $env:APPVEYOR_BUILD_FOLDER
6265
- ps: cd test/Certes.Tests.Integration
6366
- ps: >-
6467
& $openCover "-register:user" "-target:dotnet.exe" "-targetargs:xunit -fxversion 2.0.0 -configuration Release -nobuild -maxthreads 4" "-oldstyle" "-output:./../../build/Certes.Tests.Integration.coverage.xml" "-filter:+[*]Certes.* -[*Tests*]*" "-hideskipped:All" "-returntargetcode"
65-
- ps: cd ../../
68+
- ps: cd $env:APPVEYOR_BUILD_FOLDER
6669

6770
after_test:
6871
- npm install codecov -g -q
6972
- codecov -f "./build/Certes.Tests.coverage.xml" -F unit > $null
7073
- codecov -f "./build/Certes.Tests.Integration.coverage.xml" -F integration > $null
7174

75+
on_success:
76+
# gh-pages
77+
- ps: |
78+
If (-Not $env:APPVEYOR_PULL_REQUEST_TITLE -And $env:APPVEYOR_REPO_BRANCH -Eq "master")
79+
{
80+
choco install docfx -y
81+
docfx docs/docfx.json
82+
git config --global core.autocrlf false
83+
git config --global credential.helper store
84+
git config --global user.email [email protected]
85+
git config --global user.name ci
86+
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GITHUB_ACCESS_TOKEN):[email protected]`n"
87+
git clone https://github.com/fszlin/certes.git -b gh-pages gh-pages -q
88+
Copy-Item ./docs/_site/* ./gh-pages/ -Recurse -Container -Force
89+
cd gh-pages
90+
git add -A 2>&1
91+
git commit -m "ci-$($env:APPVEYOR_BUILD_NUMBER)" -q
92+
git push origin gh-pages -q
93+
cd $env:APPVEYOR_BUILD_FOLDER
94+
}
95+
7296
configuration: Release
7397

7498
artifacts:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,4 @@ data.json
249249
gh-pages/
250250
launchSettings.json
251251
local.settings.json
252+
.vscode/

docs/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_site
2+
api/certes

docs/APIv2.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# API for ACME v2
33

4-
This document details the API exposed for handling ACME flows, as of [draft-09][draft-09].
4+
This document details the API exposed for handling ACME flows, as of [draft-12][draft].
55

66

77
## Initialization
@@ -251,4 +251,4 @@ context.RevokeCertificate(cert.ToDer(), RevocationReason.KeyCompromise, certKey)
251251
* External Account Binding
252252
-->
253253

254-
[draft-09]: https://tools.ietf.org/html/draft-ietf-acme-acme-09
254+
[draft]: https://tools.ietf.org/html/draft-ietf-acme-acme-12

docs/CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4-
## [Unreleased]
4+
## [2.3.0] - 2018-06-15
55
### Added
66
- Support `tls-alpn-01` challenge ([#125][i125])
77
- Add `ACME` error details to exception messages ([#109][i109])
@@ -83,7 +83,8 @@ All notable changes to this project will be documented in this file.
8383
[2.2.0]: https://github.com/fszlin/certes/compare/v2.1.0...v2.2.0
8484
[2.2.1]: https://github.com/fszlin/certes/compare/v2.2.0...v2.2.1
8585
[2.2.2]: https://github.com/fszlin/certes/compare/v2.2.1...v2.2.2
86-
[Unreleased]: https://github.com/fszlin/certes/compare/v2.2.2...HEAD
86+
[2.3.0]: https://github.com/fszlin/certes/compare/v2.2.2...v2.3.0
87+
[Unreleased]: https://github.com/fszlin/certes/compare/v2.3.0...HEAD
8788

8889
[i5]: https://github.com/fszlin/certes/issues/5
8990
[i22]: https://github.com/fszlin/certes/issues/22

docs/api/toc.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- name: ACME
2+
href: ../APIv2.md
3+
- name: Reference
4+
href: certes/toc.yml

docs/docfx.json

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"metadata": [
3+
{
4+
"src": [
5+
{
6+
"files": [
7+
"src/Certes/**.csproj"
8+
],
9+
"src": "../"
10+
}
11+
],
12+
"dest": "api/certes",
13+
"properties": {
14+
"TargetFramework": "netstandard2.0"
15+
},
16+
"disableGitFeatures": false
17+
}
18+
],
19+
"build": {
20+
"content": [
21+
{
22+
"files": [
23+
"api/**.yml",
24+
"api/**.md"
25+
]
26+
},
27+
{
28+
"files": [
29+
"toc.yml",
30+
"*.md"
31+
]
32+
}
33+
],
34+
"resource": [
35+
{
36+
"files": [
37+
"images/**"
38+
]
39+
}
40+
],
41+
"overwrite": [
42+
{
43+
"files": [
44+
"apidoc/**.md"
45+
],
46+
"exclude": [
47+
"obj/**",
48+
"_site/**"
49+
]
50+
}
51+
],
52+
"globalMetadata": {
53+
"_appTitle": "Certes",
54+
"_gitContribute": {
55+
"repo": "https://github.com/fszlin/certes",
56+
"branch": "master",
57+
"apiSpecFolder": "docs/overwrite"
58+
},
59+
"_appLogoPath": "images/logo.svg",
60+
"_appFaviconPath": "images/favicon.ico",
61+
"_appFooter": "&copy; 2018 <a href=\"https://github.com/fszlin/certes\">Certes</a> Project"
62+
},
63+
"dest": "_site",
64+
"globalMetadataFiles": [],
65+
"fileMetadataFiles": [],
66+
"template": [
67+
"default",
68+
"tmpl"
69+
],
70+
"postProcessors": [],
71+
"markdownEngineName": "markdig",
72+
"noLangKeyword": false,
73+
"keepFileLink": false,
74+
"cleanupCacheHistory": false,
75+
"disableGitFeatures": false,
76+
"sitemap": {
77+
"baseUrl": "https://docs.certes.app/"
78+
}
79+
}
80+
}

docs/images/favicon.ico

1.12 KB
Binary file not shown.

docs/images/logo.svg

+28
Loading

docs/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[!include[README](README.md)]

docs/tmpl/partials/head.tmpl.partial

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
2+
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6+
<title>{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}</title>
7+
<meta name="viewport" content="width=device-width">
8+
<meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
9+
<meta name="generator" content="docfx {{_docfxVersion}}">
10+
{{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
11+
<link rel="shortcut icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
12+
<link rel="stylesheet" href="{{_rel}}styles/docfx.vendor.css">
13+
<link rel="stylesheet" href="{{_rel}}styles/docfx.css">
14+
<link rel="stylesheet" href="{{_rel}}styles/main.css">
15+
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-oi8o31xSQq8S0RpBcb4FaLB8LJi9AT8oIdmS1QldR8Ui7KUQjNAnDlJjp55Ba8FG" crossorigin="anonymous">
16+
<meta property="docfx:navrel" content="{{_navRel}}">
17+
<meta property="docfx:tocrel" content="{{_tocRel}}">
18+
{{#_noindex}}<meta name="searchOption" content="noindex">{{/_noindex}}
19+
{{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
20+
{{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}}
21+
<script type="text/javascript">
22+
var appInsights=window.appInsights||function(a){function b(a){c[a]=function(){var b=arguments;c.queue.push(function(){c[a].apply(c,b)})}}var c={config:a},d=document,e=window;setTimeout(function(){var b=d.createElement("script");b.src=a.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js",d.getElementsByTagName("script")[0].parentNode.appendChild(b)});try{c.cookie=d.cookie}catch(a){}c.queue=[];for(var f=["Event","Exception","Metric","PageView","Trace","Dependency"];f.length;)b("track"+f.pop());if(b("setAuthenticatedUserContext"),b("clearAuthenticatedUserContext"),b("startTrackEvent"),b("stopTrackEvent"),b("startTrackPage"),b("stopTrackPage"),b("flush"),!a.disableExceptionTracking){f="onerror",b("_"+f);var g=e[f];e[f]=function(a,b,d,e,h){var i=g&&g(a,b,d,e,h);return!0!==i&&c["_"+f](a,b,d,e,h),i}}return c}({instrumentationKey:"9aaf9896-bee3-4d08-abb6-2ef51b389035"});
23+
window.appInsights=appInsights,appInsights.queue&&0===appInsights.queue.length&&appInsights.trackPageView();
24+
</script>
25+
</head>

docs/tmpl/partials/li.tmpl.partial

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
2+
3+
<ul class="nav level{{level}}">
4+
{{#items}}
5+
<li>
6+
{{^leaf}}
7+
<span class="expand-stub">
8+
<i class="fal fa-plus-hexagon"></i>
9+
<i class="fal fa-minus-hexagon"></i>
10+
</span>
11+
{{/leaf}}
12+
{{#topicHref}}
13+
<a href="{{topicHref}}" name="{{tocHref}}" title="{{name}}">{{name}}</a>
14+
{{/topicHref}}
15+
{{^topicHref}}
16+
<a>{{{name}}}</a>
17+
{{/topicHref}}
18+
{{^leaf}}
19+
{{>partials/li}}
20+
{{/leaf}}
21+
</li>
22+
{{/items}}
23+
</ul>

docs/tmpl/styles/main.css

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
html,
2+
body {
3+
font-size: 18px;
4+
}
5+
6+
svg:hover path[fill="#4F9FE1"] {
7+
fill: #4F9FE1;
8+
}
9+
10+
svg:hover path[fill="#03477F"] {
11+
fill: #03477F;
12+
}
13+
14+
svg:hover path[fill="url(#A)"] {
15+
fill: url(#A);
16+
}
17+
18+
svg:hover path[fill="none"] {
19+
fill: none;
20+
}
21+
22+
svg:hover path[fill="url(#B)"] {
23+
fill: url(#B);
24+
}
25+
26+
.toc .nav > li.active > .expand-stub::before,
27+
.toc .nav > li.in > .expand-stub::before,
28+
.toc .nav > li.in.active > .expand-stub::before,
29+
.toc .nav > li.filtered > .expand-stub::before {
30+
content: "";
31+
}
32+
33+
.toc .nav > li > .expand-stub::before,
34+
.toc .nav > li.active > .expand-stub::before {
35+
content: "";
36+
}
37+
38+
.toc .nav > li > .expand-stub {
39+
font-size: smaller;
40+
top: 3px;
41+
left: -10px;
42+
}
43+
44+
.toc .nav > li > .expand-stub > .fa-plus-hexagon {
45+
display: inline-block;
46+
}
47+
48+
.toc .nav > li > .expand-stub > .fa-minus-hexagon {
49+
display: none;
50+
}
51+
52+
.toc .nav > li.in > .expand-stub > .fa-plus-hexagon {
53+
display: none;
54+
}
55+
56+
.toc .nav > li.in > .expand-stub > .fa-minus-hexagon {
57+
display: inline-block;
58+
}
59+
60+
.affix ul ul > li > a:before {
61+
content: '';
62+
}
63+
64+
.docs-search > .search-query {
65+
font-size: 18px;
66+
}
67+
68+
#search-results > .search-list {
69+
font-size: 2.5rem;
70+
}
71+
72+
#search-results p .index-loading {
73+
font-size: 2.5rem;
74+
}
75+
76+
#search-results .sr-items {
77+
font-size: 28px;
78+
}
79+
80+
.sr-item {
81+
margin-bottom: 29px;
82+
}
83+
84+
.sr-item > .item-href {
85+
font-size: 18px;
86+
}
87+
88+
.sr-item > .item-brief {
89+
font-size: 17px;
90+
}
91+
92+
.toc ul {
93+
font-size: 16px;
94+
}
95+
96+
.toc .level1 > li {
97+
font-size: 20px;
98+
}
99+
100+
.toc .level2 {
101+
font-size: 18px;
102+
}
103+
104+
.sideaffix {
105+
font-size: 16px;
106+
}
107+
108+
.sideaffix > div.contribution > ul > li > a.contribution-link {
109+
font-size: 16px;
110+
}
111+
112+
.affix h5 {
113+
font-size: 16px;
114+
}
115+
116+
.affix > ul > li > a:before {
117+
font-size: 20px;
118+
}
119+
120+
.tryspan {
121+
font-size: 16px;
122+
}
123+
124+
.toc .nav > li > a {
125+
margin-left: 12px;
126+
}

docs/toc.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- name: API
2+
href: api/
3+
- name: Changelog
4+
href: CHANGELOG.md

0 commit comments

Comments
 (0)