Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NextJS blog example using markdowndb #68

Closed
7 tasks done
rufuspollock opened this issue Nov 22, 2023 · 2 comments
Closed
7 tasks done

NextJS blog example using markdowndb #68

rufuspollock opened this issue Nov 22, 2023 · 2 comments
Assignees

Comments

@rufuspollock
Copy link
Member

rufuspollock commented Nov 22, 2023

Create a tutorial and example in examples folder of using markdowndb to make a simple nextjs based blog.

Reference: https://nextjs.org/learn-pages-router/basics/data-fetching/blog-data - note we are replacing their hand-coded get the blog posts with our quicker version and explaining the extra stuff we can do.

Acceptance

Tasks

  • Draft an outline of tutorial ✅2023-11-30 Add basic blog example in the readme #76
  • Roughly fill it in and write the code as you go ...
    • Review together in a pull request (you can submit even at first step as a draft PR and we keep reviewing)
  • Fill it out ...
  • Done ...

Notes

Something like this:

  • we're going to create a nextjs based blog with help of markdowndb
  • here's a simple nextjs project
  • here's a folder with 3 blog posts
  • here's some code to create the blog listing page
  • we need to load those blog posts and get their titles etc
  • let's use markdowndb
    • install
    • use: here's the code snippet
  • ok, so we could have done that by hand ...
  • but here are some cool features
    • look ma, no front matter: auto-extract title for us from the first heading in the file. auto-extract an image
    • validation! suppose we add a blog post and forget to add an image field. now our site will erro
      • we could check for this easily in markdowndb ... here's how
    • tags: just set tags with hashbang
@mohamedsalem401
Copy link
Contributor

mohamedsalem401 commented Nov 27, 2023

@rufuspollock
I drafted the tutorial and encountered an issue while attempting to write a basic code for creating a nextjs blog with MarkdownDB:
image

It seems that this issue might be related to #44. I'll delve into debugging to identify and address the problem.

@mohamedsalem401
Copy link
Contributor

This is done ✅2023-11-30 #76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants