mirror of
https://github.com/urbit/developers.urbit.org.git
synced 2024-09-11 13:55:59 +03:00
pages: show last modified on docs content
This commit is contained in:
parent
1db73f06f7
commit
64f1cbf3b2
2206
package-lock.json
generated
2206
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,7 @@
|
|||||||
"@iarna/toml": "^2.2.5",
|
"@iarna/toml": "^2.2.5",
|
||||||
"@tailwindcss/aspect-ratio": "^0.4.0",
|
"@tailwindcss/aspect-ratio": "^0.4.0",
|
||||||
"@tlon/sigil-js": "^1.4.5",
|
"@tlon/sigil-js": "^1.4.5",
|
||||||
"@urbit/foundation-design-system": "^0.5.1",
|
"@urbit/foundation-design-system": "^0.5.2",
|
||||||
"@urbit/markdoc": "^0.1.6",
|
"@urbit/markdoc": "^0.1.6",
|
||||||
"axios": "^0.26.1",
|
"axios": "^0.26.1",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
|
@ -80,14 +80,17 @@ export default function GuidePage({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<a
|
<div className="flex justify-between items-center mt-16">
|
||||||
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400 mt-16"
|
<a
|
||||||
target="_blank"
|
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400"
|
||||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/guides/${params.slug?.join("/") || "_index"
|
target="_blank"
|
||||||
}.md`}
|
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/guides/${params.slug?.join("/") || "_index"
|
||||||
>
|
}.md`}
|
||||||
Edit this page on GitHub
|
>
|
||||||
</a>
|
Edit this page on GitHub
|
||||||
|
</a>
|
||||||
|
<p className="font-semibold block p-2 text-wall-400">Last modified {data.lastModified}</p>
|
||||||
|
</div>
|
||||||
</ContentArea>
|
</ContentArea>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
@ -298,9 +301,10 @@ export async function getStaticProps({ params }) {
|
|||||||
let posts = guidesTree;
|
let posts = guidesTree;
|
||||||
|
|
||||||
const { data, content } = getPage(
|
const { data, content } = getPage(
|
||||||
join(process.cwd(), "content/guides", params.slug?.join("/") || "/")
|
join(process.cwd(), "content/guides", params.slug?.join("/") || "/"), true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
const previousPost =
|
const previousPost =
|
||||||
getPreviousPost(
|
getPreviousPost(
|
||||||
params.slug?.slice(-1).join("") || "guides",
|
params.slug?.slice(-1).join("") || "guides",
|
||||||
|
@ -79,14 +79,17 @@ export default function Overview({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<a
|
<div className="flex justify-between items-center mt-16">
|
||||||
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400 mt-16"
|
<a
|
||||||
target="_blank"
|
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400"
|
||||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/overview/${params.slug?.join("/") || "_index"
|
target="_blank"
|
||||||
}.md`}
|
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/guides/${params.slug?.join("/") || "_index"
|
||||||
>
|
}.md`}
|
||||||
Edit this page on GitHub
|
>
|
||||||
</a>
|
Edit this page on GitHub
|
||||||
|
</a>
|
||||||
|
<p className="font-semibold block p-2 text-wall-400">Last modified {data.lastModified}</p>
|
||||||
|
</div>
|
||||||
</ContentArea>
|
</ContentArea>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
@ -345,7 +348,7 @@ export async function getStaticProps({ params }) {
|
|||||||
let posts = overviewTree;
|
let posts = overviewTree;
|
||||||
|
|
||||||
const { data, content } = getPage(
|
const { data, content } = getPage(
|
||||||
join(process.cwd(), "content/overview", params.slug?.join("/") || "/")
|
join(process.cwd(), "content/overview", params.slug?.join("/") || "/"), true
|
||||||
);
|
);
|
||||||
|
|
||||||
const previousPost =
|
const previousPost =
|
||||||
|
@ -78,14 +78,17 @@ export default function GuidePage({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<a
|
<div className="flex justify-between items-center mt-16">
|
||||||
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400 mt-16"
|
<a
|
||||||
target="_blank"
|
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400"
|
||||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/reference/${params.slug?.join("/") || "_index"
|
target="_blank"
|
||||||
}.md`}
|
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/guides/${params.slug?.join("/") || "_index"
|
||||||
>
|
}.md`}
|
||||||
Edit this page on GitHub
|
>
|
||||||
</a>
|
Edit this page on GitHub
|
||||||
|
</a>
|
||||||
|
<p className="font-semibold block p-2 text-wall-400">Last modified {data.lastModified}</p>
|
||||||
|
</div>
|
||||||
</ContentArea>
|
</ContentArea>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
@ -110,7 +113,7 @@ export async function getStaticProps({ params }) {
|
|||||||
let posts = referenceTree;
|
let posts = referenceTree;
|
||||||
|
|
||||||
const { data, content } = getPage(
|
const { data, content } = getPage(
|
||||||
join(process.cwd(), "content/reference", params.slug?.join("/") || "/")
|
join(process.cwd(), "content/reference", params.slug?.join("/") || "/"), true
|
||||||
);
|
);
|
||||||
|
|
||||||
const previousPost =
|
const previousPost =
|
||||||
|
Loading…
Reference in New Issue
Block a user