Skip to content

Commit 55c7202

Browse files
committed
doc: improve document
1 parent de9bf57 commit 55c7202

File tree

8 files changed

+94
-65
lines changed

8 files changed

+94
-65
lines changed

README.md

+17-5
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,34 @@
66
[![License](https://img.shields.io/badge/license-MIT-C06524)](https://github.com/netpyoung/NF.Tool.ReleaseNoteMaker/blob/main/LICENSE.md)
77
[![NuGet](https://img.shields.io/nuget/v/dotnet-release-note.svg?style=flat&label=NuGet%3A%20dotnet-release-note)](https://www.nuget.org/packages/dotnet-release-note/)
88

9-
wip
9+
WIP
1010

11-
based on python [TownCrier](https://github.com/twisted/towncrier)
11+
- Reinvent the wheel
1212

13-
- [doc](https://netpyoung.github.io/NF.Tool.ReleaseNoteMaker/)
13+
## Overview
14+
15+
`NF.Tool.ReleaseNoteMaker (akka. dotnet-release-note)` simplifies changelog creation in .NET projects by mimicking the functionality of Python's [twisted/towncrier](https://github.com/twisted/towncrier).
16+
It enables developers to manage changelog entries incrementally and consolidate them during release.
1417

1518
## Install
1619

1720
``` bash
1821
dotnet tool install --global dotnet-release-note
1922
```
2023

21-
## used
24+
## Document
25+
26+
- [Documentation](https://netpyoung.github.io/NF.Tool.ReleaseNoteMaker/concept.html)
27+
28+
## Dependencies
2229

2330
- use [Toml format](https://toml.io/en/) and [xoofx/Tomlyn library](https://github.com/xoofx/Tomlyn) for Config file.
2431
- use [T4 template](https://learn.microsoft.com/en-us/visualstudio/modeling/code-generation-and-t4-text-templates) and [mono/t4 library](https://github.com/mono/t4).
2532
- use [Spectre.Console](https://spectreconsole.net/) for console output.
2633
- use [Spectre.Console.Cli](https://spectreconsole.net/cli/) for parse args.
27-
- use [SmartFormat](https://github.com/axuno/SmartFormat) for format string.
34+
- use [SmartFormat](https://github.com/axuno/SmartFormat) for format string.
35+
36+
## License
37+
38+
This project is licensed under the MIT License. See the [LICENSE](https://github.com/netpyoung/NF.Tool.ReleaseNoteMaker/blob/main/LICENSE.md) file for details.
39+

docfx/docs/command/command_create.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
- Create a new fragment
44

55
``` txt
6-
{IssueName}.{TypeCategory}({RetryCount}.).md
6+
{IssueName}.{TypeCategory}(.{RetryCount}).md
77
```
88

9+
- IssueName
910
- TypeCategory
10-
- [ReleaseNote.config.toml](../ReleaseNote.config.toml.md#releasenotetype)
11+
- [ReleaseNote.config.toml](../setup/config.md#releasenotetype)
12+
- RetryCount

docfx/docs/concept.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Concept
2+
3+
news fragments/newsfiles/topfiles
4+
5+
## Example
6+
7+
``` txt
8+
USAGE:
9+
dotnet release-note [OPTIONS] <COMMAND>
10+
11+
EXAMPLES:
12+
dotnet release-note init
13+
dotnet release-note create --edit
14+
dotnet release-note create 1.added.md --content "Hello World"
15+
dotnet release-note build --version 1.0.0
16+
dotnet release-note check
17+
18+
OPTIONS:
19+
-h, --help Prints help information
20+
21+
COMMANDS:
22+
init Init release-note setup
23+
create Create a new fragment
24+
preview Preview a release note
25+
build Build a release note
26+
check Checks files changed
27+
```

docfx/docs/index.md

+1-31
Original file line numberDiff line numberDiff line change
@@ -1,31 +1 @@
1-
# Introduction
2-
3-
- [repo](https://github.com/netpyoung/NF.Tool.ReleaseNoteMaker/)
4-
5-
- [towncrier](https://towncrier.readthedocs.io/)
6-
7-
news fragments/newsfiles/topfiles
8-
9-
## Example
10-
11-
``` txt
12-
USAGE:
13-
dotnet release-note [OPTIONS] <COMMAND>
14-
15-
EXAMPLES:
16-
dotnet release-note init
17-
dotnet release-note create --edit
18-
dotnet release-note create 1.added.md --content "Hello World"
19-
dotnet release-note build --version 1.0.0
20-
dotnet release-note check
21-
22-
OPTIONS:
23-
-h, --help Prints help information
24-
25-
COMMANDS:
26-
init Init release-note setup
27-
create Create a new fragment
28-
preview Preview a release note
29-
build Build a release note
30-
check Checks files changed
31-
```
1+
[!include[Default](~/../README.md)]

docfx/docs/ReleaseNote.config.toml.md renamed to docfx/docs/setup/config.md

+5-20
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,14 @@
11
# ReleaseNote.config.toml
22

3-
TODO(pyoung)
4-
5-
## sample
6-
7-
``` toml
8-
[ReleaseNote.Maker]
9-
Directory = "ChangeLog.d"
10-
OutputFileName = "CHANGELOG.md"
11-
TemplateFilePath = "ChangeLog.d/Template.tt"
12-
EndOfLine = "ENVIRONMENT"
3+
- [source](https://github.com/netpyoung/NF.Tool.ReleaseNoteMaker/blob/main/NF.Tool.ReleaseNoteMaker/NF.Tool.ReleaseNoteMaker.Common/Config/ReleaseNoteConfig.cs)
134

14-
[[ReleaseNote.Section]]
15-
Path = ""
16-
DisplayName = "Main"
5+
TODO(pyoung)
176

18-
[[ReleaseNote.Type]]
19-
Category = "added"
20-
DisplayName = "Added"
21-
IsShowContent = true
22-
```
7+
## ReleaseNote.config.toml(default)
238

24-
- [source](https://github.com/netpyoung/NF.Tool.ReleaseNoteMaker/blob/main/NF.Tool.ReleaseNoteMaker/NF.Tool.ReleaseNoteMaker.Common/Config/ReleaseNoteConfig.cs)
9+
[!code-toml[Default](~/../NF.Tool.ReleaseNoteMaker/NF.Tool.ReleaseNoteMaker.CLI/res/ReleaseNote.config.toml)]
2510

26-
##
11+
## detail
2712

2813
### \[ReleaseNote.Maker]
2914

docfx/docs/setup/template.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Template
2+
3+
``` mermaid
4+
flowchart LR
5+
6+
A[Hard] -->|Text| B(Round)
7+
B --> C{Decision}
8+
C -->|One| D[Result 1]
9+
C -->|Two| E[Result 2]
10+
```
11+
12+
13+
# [Template.tt](#tab/t4)
14+
15+
[!code-csharp[Default](~/../NF.Tool.ReleaseNoteMaker/NF.Tool.ReleaseNoteMaker.CLI/res/Template.tt)]
16+
17+
# [Template.liquid](#tab/liquid)
18+
19+
Content for Windows...
20+
21+
---
22+
23+
Hello WOrld

docfx/docs/toc.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
- name: NF.Tool.ReleaseNoteMaker
2-
href: index.md
1+
- href: index.md
2+
- href: concept.md
3+
- href: tutorial.md
34
- name: Command
45
items:
56
- href: command/command_init.md
67
- href: command/command_create.md
78
- href: command/command_preview.md
89
- href: command/command_build.md
910
- href: command/command_check.md
10-
- name: Tutorial
11-
href: tutorial.md
12-
- name: ReleaseNote.config.toml
13-
href: ReleaseNote.config.toml.md
11+
- name: Setup
12+
items:
13+
- href: setup/config.md
14+
- href: setup/template.md
1415
- name: 📦 Github
1516
href: https://github.com/netpyoung/NF.Tool.ReleaseNoteMaker

docfx/docs/tutorial.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,13 @@ $ cat .\CHANGELOG.md
7777
### Features
7878

7979
- Add your info here (#123)
80-
```
80+
```
81+
82+
dotnet release-note create --content "Added a cool feature!" 1.added.md
83+
dotnet release-note create --content "Changed a behavior!" 2.changed.md
84+
dotnet release-note create --content "Deprecated a module!" 3.deprecated.md
85+
dotnet release-note create --content "Removed a square feature!" 4.removed.md
86+
dotnet release-note create --content "Fixed a bug!" 5.fixed.md
87+
dotnet release-note create --content "Fixed a security issue!" 6.security.md
88+
dotnet release-note create --content "Fixed a security issue!" 7.security.md
89+
dotnet release-note create --content "A fix without an issue number!" +something-unique.fixed.md

0 commit comments

Comments
 (0)