diff --git a/content/.obsidian/core-plugins.json b/content/.obsidian/core-plugins.json index 9405bfdc2..c89a841ae 100644 --- a/content/.obsidian/core-plugins.json +++ b/content/.obsidian/core-plugins.json @@ -1,20 +1,31 @@ -[ - "file-explorer", - "global-search", - "switcher", - "graph", - "backlink", - "canvas", - "outgoing-link", - "tag-pane", - "page-preview", - "daily-notes", - "templates", - "note-composer", - "command-palette", - "editor-status", - "bookmarks", - "outline", - "word-count", - "file-recovery" -] \ No newline at end of file +{ + "file-explorer": true, + "global-search": true, + "switcher": true, + "graph": true, + "backlink": true, + "canvas": true, + "outgoing-link": true, + "tag-pane": true, + "properties": false, + "page-preview": true, + "daily-notes": true, + "templates": true, + "note-composer": true, + "command-palette": true, + "slash-command": false, + "editor-status": true, + "bookmarks": true, + "markdown-importer": false, + "zk-prefixer": false, + "random-note": false, + "outline": true, + "word-count": true, + "slides": false, + "audio-recorder": false, + "workspaces": false, + "file-recovery": true, + "publish": false, + "sync": false, + "webviewer": false +} \ No newline at end of file diff --git a/content/Architecture.md b/content/Architecture.md index 437812665..ffc907a14 100644 --- a/content/Architecture.md +++ b/content/Architecture.md @@ -1,7 +1,7 @@ - Macrostrat is centered around a [[PostgreSQL]] database - - A "database-centric" application + - A "database-centric" application ## Architectural models - Supabase -- [[PostgREST]] \ No newline at end of file +- [PostgREST](https://postgrest.org/) diff --git a/content/Community.md b/content/Community.md index 39d88824d..0e952b153 100644 --- a/content/Community.md +++ b/content/Community.md @@ -2,7 +2,9 @@ Macrostrat is part of a broad geoinformatics ecosystem. ## Geological systems -- The [EarthByte](https://www.earthbyte.org) group is engaged in many complementary activities towards building a digital crust +- Paleobiology database (PBDB): [https://paleobiodb.org](https://paleobiodb.org) +- The [EarthByte](https://www.earthbyte.org) group is engaged in many complementary activities towards building a + digital crust ## Cool Earth observing websites diff --git a/content/Components/Macrostrat data services.md b/content/Components/Macrostrat data services.md index 053c33fda..aa9ebfb6d 100644 --- a/content/Components/Macrostrat data services.md +++ b/content/Components/Macrostrat data services.md @@ -3,12 +3,16 @@ geologic column data. There are two main reasons for this: -1. Macrostrat currently contains voluminous geologic map and column data that cannot be accessed in aggregate anywhere else. - - Over 300 different geologic maps, containing more than 2.5 million rock unit polygons covering the world, have been integrated into a single, unified, queryable environment in Macrostrat. - - Additionally, more than 35,000 rock units from over 1,500 regional columns covering all of North America and limited other regions are publicly available. -2. Macrostrat has a public "REST" application programming interface (API) that makes the full complement of data available in Findable, Accessible, Interoperable, and Reusable (FAIR) fashion with a CC-BY license. +1. Macrostrat currently contains voluminous geologic map and column data that cannot be accessed in aggregate anywhere + else. + - Over 300 different geologic maps, containing more than 2.5 million rock unit polygons covering the world, have + been integrated into a single, unified, queryable environment in Macrostrat. + - Additionally, more than 35,000 rock units from over 1,500 regional columns covering all of North America and + limited other regions are publicly available. +2. Macrostrat has a public "REST" application programming interface (API) that makes the full complement of data + available in Findable, Accessible, Interoperable, and Reusable (FAIR) fashion with a CC-BY license. -Many third-party applications and users take advantage of Macrostrat FAIR data services: +Many third-party applications and users take advantage of Macrostrat data services: - Mancos - StraboSpot @@ -21,6 +25,7 @@ Many third-party applications and users take advantage of Macrostrat FAIR data s ## Usage Macrostrat’s data services have become impactful community resources for geologic information: + - Our geologic map server has served more than 2 billion tile requests since logging began in 2018 (~10 per second) - Over the last 28 days, our other data APIs have served 3.8 million requests (~2 per second). -- Conservatively, these amount to 100,000 requests for information each day. \ No newline at end of file +- Conservatively, these amount to 100,000 requests for information each day. diff --git a/content/Macrostrat.md b/content/Macrostrat.md index 319f5b182..2dba41735 100644 --- a/content/Macrostrat.md +++ b/content/Macrostrat.md @@ -1,10 +1,11 @@ --- permalink: index +title: Documentation --- Macrostrat is a geological model of the Earth's crust and its stratigraphic -framework. It is a community-driven project that is centered at the University -of Wisconsin–Madison. +framework. It is currently developed at the eponymous lab at University of Wisconsin–Madison, by a team of geologists +and software engineers. The Macrostrat data platform underlies [Rockd](https://rockd.org/), a mobile application that allows users to explore the geology of the world around them. @@ -18,3 +19,9 @@ more fully to contributors in [[Version 2]]. The documentation is open-source, and we encourage contributions. Please contribute on [GitHub](https://github.com/UW-Macrostrat/docs). + +## Sections + +- [Legacy documentation](/docs/legacy) +- [Web components](/docs/web-components) +- [Python](/docs/python-libraries) diff --git a/content/Version 2.md b/content/Version 2.md index 4393368d9..370b16c6c 100644 --- a/content/Version 2.md +++ b/content/Version 2.md @@ -1,6 +1,5 @@ - A vision to create a new version of Macrostrat with a community-contribution model. - Macrostrat v1 effectively harnessed geologic data, but Macrostrat v2 seeks to harness the community - Vision first described in a GSA talk in 2021 -- Elaborated in this paper -The first round of funding to support initial development along these lines was secured in summer 2022 by [[Daven Quinn]] \ No newline at end of file +The first round of funding to support initial development along these lines was secured in summer 2023 by [[Daven Quinn]] \ No newline at end of file diff --git a/pages/+Page.mdx b/pages/+Page.mdx index e79fdf2a2..80abf5273 100644 --- a/pages/+Page.mdx +++ b/pages/+Page.mdx @@ -35,6 +35,6 @@ These products come from a variety of sources throughout the geosciences. Layers and testbed apps that aren't ready for prime time - + Macrostrat documentation diff --git a/pages/+config.ts b/pages/+config.ts index 37c694af2..236247d71 100644 --- a/pages/+config.ts +++ b/pages/+config.ts @@ -26,6 +26,7 @@ export default { ], clientRouting: true, supportsDarkMode: true, + trailingSlash: false, meta: { supportsDarkMode: { env: { diff --git a/pages/dev/docs/+Page.ts b/pages/docs/catch-all/+Page.ts similarity index 100% rename from pages/dev/docs/+Page.ts rename to pages/docs/catch-all/+Page.ts diff --git a/pages/dev/docs/+config.ts b/pages/docs/catch-all/+config.ts similarity index 91% rename from pages/dev/docs/+config.ts rename to pages/docs/catch-all/+config.ts index cd94b1a03..d3efd885e 100644 --- a/pages/dev/docs/+config.ts +++ b/pages/docs/catch-all/+config.ts @@ -10,5 +10,5 @@ export default { "mdxContent", "title", ], - route: "/dev/docs*", + route: "/docs*", } satisfies Config; diff --git a/pages/dev/docs/+onBeforeRender.ts b/pages/docs/catch-all/+onBeforeRender.ts similarity index 95% rename from pages/dev/docs/+onBeforeRender.ts rename to pages/docs/catch-all/+onBeforeRender.ts index d2abdbb4e..d4ac19c4d 100644 --- a/pages/dev/docs/+onBeforeRender.ts +++ b/pages/docs/catch-all/+onBeforeRender.ts @@ -2,6 +2,7 @@ import { buildPageIndex } from "@macrostrat-web/text-toolchain"; import { renderToString } from "react-dom/server"; import { PageContext } from "vike/types"; import h from "@macrostrat/hyper"; + const modules = import.meta.glob("../../../content/**/*.md"); import { join } from "path"; import { dirname } from "path"; @@ -12,7 +13,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url)); const contentDirName = "../../../content"; const contentDir = join(__dirname, contentDirName); -const [pageIndex, permalinkIndex] = buildPageIndex(contentDir, "/dev/docs"); +const [pageIndex, permalinkIndex] = buildPageIndex(contentDir, "/docs"); type OurPageContext = { mdxContent: string | null; @@ -64,5 +65,3 @@ export async function onBeforeRender( }, }; } - -export const passToClient = ["mdxContentFile", "mdxContent", "title"]; diff --git a/pages/docs/catch-all/route.ts b/pages/docs/catch-all/route.ts new file mode 100644 index 000000000..8d8994bc9 --- /dev/null +++ b/pages/docs/catch-all/route.ts @@ -0,0 +1,10 @@ +// product/catch-all/+route.js +export default (pageContext) => { + if (!pageContext.urlPathname.startsWith("/docs")) return false; + return { + precedence: -1, + pageContext: { + redirectTo: "/docs", + }, + }; +}; diff --git a/pages/docs/images/IngestionProcess.png b/pages/docs/images/IngestionProcess.png deleted file mode 100644 index 5ccae5352..000000000 Binary files a/pages/docs/images/IngestionProcess.png and /dev/null differ diff --git a/pages/docs/+Page.mdx b/pages/docs/legacy/+Page.mdx similarity index 100% rename from pages/docs/+Page.mdx rename to pages/docs/legacy/+Page.mdx diff --git a/pages/docs/api/postgrest/+Page.ts b/pages/docs/legacy/api/postgrest/+Page.ts similarity index 100% rename from pages/docs/api/postgrest/+Page.ts rename to pages/docs/legacy/api/postgrest/+Page.ts diff --git a/pages/docs/api/postgrest/+onBeforeRender.ts b/pages/docs/legacy/api/postgrest/+onBeforeRender.ts similarity index 100% rename from pages/docs/api/postgrest/+onBeforeRender.ts rename to pages/docs/legacy/api/postgrest/+onBeforeRender.ts diff --git a/pages/docs/ingestion/+Page.mdx b/pages/docs/legacy/ingestion/+Page.mdx similarity index 100% rename from pages/docs/ingestion/+Page.mdx rename to pages/docs/legacy/ingestion/+Page.mdx diff --git a/pages/docs/ingestion/harmonization/+Page.mdx b/pages/docs/legacy/ingestion/harmonization/+Page.mdx similarity index 100% rename from pages/docs/ingestion/harmonization/+Page.mdx rename to pages/docs/legacy/ingestion/harmonization/+Page.mdx diff --git a/pages/docs/ingestion/integration/+Page.mdx b/pages/docs/legacy/ingestion/integration/+Page.mdx similarity index 100% rename from pages/docs/ingestion/integration/+Page.mdx rename to pages/docs/legacy/ingestion/integration/+Page.mdx diff --git a/pages/docs/integrations/qgis/+Page.mdx b/pages/docs/legacy/integrations/qgis/+Page.mdx similarity index 100% rename from pages/docs/integrations/qgis/+Page.mdx rename to pages/docs/legacy/integrations/qgis/+Page.mdx diff --git a/src/components/navigation/PageBreadcrumbs.ts b/src/components/navigation/PageBreadcrumbs.ts index 2787e8e02..ceacc7c8a 100644 --- a/src/components/navigation/PageBreadcrumbs.ts +++ b/src/components/navigation/PageBreadcrumbs.ts @@ -7,6 +7,7 @@ import h from "./breadcrumbs.module.sass"; export function PageBreadcrumbs({ showLogo = false, title }) { const ctx = usePageContext(); + const items = useMemo(() => { let items = buildBreadcrumbs(ctx.urlPathname, sitemap, ctx); if (title != null) { diff --git a/vite.config.ts b/vite.config.ts index 774a718a9..ccdb9bd6d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -86,9 +86,10 @@ export default defineConfig({ cjsInterop({ dependencies: ["react-images", "labella", "react-color", "mapbox-gl"], }), + // This should maybe be integrated directly into the server-side rendering code textToolchain({ contentDir: path.resolve(__dirname, "content"), - wikiPrefix: "/dev/docs", + wikiPrefix: "/docs", }), /* Fix error with single-page app reloading where paths with dots (e.g., locations) are not rewritten to index