Skip to content

Commit

Permalink
Add in static site
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamithorn committed Dec 14, 2021
1 parent 0c647c2 commit f48669e
Show file tree
Hide file tree
Showing 8 changed files with 479 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and Deploy Documentation
on:
push:
branches:
- main

jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Parse Docs
uses: nikeee/[email protected]
with:
args: metadata docs/docfx.json

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Transform ToC
run: cd docs && yarn && sudo node toc.js

- name: Build Docs
uses: nikeee/[email protected]
with:
args: build docs/docfx.json

- name: Deploy Docs
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: site/html
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,6 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# docs
site/
40 changes: 40 additions & 0 deletions docs/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"metadata": [
{
"src": [
{
"files": ["**/Gossip.csproj"],
"exclude": ["**/bin/**", "**/obj/**"],
"src": "../"
}
],
"dest": "../site/yml/api"
}
],
"build": {
"content": [
{
"files": [ "**/*.yml" ],
"src": "../site/yml/api",
"dest": "api"
},
{
"files": [
"*.md",
"toc.yml"
]
}
],
"template": [
"default",
"templates/material"
],
"globalMetadata": {
"_appTitle": "Gossip",
"_enableSearch": true
},
"markdownEngineName": "markdig",
"dest": "../site/html",
"xrefService": [ "https://xref.docs.microsoft.com/query?uid={uid}" ]
}
}
10 changes: 10 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "gossip-docs",
"description": "Documentation generator for the Gossip C# package",
"version": "1.0.0",
"author": "",
"dependencies": {
"js-yaml": "4.1.0"
},
"license": "MIT"
}
21 changes: 21 additions & 0 deletions docs/templates/material/partials/head.tmpl.partial
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{!Copyright (c) Oscar Vasquez. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
<meta name="generator" content="docfx {{_docfxVersion}}">
{{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
<link rel="shortcut icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
<link rel="stylesheet" href="{{_rel}}styles/docfx.vendor.css">
<link rel="stylesheet" href="{{_rel}}styles/docfx.css">
<link rel="stylesheet" href="{{_rel}}styles/main.css">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<meta property="docfx:navrel" content="{{_navRel}}">
<meta property="docfx:tocrel" content="{{_tocRel}}">
{{#_noindex}}<meta name="searchOption" content="noindex">{{/_noindex}}
{{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
{{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}}
</head>
Loading

0 comments on commit f48669e

Please sign in to comment.