Skip to content

Commit

Permalink
upgrade myst
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 committed Oct 24, 2024
1 parent f8cd1ae commit c2d115a
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 73 deletions.
88 changes: 44 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"build": "npm-run-all -l clean -p build:esm"
},
"dependencies": {
"myst-common": "^1.7.2",
"myst-config": "^1.7.2",
"myst-spec-ext": "^1.7.2",
"myst-common": "^1.7.3",
"myst-config": "^1.7.3",
"myst-spec-ext": "^1.7.3",
"nbtx": "^0.2.3",
"unist-util-select": "^4.0.3"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/common/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { SiteManifest } from 'myst-config';
import { selectAll } from 'unist-util-select';
import type { Image as ImageSpec, Link as LinkSpec } from 'myst-spec';
import type { FooterLinks, Heading, NavigationLink, PageLoader } from './types.js';
import { slugToUrl } from 'myst-common';

type Image = ImageSpec & { urlOptimized?: string };
type Link = LinkSpec & { static?: boolean };
Expand Down Expand Up @@ -40,7 +41,7 @@ export function getProjectHeadings(
},
...project.pages.map((p) => {
if (!('slug' in p)) return p;
const slug = p.slug?.replace(/\.index$/, '').replaceAll('.', '/');
const slug = slugToUrl(p.slug);
return {
...p,
path: projectSlug && project.slug ? `/${project.slug}/${slug}` : `/${slug}`,
Expand Down
8 changes: 4 additions & 4 deletions packages/jupyter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
"buffer": "^6.0.3",
"classnames": "^2.5.1",
"jupyterlab-plotly": "^5.24.0",
"myst-common": "^1.7.2",
"myst-config": "^1.7.2",
"myst-frontmatter": "^1.7.2",
"myst-common": "^1.7.3",
"myst-config": "^1.7.3",
"myst-frontmatter": "^1.7.3",
"myst-spec": "^0.0.5",
"myst-spec-ext": "^1.7.2",
"myst-spec-ext": "^1.7.3",
"myst-to-react": "^0.13.2",
"nanoid": "^4.0.2",
"nbtx": "^0.2.3",
Expand Down
8 changes: 4 additions & 4 deletions packages/myst-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@
"@heroicons/react": "^2.0.18",
"classnames": "^2.3.2",
"js-yaml": "^4.1.0",
"myst-common": "^1.7.2",
"myst-config": "^1.7.2",
"myst-common": "^1.7.3",
"myst-config": "^1.7.3",
"myst-directives": "^1.5.7",
"myst-ext-card": "^1.0.9",
"myst-ext-exercise": "^1.0.8",
"myst-ext-grid": "^1.0.8",
"myst-ext-proof": "^1.0.11",
"myst-ext-tabs": "^1.0.8",
"myst-frontmatter": "^1.7.2",
"myst-frontmatter": "^1.7.3",
"myst-parser": "^1.5.7",
"myst-spec": "^0.0.5",
"myst-to-docx": "^1.0.12",
"myst-to-html": "^1.5.7",
"myst-to-jats": "^1.0.30",
"myst-to-react": "^0.13.2",
"myst-to-tex": "^1.0.38",
"myst-to-typst": "^0.0.24",
"myst-to-typst": "^0.0.25",
"myst-transforms": "^1.3.26",
"unified": "^10.1.2",
"unist-util-remove": "^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/myst-to-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"@radix-ui/react-hover-card": "^1.0.6",
"buffer": "^6.0.3",
"classnames": "^2.3.2",
"myst-common": "^1.7.2",
"myst-config": "^1.7.2",
"myst-common": "^1.7.3",
"myst-config": "^1.7.3",
"myst-spec": "^0.0.5",
"nanoid": "^4.0.2",
"react-syntax-highlighter": "15.5.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"peerDependencies": {
"@types/react": "^16.8 || ^17.0 || ^18.0",
"@types/react-dom": "^16.8 || ^17.0 || ^18.0",
"myst-common": "^1.7.2",
"myst-config": "^1.7.2",
"myst-frontmatter": "^1.7.2",
"myst-common": "^1.7.3",
"myst-config": "^1.7.3",
"myst-frontmatter": "^1.7.3",
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
"@radix-ui/react-visually-hidden": "^1.1.0",
"classnames": "^2.3.2",
"lodash.throttle": "^4.1.1",
"myst-common": "^1.7.2",
"myst-config": "^1.7.2",
"myst-common": "^1.7.3",
"myst-config": "^1.7.3",
"myst-demo": "^0.13.2",
"myst-spec-ext": "^1.7.2",
"myst-spec-ext": "^1.7.3",
"myst-to-react": "^0.13.2",
"nbtx": "^0.2.3",
"node-cache": "^5.1.2",
Expand Down
6 changes: 2 additions & 4 deletions packages/site/src/seo/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { slugToUrl } from 'myst-common';
import type { SiteManifest } from 'myst-config';

type ManifestProjectItem = Required<SiteManifest>['projects'][0]['pages'][0];
Expand Down Expand Up @@ -148,10 +149,7 @@ export function getSiteSlugs(
const projectSlug = project.slug ? `/${project.slug}` : '';
const pages = project.pages
.filter((page): page is ManifestProjectItem => 'slug' in page)
.map(
(page) =>
`${baseurl}${projectSlug}/${page.slug?.replace(/\.index$/, '').replace(/\./g, '/')}`,
);
.map((page) => `${baseurl}${projectSlug}/${slugToUrl(page.slug)}`);
if (opts?.excludeIndex) return [...pages];
return [
opts?.explicitIndex
Expand Down
4 changes: 2 additions & 2 deletions themes/article/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"@remix-run/node": "~1.17.0",
"@remix-run/react": "~1.17.0",
"@remix-run/vercel": "~1.17.0",
"myst-common": "^1.7.2",
"myst-config": "^1.7.2",
"myst-common": "^1.7.3",
"myst-config": "^1.7.3",
"node-fetch": "^2.6.11",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
3 changes: 2 additions & 1 deletion themes/book/app/utils/loaders.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { redirect } from '@remix-run/node';
import { responseNoArticle, responseNoSite, getDomainFromRequest } from '@myst-theme/site';
import type { MystSearchIndex } from '@myst-theme/search';
import { slugToUrl } from 'myst-common';

const CONTENT_CDN_PORT = process.env.CONTENT_CDN_PORT ?? '3100';
const CONTENT_CDN = process.env.CONTENT_CDN ?? `http://localhost:${CONTENT_CDN_PORT}`;
Expand Down Expand Up @@ -66,7 +67,7 @@ export async function getPage(
throw redirect(projectName ? `/${projectName}` : '/');
}
if (opts.slug?.endsWith('.index') && opts.redirect) {
const newSlug = opts.slug.replace(/\.index$/, '').replace(/\./g, '/');
const newSlug = slugToUrl(opts.slug);
throw redirect(projectName ? `/${projectName}/${newSlug}` : `/${newSlug}`);
}
let slug = opts.loadIndexPage || opts.slug == null ? project.index : opts.slug;
Expand Down
4 changes: 2 additions & 2 deletions themes/book/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"@remix-run/node": "~1.17.0",
"@remix-run/react": "~1.17.0",
"@remix-run/vercel": "~1.17.0",
"myst-common": "^1.7.2",
"myst-config": "^1.7.2",
"myst-common": "^1.7.3",
"myst-config": "^1.7.3",
"node-fetch": "^2.6.11",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down

0 comments on commit c2d115a

Please sign in to comment.