From 0ceb27a4cac9452107185d74fb287d753c494949 Mon Sep 17 00:00:00 2001 From: Daniel Cronqvist Date: Sat, 17 Aug 2024 00:07:52 +0200 Subject: [PATCH] Add first example of docs --- .gitignore | 5 ++++ Makefile | 7 ++++++ README.md | 7 ++---- docs/docfx.json | 46 +++++++++++++++++++++++++++++++++++ docs/docs/loading-a-map.md | 1 + docs/docs/quickstart.md | 1 + docs/docs/toc.yml | 6 +++++ docs/template/public/main.css | 4 +++ docs/toc.yml | 4 +++ 9 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 docs/docfx.json create mode 100644 docs/docs/loading-a-map.md create mode 100644 docs/docs/quickstart.md create mode 100644 docs/docs/toc.yml create mode 100644 docs/template/public/main.css create mode 100644 docs/toc.yml diff --git a/.gitignore b/.gitignore index aa2d18e..a2b8d83 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,11 @@ ## ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore +# Generated docs +docs/_site/ +docs/api/ +docs/index.md + # User-specific files *.rsuser *.suo diff --git a/Makefile b/Makefile index a79c862..66cf561 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,13 @@ test: dotnet test src/DotTiled.sln +docs-serve: docs-build + docfx docs/docfx.json --serve + +docs-build: + cp README.md docs/index.md + docfx docs/docfx.json + BENCHMARK_SOURCES = DotTiled.Benchmark/Program.cs DotTiled.Benchmark/DotTiled.Benchmark.csproj BENCHMARK_OUTPUTDIR = DotTiled.Benchmark/BenchmarkDotNet.Artifacts .PHONY: benchmark diff --git a/README.md b/README.md index 27ee68c..48772d1 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,7 @@ DotTiled is designed to be a lightweight and efficient library that provides a s - [Alternative libraries and comparison + benchmarks](#alternative-libraries-and-comparison) - [Feature coverage comparison](#feature-coverage-comparison) -- [Quickstart](#quickstart) - - [Installing DotTiled](#installing-dottiled) +- [Installing DotTiled](#installing-dottiled) # Alternative libraries and comparison @@ -74,9 +73,7 @@ Below is a comparison of the feature coverage of DotTiled and other similar libr > [!NOTE] > ✅ Full support. ⚠️ Partial support, see respective library for details about supported features. ❌ No support. -# Quickstart - -### Installing DotTiled +# Installing DotTiled DotTiled is available as a NuGet package. You can install it by using the NuGet Package Manager UI in Visual Studio, or equivalent, or using the following command for the .NET CLI: diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 0000000..fa6feed --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,46 @@ +{ + "metadata": [ + { + "src": [ + { + "src": "../src", + "files": [ + "DotTiled/DotTiled.csproj" + ] + } + ], + "dest": "api" + } + ], + "build": { + "content": [ + { + "files": [ + "**/*.{md,yml}" + ], + "exclude": [ + "_site/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "output": "_site", + "template": [ + "default", + "modern", + "template" + ], + "globalMetadata": { + "_appName": "DotTiled", + "_appTitle": "DotTiled", + "_enableSearch": true, + "pdf": true + } + } +} \ No newline at end of file diff --git a/docs/docs/loading-a-map.md b/docs/docs/loading-a-map.md new file mode 100644 index 0000000..9a7dc64 --- /dev/null +++ b/docs/docs/loading-a-map.md @@ -0,0 +1 @@ +# Loading a map \ No newline at end of file diff --git a/docs/docs/quickstart.md b/docs/docs/quickstart.md new file mode 100644 index 0000000..1d2e852 --- /dev/null +++ b/docs/docs/quickstart.md @@ -0,0 +1 @@ +# Quick Start \ No newline at end of file diff --git a/docs/docs/toc.yml b/docs/docs/toc.yml new file mode 100644 index 0000000..13cc1f7 --- /dev/null +++ b/docs/docs/toc.yml @@ -0,0 +1,6 @@ +- name: Introduction +- href: ../index.md +- href: quickstart.md + +- name: Essentials +- href: loading-a-map.md \ No newline at end of file diff --git a/docs/template/public/main.css b/docs/template/public/main.css new file mode 100644 index 0000000..a8f7612 --- /dev/null +++ b/docs/template/public/main.css @@ -0,0 +1,4 @@ +body { + --bs-link-color-rgb: 66, 184, 131 !important; + --bs-link-hover-color-rgb: 64, 180, 128 !important; +} \ No newline at end of file diff --git a/docs/toc.yml b/docs/toc.yml new file mode 100644 index 0000000..6da36ae --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,4 @@ +- name: Docs + href: docs/ +- name: API + href: api/ \ No newline at end of file