Тёмный

Build A Blog From Markdown Files In Next.js 

Qixotl LFC
Подписаться 1,7 тыс.
Просмотров 3,4 тыс.
50% 1

In this video, you will learn how to create a blog in Next.js, where content is generated through markdown files. This means that with some preliminary Next.js work, which we will spend a good deal of time focusing on; we will be able to create a new markdown file that contains the content and images that we want our new blog post to have, and then just from the creation of this markdown file, a new blog post will be listed on the homepage of our website and clicking on it will lead us to a page where we can read that specific blog post in full.
To create a project like this, we will first need to find a way to read and parse markdown files, because Next.js does not give us a way of doing this out of the box. After, we will need to set up dynamic routing so that a unique URL is automatically generated for each new blog post. So that, all we need to do on our end, is create a single blog page component that is set-up to render out a blog from the data stored in a given markdown file. And with this, we will set all of our dynamic URL’s to go to this page component, which is configured to extract the unique part of the dynamic URL, the query parameter, and use this information to render out a specific markdown file that corresponds to the blog-post that the user just clicked on.
📚 Materials/References:
- Completed project’s GitHub repository: github.com/lukechopper/nextjs...
🧠 Concepts Covered:
- Handling markdown files in Next.js
- Dynamic routing with markdown files in Next.js
- Reading filenames with file streamer.
💻 Technologies used:
- Next.js
- SASS
- NPM dependencies for reading, parsing and rendering out data from markdown files.
Song: Ehrling - You And Me (Vlog No Copyright Music)
Music provided by Vlog
No Copyright Music. Video Link: • Ehrling - You And Me (...
If you enjoyed this video then please consider liking 👍 and subscribing. You would be doing me a huge favour if you did this and it would be greatly appreciated ❤️ by me. Likewise, if you have any queries or comments that you want answered. Then please, don’t hesitate post them down into the comments box below. I would love to hear back from you and will answer all of your questions to the best of my ability.
Stay awesome guys. ❤️
#nextjs#react#javascript#webdev#blog#markdown#cs#computerscience

Наука

Опубликовано:

 

19 июн 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 4   
@nationbuilding5319
@nationbuilding5319 2 года назад
Excellent. This is exactly what i needed
@dusanknezevic4028
@dusanknezevic4028 2 года назад
You haven't covered the Nextjs Image or Link components and how it can be integrated with md. Any idea on how it should be implemented?
@Petry078
@Petry078 2 года назад
Nice!
@VahidTakro
@VahidTakro 3 года назад
Hi friend, how can I multilingual this?
Далее
React, Intersection Observer Tutorial
18:43
Просмотров 21 тыс.
Javascript + Markdown = MDX (using NextJS)
5:51
Просмотров 10 тыс.
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
Просмотров 731 тыс.
МАРИЯ ГОЛУБКИНА О БАБУШКЕ #shorts
00:43
Копия iPhone с WildBerries
01:00
Просмотров 614 тыс.
AJAX Live Data Search Using Nodejs MongoDB Express
18:39
iPhone 16 - НЕ СТОИТ ПРОПУСКАТЬ
4:50