From 5c49509ca2edc0b2bc370142d6faa9b2c0164ef3 Mon Sep 17 00:00:00 2001 From: Russ Cam Date: Mon, 18 Nov 2024 22:38:17 +1000 Subject: [PATCH] Update docs - Add sitemap - Add GitHub link and badges - Delete API docs before building --- README.md | 5 ++++- build/Build/Program.cs | 4 ++++ docs/Docs/docfx.json | 5 +++++ docs/Docs/documentation/installation.md | 2 +- docs/Docs/index.md | 2 +- docs/Docs/template/public/main.js | 9 +++++++++ 6 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 docs/Docs/template/public/main.js diff --git a/README.md b/README.md index 960a4b4..effb833 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![NuGet Release][nuget image]][nuget url] [![Build Status](https://github.com/searchpioneer/lingua-dotnet/actions/workflows/dotnet.yml/badge.svg)](https://github.com/searchpioneer/lingua-dotnet/actions/workflows/dotnet.yml) [![license badge][license badge]][license url] +[![docs][docs badge]][docs url] Ranklib for .NET is a hardened port to .NET of [RankLib](https://sourceforge.net/p/lemur/wiki/RankLib/), a popular open source learning to rank library written in Java. It maintains compatibility with input and output @@ -72,4 +73,6 @@ The following metrics are implemented to measure the effectiveness of ranking [nuget url]: https://www.nuget.org/packages/SearchPioneer.RankLib/ [nuget image]: https://img.shields.io/nuget/v/SearchPioneer.RankLib.svg [license badge]: https://img.shields.io/badge/license-Apache%202.0-blue.svg -[license url]: https://www.apache.org/licenses/LICENSE-2.0 \ No newline at end of file +[license url]: https://www.apache.org/licenses/LICENSE-2.0 +[docs badge]: https://img.shields.io/badge/documentation-gray.svg +[docs url]: https://searchpioneer.github.io/ranklib-dotnet \ No newline at end of file diff --git a/build/Build/Program.cs b/build/Build/Program.cs index 1619948..b41f011 100644 --- a/build/Build/Program.cs +++ b/build/Build/Program.cs @@ -69,6 +69,10 @@ Target(Docs, () => { + foreach (var file in Directory.EnumerateFiles("docs/Docs/api") + .Where(file => file.EndsWith(".yml") || file.EndsWith(".manifest"))) + File.Delete(file); + Run("docfx", "docs/Docs/docfx.json --serve"); }); diff --git a/docs/Docs/docfx.json b/docs/Docs/docfx.json index 57759c4..3ee042f 100644 --- a/docs/Docs/docfx.json +++ b/docs/Docs/docfx.json @@ -48,6 +48,11 @@ "_lang": "en", "_enableSearch": true }, + "sitemap": { + "baseUrl": "https://searchpioneer.github.io/ranklib-dotnet/", + "priority": 0.1, + "changefreq": "daily" + }, "template": [ "default", "modern", diff --git a/docs/Docs/documentation/installation.md b/docs/Docs/documentation/installation.md index 30f0a4f..a3546c2 100644 --- a/docs/Docs/documentation/installation.md +++ b/docs/Docs/documentation/installation.md @@ -22,5 +22,5 @@ dotnet tool install -g SearchPioneer.RankLib.Cli --prerelease To see all the commands supported by the command line tool ```sh -dotnet-ranklib --help~~~~ +dotnet-ranklib --help ``` \ No newline at end of file diff --git a/docs/Docs/index.md b/docs/Docs/index.md index c54e5d3..f282d24 100644 --- a/docs/Docs/index.md +++ b/docs/Docs/index.md @@ -48,4 +48,4 @@ The following metrics are implemented to measure the effectiveness of ranking [nuget url]: https://www.nuget.org/packages/SearchPioneer.RankLib/ [nuget image]: https://img.shields.io/nuget/v/SearchPioneer.RankLib.svg [license badge]: https://img.shields.io/badge/license-Apache%202.0-blue.svg -[license url]: https://www.apache.org/licenses/LICENSE-2.0 \ No newline at end of file +[license url]: https://www.apache.org/licenses/LICENSE-2.0 diff --git a/docs/Docs/template/public/main.js b/docs/Docs/template/public/main.js new file mode 100644 index 0000000..1d8949f --- /dev/null +++ b/docs/Docs/template/public/main.js @@ -0,0 +1,9 @@ +export default { + iconLinks: [ + { + icon: 'github', + href: 'https://github.com/searchpioneer/ranklib-dotnet', + title: 'GitHub' + } + ] +} \ No newline at end of file