-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35690c6
commit 67f88cb
Showing
15 changed files
with
2,144 additions
and
30 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { MDX } from "@/components/markdown/mdx"; | ||
import { Button } from "@/components/ui/button"; | ||
import { getBlogPostByName, getSortedBlogPosts } from "@/lib/blog"; | ||
import Link from "next/link"; | ||
import { notFound } from "next/navigation"; | ||
|
||
const getBlogPost = async (slug: string) => { | ||
const blogPost = await getBlogPostByName(slug); | ||
if (!blogPost) { | ||
notFound(); | ||
} | ||
return blogPost; | ||
}; | ||
|
||
export async function generateStaticParams() { | ||
const blogPosts = await getSortedBlogPosts(); | ||
return blogPosts.map((post) => ({ | ||
slug: post.id, | ||
})); | ||
} | ||
|
||
export async function generateMetadata({ | ||
params, | ||
}: { | ||
params: { slug: string }; | ||
}) { | ||
const blogPost = await getBlogPost(params.slug); | ||
return { | ||
title: blogPost.title, | ||
description: blogPost.description, | ||
keywords: blogPost.keywords, | ||
}; | ||
} | ||
|
||
export default async function BlogPost({ | ||
params, | ||
}: { | ||
params: { slug: string }; | ||
}) { | ||
const { markdown } = await getBlogPost(params.slug); | ||
return ( | ||
<div className="container"> | ||
<Link href="/blog"> | ||
<Button variant="link" className="pl-0 mb-4 justify-start"> | ||
Back | ||
</Button> | ||
</Link> | ||
<MDX markdown={markdown}></MDX> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { | ||
Card, | ||
CardDescription, | ||
CardFooter, | ||
CardHeader, | ||
CardTitle, | ||
} from "@/components/ui/card"; | ||
import { getSortedBlogPosts } from "@/lib/blog"; | ||
import Link from "next/link"; | ||
|
||
export function generateMetadata() { | ||
return { | ||
title: "Blog", | ||
description: "", | ||
keywords: [], | ||
}; | ||
} | ||
|
||
export default async function Blogs() { | ||
const blogPosts = await getSortedBlogPosts(); | ||
return ( | ||
<> | ||
<ul> | ||
{blogPosts.map((post) => ( | ||
<Link href={`blog/${post.id}`} key={post.id}> | ||
<li className="my-4"> | ||
<Card> | ||
<CardHeader> | ||
<CardTitle>{post.title}</CardTitle> | ||
<CardDescription>{post.description}</CardDescription> | ||
</CardHeader> | ||
<CardFooter>{post.date}</CardFooter> | ||
</Card> | ||
</li> | ||
</Link> | ||
))} | ||
</ul> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
title: "Mock Blog 1" | ||
description: "Mock Blog" | ||
keywords: ["blog"] | ||
date: "2020-01-01" | ||
--- | ||
|
||
# Tibi invictumque plenaque dominam | ||
|
||
## Foedus anticipata demptos meorum obtulit per viridi | ||
|
||
Lorem markdownum solis socerque secundo, delubraque postquam disiecit. Et perque | ||
ingens tardus, ignotos inde. Vulnera _pronuba_: ore | ||
[medii](http://avesregia.com/sanguine.aspx) ait coniuge amantem arduus | ||
inaequales infelix. Templis **non** habuit illum, ut sanguine **humus laudis | ||
easdem** genitorem arduus lingua; num subit, magis. | ||
|
||
Raptusque ceu ad Tritonidos paulum. Tot [tuis | ||
rimis](http://www.quas.com/ut-istis). | ||
|
||
## In tempus heros Oceano magna | ||
|
||
Quam carnes, descendere passim regnaque purpureo de vinoque Pleias, blanditias | ||
nudos ad nullo. Precantum obstipuit umeros _biformis_: egerit columbas: silva | ||
potius vertice. | ||
|
||
## Generi iactura | ||
|
||
Cum vocant illis mea divum caelo aversa, viri creaverat oscula de unus habes, | ||
edidit expetit dilapsa; in! Nota estis; inducere ab herbas et illos corpore | ||
everberat sed. Sed est soluti sinuatur Glaucus vibrata nunc patrii? Nec per | ||
tanti et captantia medicamine illuc tulit stant non deducentia. Chaos bene eheu | ||
quod reverentia rivus, pudibundaque metuens. | ||
|
||
1. Illis et flamma At pendent abstulit attulit | ||
2. Percussaque seque facere si est ore solidas | ||
3. Imbrem Hippotades fecisti cunctisque silvas vidit | ||
4. Esse huic iubet in lacu cum qua | ||
5. Lassavit caterva virili | ||
6. Posita votis leones turbamque annos generis nympharum | ||
|
||
## Donis et mora dempto hominumque | ||
|
||
Olentia litora ad loquendi parvum gelidi tenenti opes pan, _ferre primo_, citius | ||
obliquos. Neque iam opem nam. Loca quater, demunt mare sua habebat inpius | ||
discedite pectore tantum naturae invidia conscia: accepere [praedam | ||
dixit](http://triplicis.net/nymphaesanguis.html) capillis! Plura ornat ut | ||
insolida fossa vix, non iam ipsisque **agitabitur** cornua et sanguis: petit | ||
deque, vellem? | ||
|
||
- Quo actis sensisse tremescere redit studiisque nardi | ||
- Saxificos movebo praemiaque parsque | ||
- Vultus et rediere loqui | ||
- Oras ponunt | ||
- Pastoris quot | ||
- Ora collesque | ||
|
||
Tyrioque iam usque bracchia cruentior collocat mentisque praesagaque montes, **a | ||
Cecropidae**, dare, omne. Putatis timentia et indignamque humus Dauno simulat, | ||
**in crimen** Triones. Marmoreis hospes saxeus, solidis utinam Phrygiaeque | ||
temporis; care quoniam. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
title: "Mock Blog 2" | ||
description: "Mock Blog 2" | ||
keywords: ["blog"] | ||
date: "2020-01-02" | ||
--- | ||
|
||
# Coniuge praesagaque repetit Phrygios missa spes remotam | ||
|
||
## Narretque gramine Gorgone figuram | ||
|
||
Lorem markdownum: arcuerat, at pectus ex praedae ibi tegit alas. Idque | ||
immaduisse et fata gelidos voto. | ||
|
||
> Vides exul truncos Cepheus; non hoc _Mercurium alipedum defendit_ an illi non | ||
> tardius quid. Ergo Danaen, et Chaoque illa herbas Lyncestius fortes, hostem | ||
> dies quo agmen diligitur. Opemque in aethera caesa similem, erat adlevat | ||
> Phoebus; ne haec amplexas; quoque. Pro Aonidum queri, differt, a tandem | ||
> Semiramis fugisse! Et nondum secuta, **Et** alta. | ||
Caput manus: plus non, tibi fugat ursos; dis profugam magnique coniunx [Abarin | ||
ab](http://mergit-auras.io/) veram relinquet mortalia alienaque. Abunde nec, | ||
Bacchica Indigetes ira vixque bella plurima, crudelis et validisne coegi. | ||
|
||
## Seducta pabula calidusque tempto | ||
|
||
Substiterat squamis. Quae mundo Epopeus obstat protinus agrestes quicquam | ||
corpore dixit heu, lateo quoque numina atque saxa poscere hoste, sidera. | ||
Aeolidae plerumque videt te _per_, deorum reparatque **obituque** Seriphon tamen | ||
alis nec honores et cum queant? Ferrum Latonia. Ut toris sternit. | ||
|
||
``` | ||
var native_website = eps_sram_algorithm + kindle(bookmark_ansi); | ||
drive_hdd(mirroredIct + cd(90)); | ||
zeroLanguage(pramMultimedia + directx, in(type_barebones, byte)); | ||
if (5 != applicationBus.mountHit(lagTutorial, hashtag_transistor_network)) { | ||
googlePhreaking = d(commercialPppFirmware, cdma + contextual, | ||
characterDramDisk / mp_copyright_programming); | ||
} else { | ||
led_disk(lcd, textMulticastingDisk, hit); | ||
port_plug_software -= compressionOs; | ||
} | ||
var ipad_gui_dvd = golden_network_template; | ||
``` | ||
|
||
Parvo ictu nacta sagittis Capitolia testor, et celeri matrum, Andron pisce | ||
Pelias ex per non tot. Turni ponderis subito at pennis cauda foret. | ||
[Trepidat](http://subita-sed.io/socium) unam quarum resupinus suam incisa radice | ||
vix thyrsos manum iaculum nostro. Sede fatis semper clade oscula, nec ultor des | ||
coeperunt coronis volucrum denique aetherias reliquit quoque et est esset. | ||
|
||
``` | ||
var donationware_system = third_num + wordart + autoresponderSnow(55, | ||
uatAixMarket.rootkitNavigation(5, sdsl), twitterOpticCase); | ||
serverSystem(lunOcr); | ||
var metafilePmuActive = peopleware(client_ultra(bittorrent), listserv + | ||
wheel_tablet + -4, smishing_cold); | ||
``` | ||
|
||
Rapidi quae additis caede aut; postulat domo, **ab inesset freta**, Eryx sub; | ||
non quae percussus Dianae! Iovis aquarum, _motumque veribus_, pro anus simillima | ||
secutus? Actis fera omnipotens insequitur amnis felix amoris inpleratque orbem | ||
differt enim _orbe solvit_ parvus nimiumque velatae fragor? Correptus et victa | ||
requirit [altissimus atque](http://intus.io/), Elymumque super quisquam velocius | ||
attonitamque stant insuperabile quid, veteres? Via _passim_ et est amori | ||
obsessa, cucurri praerupit **flammaeque flamma**, arbitrio altissimus super | ||
patriumque. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.