From f1eed1e61f6d4c638923219fb01dc84cbb7d4bc4 Mon Sep 17 00:00:00 2001 From: Nathanael Wong Date: Sun, 8 Sep 2024 01:19:10 -0400 Subject: [PATCH] Updates to Documentation and ReadMe --- README.md | 8 ++++---- docs/Project.toml | 5 ++++- docs/make.jl | 41 +++++++++++++++++++++++++++++++---------- 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4e1a9c6..6cf164c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # RegionGrids -[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://natgeo-wong.github.io/RegionGrids.jl/stable/) -[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://natgeo-wong.github.io/RegionGrids.jl/dev/) -[![Build Status](https://github.com/natgeo-wong/RegionGrids.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/natgeo-wong/RegionGrids.jl/actions/workflows/CI.yml?query=branch%3Amain) -[![Coverage](https://codecov.io/gh/natgeo-wong/RegionGrids.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/natgeo-wong/RegionGrids.jl) +[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://GeoRegionsEcosystem.github.io/RegionGrids.jl/stable/) +[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://GeoRegionsEcosystem.github.io/RegionGrids.jl/dev/) +[![Build Status](https://github.com/natgeo-wong/RegionGrids.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/GeoRegionsEcosystem/RegionGrids.jl/actions/workflows/CI.yml?query=branch%3Amain) +[![Coverage](https://codecov.io/gh/natgeo-wong/RegionGrids.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/GeoRegionsEcosystem/RegionGrids.jl) diff --git a/docs/Project.toml b/docs/Project.toml index 100991f..5c2d855 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,3 +1,6 @@ [deps] +# CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -RegionGrids = "ecebd26c-3930-4a82-94f6-9df2a191b288" +DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365" +GeoRegions = "b001f823-fa75-4bff-bf55-6610c8f3688a" +# Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" diff --git a/docs/make.jl b/docs/make.jl index 97d82d0..0d1addd 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,23 +1,44 @@ -using RegionGrids using Documenter +using DocumenterVitepress +using RegionGrids +# using CairoMakie +# using Literate + +# CairoMakie.activate!(type = "svg") DocMeta.setdocmeta!(RegionGrids, :DocTestSetup, :(using RegionGrids); recursive=true) makedocs(; - modules=[RegionGrids], - authors="Nathanael Wong ", - sitename="RegionGrids.jl", - format=Documenter.HTML(; - canonical="https://natgeo-wong.github.io/RegionGrids.jl", - edit_link="main", - assets=String[], + modules = [RegionGrids], + authors = "Nathanael Wong ", + sitename = "RegionGrids.jl", + doctest = false, + warnonly = true, + format = DocumenterVitepress.MarkdownVitepress( + repo = "https://github.com/GeoRegionsEcosystem/RegionGrids.jl", ), pages=[ "Home" => "index.md", ], ) +recursive_find(directory, pattern) = + mapreduce(vcat, walkdir(directory)) do (root, dirs, files) + joinpath.(root, filter(contains(pattern), files)) + end + +files = [] +for pattern in [r"\.cst", r"\.nc"] + global files = vcat(files, recursive_find(@__DIR__, pattern)) +end + +for file in files + rm(file) +end + deploydocs(; - repo="github.com/natgeo-wong/RegionGrids.jl", - devbranch="main", + repo = "github.com/GeoRegionsEcosystem/RegionGrids.jl.git", + target = "build", # this is where Vitepress stores its output + devbranch = "main", + branch = "gh-pages", )