Skip to content

Commit

Permalink
(GH-18) Added Wyam Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gep13 committed Feb 15, 2017
1 parent bb4567b commit c9a65c5
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 21 deletions.
43 changes: 22 additions & 21 deletions README.md
@@ -1,34 +1,35 @@
# Cake.DocFx

![nuget release](https://img.shields.io/nuget/vpre/Cake.DocFx.svg)
# Cake.DocFx Addin

This Addin for the Cake Build Automation System allows you to generate a documentation website with [docfx](http://dotnet.github.io/docfx/index.html). More about Cake at http://cakebuild.net

## Use the addin
[![License](http://img.shields.io/:license-mit-blue.svg)](http://cake-contrib.mit-license.org)

To use docfx in your cake file simply import it and the docfx tool. Then define a doc task.
```cake
#addin "Cake.DocFx"
#tool "docfx.console"
## Information

Task("doc").Does(() => DocFx());
```
> Do not forget to load '#tool "docfx.console"' at top of your cake file. Otherwise, you can not run the `DocFx()` command.
||Stable|Pre-release|
|:--:|:--:|:--:|
|GitHub Release|-|[![GitHub release](https://img.shields.io/github/release/cake-contrib/Cake.DocFx.svg)](https://github.com/cake-contrib/Cake.DocFx/releases/latest)|
|NuGet|[![NuGet](https://img.shields.io/nuget/v/Cake.DocFx.svg)](https://www.nuget.org/packages/Cake.DocFx)|[![NuGet](https://img.shields.io/nuget/vpre/Cake.DocFx.svg)](https://www.nuget.org/packages/Cake.DocFx)|

## Build Status

|Develop|Master|
|:--:|:--:|
|[![Build status](https://ci.appveyor.com/api/projects/status/clgjyeqo4n0j232i/branch/develop?svg=true)](https://ci.appveyor.com/project/cakecontrib/cake-docfx/branch/develop)|[![Build status](https://ci.appveyor.com/api/projects/status/clgjyeqo4n0j232i/branch/develop?svg=true)](https://ci.appveyor.com/project/cakecontrib/cake-docfx/branch/master)|

If the `docfx.json` file is anywhere else then the root directory you can pass in the location as parameter.
## Code Coverage

```cake
#addin "Cake.DocFx"
#tool "docfx.console"
[![Coverage Status](https://coveralls.io/repos/github/cake-contrib/Cake.DocFx/badge.svg?branch=develop)](https://coveralls.io/github/cake-contrib/Cake.DocFx?branch=develop)

Task("doc").Does(() => DocFx("./docs/docfx.json"));
```
## Quick Links

- [Documentation](https://cake-contrib.github.io/Cake.DocFx)

> **INFO**
>
> The `DocFx` command requires an existing `docfx.json` file. To bootstrap docfx use `docfx init` or `./tools/docfx.console/tools/docfx.exe init`.
## Chat Room

Come join in the conversation about Cake.DocFx in our Gitter Chat Room

[![Join the chat at https://gitter.im/cake-contrib/Lobby](https://badges.gitter.im/cake-contrib/Lobby.svg)](https://gitter.im/cake-contrib/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## Build

Expand All @@ -41,8 +42,8 @@ On Windows PowerShell run:
```

On OSX/Linux run:

```bash
./build.sh
```

Run `-t pack` alias to create a nuget package.
1 change: 1 addition & 0 deletions config.wyam
@@ -0,0 +1 @@
System.Globalization.CultureInfo.DefaultThreadCurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-GB");
20 changes: 20 additions & 0 deletions docs/input/assets/css/override.css
@@ -0,0 +1,20 @@
/* Control the margin for bootstrap alert boxes */
.alert > p {
margin-top: 0px;
}

/* Control the look and feel of the copy box applied to code sections */
.btn-copy[disabled] .clippy {
opacity: .3;
}
pre .btn-copy {
-webkit-transition: opacity 0.3s ease-in-out;
-o-transition: opacity 0.3s ease-in-out;
transition: opacity 0.3s ease-in-out;
opacity: 0;
padding: 2px 6px;
float: right;
}
pre:hover .btn-copy {
opacity: 1;
}
3 changes: 3 additions & 0 deletions docs/input/assets/images/clippy.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/input/assets/js/anchor.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions docs/input/assets/js/clipboard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions docs/input/docs/index.cshtml
@@ -0,0 +1,19 @@
---
Title: Documentation
---
<p>This user guide, like Cake.DocFx itself, is under very active development. Some parts of it aren't
documented as completely as they need to be, but we glady accept your contributions.</p>

<p>We need your help to improve the documentation for Cake.DocFx, so if there is something that you
would like to add then you can edit the content directly on GitHub.</p>

@foreach(IDocument child in Model.DocumentList(Keys.Children).OrderBy(x => x.Get<int>(DocsKeys.Order, 1000)))
{
<h1>@(child.String(Keys.Title))</h1>
if(child.ContainsKey(DocsKeys.Description))
{
<p>@Html.Raw(child.String(DocsKeys.Description))</p>
}

@Html.Partial("_ChildPages", child)
}

0 comments on commit c9a65c5

Please sign in to comment.