Skip to content

Commit f8916fd

Browse files
maureiBart Koelman
and
Bart Koelman
authored
Docs customised home page (#892)
* customized documentation home page * fix typo * remove whitespace * Spelling fixes * Updated script and notes for running locally * doc home page upgrade * revert commented out lines in buildscript * Various tweaks and improvements * review Co-authored-by: Bart Koelman <bart@degreed.com>
1 parent d2d0e09 commit f8916fd

18 files changed

+1035
-57
lines changed

appveyor.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ after_build:
3535
git clone https://github.com/json-api-dotnet/JsonApiDotNetCore.git -b gh-pages origin_site -q
3636
Copy-Item origin_site/.git _site -recurse
3737
Copy-Item CNAME _site/CNAME
38+
Copy-Item home/index.html _site/index.html
39+
Copy-Item home/favicon.icon _site/favicon.icon
40+
Copy-Item home/assets/* _site/styles/ -Recurse
3841
CD _site
3942
git add -A 2>&1
4043
git commit -m "CI Updates" -q

docs/README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1-
# Running
1+
# Intro
2+
Documentation for JsonApiDotNetCore is produced using [DocFX](https://dotnet.github.io/docfx/) from several files in this directory.
3+
In addition, the example request/response pairs are generated by executing `curl` commands against the GettingStarted project.
24

5+
# Installation
6+
Run the following commands once to setup your system:
7+
```
8+
choco install docfx -y
9+
```
10+
```
11+
npm install -g httpserver
12+
```
13+
14+
# Running
15+
The next command regenerates the documentation website and opens it in your default browser:
316
```
4-
./generate.sh
5-
docfx ./docfx.json --serve
17+
pwsh ./build-dev.ps1
618
```

docs/build-dev.ps1

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This script assumes that you have already installed docfx and httpserver.
2+
# If that's not the case, run the next commands:
3+
# choco install docfx -y
4+
# npm install -g httpserver
5+
6+
Remove-Item _site -Recurse -ErrorAction Ignore
7+
8+
dotnet build .. --configuration Release
9+
Invoke-Expression ./generate-examples.ps1
10+
11+
docfx ./docfx.json
12+
Copy-Item home/index.html _site/index.html
13+
Copy-Item home/favicon.ico _site/favicon.ico
14+
Copy-Item -Recurse home/assets/* _site/styles/
15+
16+
cd _site
17+
httpserver &
18+
Start-Process "http://localhost:8080/"
19+
20+
Write-Host ""
21+
Write-Host "Web server started. Press Enter to close."
22+
$key = [Console]::ReadKey()

docs/docfx.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
],
1717
"build": {
1818
"content": [
19-
{
20-
"files": [ "api/**.yml", "api/index.md" ]
21-
},
2219
{
2320
"files": [
21+
"api/**.yml",
22+
"api/index.md",
2423
"getting-started/**.md",
2524
"getting-started/**/toc.yml",
2625
"usage/**.md",

0 commit comments

Comments
 (0)