mirror of
https://github.com/urbit/developers.urbit.org.git
synced 2024-08-17 01:30:31 +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",
|
||||
"@tailwindcss/aspect-ratio": "^0.4.0",
|
||||
"@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",
|
||||
"axios": "^0.26.1",
|
||||
"buffer": "^6.0.3",
|
||||
|
@ -80,14 +80,17 @@ export default function GuidePage({
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<a
|
||||
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400 mt-16"
|
||||
target="_blank"
|
||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/guides/${params.slug?.join("/") || "_index"
|
||||
}.md`}
|
||||
>
|
||||
Edit this page on GitHub
|
||||
</a>
|
||||
<div className="flex justify-between items-center mt-16">
|
||||
<a
|
||||
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400"
|
||||
target="_blank"
|
||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/guides/${params.slug?.join("/") || "_index"
|
||||
}.md`}
|
||||
>
|
||||
Edit this page on GitHub
|
||||
</a>
|
||||
<p className="font-semibold block p-2 text-wall-400">Last modified {data.lastModified}</p>
|
||||
</div>
|
||||
</ContentArea>
|
||||
</div>
|
||||
</>
|
||||
@ -298,9 +301,10 @@ export async function getStaticProps({ params }) {
|
||||
let posts = guidesTree;
|
||||
|
||||
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 =
|
||||
getPreviousPost(
|
||||
params.slug?.slice(-1).join("") || "guides",
|
||||
|
@ -79,14 +79,17 @@ export default function Overview({
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<a
|
||||
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400 mt-16"
|
||||
target="_blank"
|
||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/overview/${params.slug?.join("/") || "_index"
|
||||
}.md`}
|
||||
>
|
||||
Edit this page on GitHub
|
||||
</a>
|
||||
<div className="flex justify-between items-center mt-16">
|
||||
<a
|
||||
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400"
|
||||
target="_blank"
|
||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/guides/${params.slug?.join("/") || "_index"
|
||||
}.md`}
|
||||
>
|
||||
Edit this page on GitHub
|
||||
</a>
|
||||
<p className="font-semibold block p-2 text-wall-400">Last modified {data.lastModified}</p>
|
||||
</div>
|
||||
</ContentArea>
|
||||
</div>
|
||||
</>
|
||||
@ -345,7 +348,7 @@ export async function getStaticProps({ params }) {
|
||||
let posts = overviewTree;
|
||||
|
||||
const { data, content } = getPage(
|
||||
join(process.cwd(), "content/overview", params.slug?.join("/") || "/")
|
||||
join(process.cwd(), "content/overview", params.slug?.join("/") || "/"), true
|
||||
);
|
||||
|
||||
const previousPost =
|
||||
|
@ -78,14 +78,17 @@ export default function GuidePage({
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<a
|
||||
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400 mt-16"
|
||||
target="_blank"
|
||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/reference/${params.slug?.join("/") || "_index"
|
||||
}.md`}
|
||||
>
|
||||
Edit this page on GitHub
|
||||
</a>
|
||||
<div className="flex justify-between items-center mt-16">
|
||||
<a
|
||||
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400"
|
||||
target="_blank"
|
||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/guides/${params.slug?.join("/") || "_index"
|
||||
}.md`}
|
||||
>
|
||||
Edit this page on GitHub
|
||||
</a>
|
||||
<p className="font-semibold block p-2 text-wall-400">Last modified {data.lastModified}</p>
|
||||
</div>
|
||||
</ContentArea>
|
||||
</div>
|
||||
</>
|
||||
@ -110,7 +113,7 @@ export async function getStaticProps({ params }) {
|
||||
let posts = referenceTree;
|
||||
|
||||
const { data, content } = getPage(
|
||||
join(process.cwd(), "content/reference", params.slug?.join("/") || "/")
|
||||
join(process.cwd(), "content/reference", params.slug?.join("/") || "/"), true
|
||||
);
|
||||
|
||||
const previousPost =
|
||||
|
Loading…
Reference in New Issue
Block a user