Skip to content

Commit

Permalink
Fix broken getting started
Browse files Browse the repository at this point in the history
dsilhavy committed Dec 29, 2024
1 parent a27a9ff commit cec13d2
Showing 3 changed files with 6 additions and 28 deletions.
1 change: 1 addition & 0 deletions src/assets/meta.json
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
"social": {
"github": "https://github.com/Dash-Industry-Forum/dash.js",
"reference_player": "https://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html",
"get_started": "https://dashif.org/dash.js/pages/quickstart/index.html",
"slack": "https://dashif.slack.com/archives/C11R69M96",
"twitter": "https://twitter.com/dash_if",
"linkedin": "https://www.linkedin.com/groups/12427371/",
27 changes: 0 additions & 27 deletions src/pages/get-started/index.jsx
Original file line number Diff line number Diff line change
@@ -17,30 +17,3 @@ export default function Index({ title, description, html }) {
</>
);
}

export async function getStaticProps() {
const pages = [
"https://github.com/Dash-Industry-Forum/dash.js/blob/gh-pages/pages/quickstart/installation.md",
"https://github.com/Dash-Industry-Forum/dash.js/blob/gh-pages/pages/quickstart/setup.md",
];
const markdown = await Promise.all(
pages.map(async (page) => {
const response = await fetch(page);
const payload = await response.json();
const $ = load(payload.payload.blob.richText);
$(".markdown-body table").first().remove();
const content = $(".markdown-body").html();
return content;
})
);
const html = markdown.join("");

return {
props: {
title: "Get Started",
description: "Get Started with dash.js",
content: true,
html,
},
};
}
6 changes: 5 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
@@ -72,7 +72,11 @@ function Entry() {
&nbsp;now!
</Button>
<div className="flex gap-4">
<Button href="/get-started">Get Started</Button>
<Button
className="hidden sm:block"
href={meta.social.get_started}>
Get Started
</Button>
<Button
className="hidden sm:block"
href={meta.social.github}>

0 comments on commit cec13d2

Please sign in to comment.