From 100ba27c054d8d1501c28baef447167628325799 Mon Sep 17 00:00:00 2001 From: Nathanael Wong Date: Sun, 8 Sep 2024 01:13:28 -0400 Subject: [PATCH] Updates to Documentation and ReadMe --- README.md | 8 ++++---- docs/make.jl | 41 +++++++++++++++++++++++++++++++---------- 2 files changed, 35 insertions(+), 14 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/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", )