Starter repo for quickly deploying a Markdoc app with Next.js

Overview

Full Next.js example

This is a full-featured boilerplate for a creating a documentation website using Markdoc and Next.js.

Setup

First, clone this repo and install the dependencies required:

npm install
# or
yarn install

Then, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying index.md. The page auto-updates as you edit the file.

Deploy

The quickest way to deploy your own version of this boilerplate is by deploying it with Vercel or Netlify by clicking one of the buttons below.

Deploy with Vercel

Deploy with Vercel

Deploy to Netlify

Deploy to Netlify

Comments
  • Add examples of using next.js tags in markdoc.

    Add examples of using next.js tags in markdoc.

    @mfix-stripe Following up on https://github.com/markdoc/markdoc/issues/227 this PR adds example code for how to include the 4 Next.js tags which are provided by markdoc.


    While testing this, I noticed there seems to be a rendering bug with the Head tag but only in next's production/optimized mode. To reproduce, run the current branch like this:

    npm run build
    npm run start
    
    • Browse to localhost:3000 and then click the Docs link. The page renders OK, and the Head tag is output correctly to the browser as shown in view source.
    • Reload your browser at url http://localhost:3000/docs then the page does not render, and outputs the raw Head tag content:
    • This problem does not occur when running next in development mode with npm run dev.
    Screen Shot 2022-10-03 at 4 02 57 PM
    opened by guidorice 3
  • Upgrade to Next.js 13

    Upgrade to Next.js 13

    Hi, this starter installs the latest Next.js version, as seen in package.json, which means it will install Next.js 13 now. Next.js 13 introduces a new <Link> component, which can no longer has <a> as its child, otherwise the app will crash.

    This pull request removes <a> from <Link>, and accordingly change the way to style <Link> component. styled-jsx can't style <Link> with className, unless the style is marked as global.

    opened by kejiweixun 2
  • Run Markdoc on Replit

    Run Markdoc on Replit

    Hey! I'm with @replit and we're super excited about markdoc. I've been stoked for its public release ever since I saw the initial tech demo by @segphault. Replit seems like a great place to run markdoc and we've been looking for something like it for our internal docs, too. I've set up a template for the next.js starter on replit here so folks on our platform can easily jump in to using markdoc, and you can see the live version here.

    This PR adds:

    • .replit - config file that tells replit how to run the project
    • replit.nix - nix file config
    • updates README.md and pages/index.md to include "run on replit" badges
    wontfix 
    opened by Talor-A 2
  • Add CodeQL workflow for GitHub code scanning

    Add CodeQL workflow for GitHub code scanning

    Hi markdoc/markdoc-starter!

    This is a one-off automatically generated pull request from LGTM.com :robot:. You might have heard that we’ve integrated LGTM’s underlying CodeQL analysis engine natively into GitHub. The result is GitHub code scanning!

    With LGTM fully integrated into code scanning, we are focused on improving CodeQL within the native GitHub code scanning experience. In order to take advantage of current and future improvements to our analysis capabilities, we suggest you enable code scanning on your repository. Please take a look at our blog post for more information.

    This pull request enables code scanning by adding an auto-generated codeql.yml workflow file for GitHub Actions to your repository — take a look! We tested it before opening this pull request, so all should be working :heavy_check_mark:. In fact, you might already have seen some alerts appear on this pull request!

    Where needed and if possible, we’ve adjusted the configuration to the needs of your particular repository. But of course, you should feel free to tweak it further! Check this page for detailed documentation.

    Questions? Check out the FAQ below!

    FAQ

    Click here to expand the FAQ section

    How often will the code scanning analysis run?

    By default, code scanning will trigger a scan with the CodeQL engine on the following events:

    • On every pull request — to flag up potential security problems for you to investigate before merging a PR.
    • On every push to your default branch and other protected branches — this keeps the analysis results on your repository’s Security tab up to date.
    • Once a week at a fixed time — to make sure you benefit from the latest updated security analysis even when no code was committed or PRs were opened.

    What will this cost?

    Nothing! The CodeQL engine will run inside GitHub Actions, making use of your unlimited free compute minutes for public repositories.

    What types of problems does CodeQL find?

    The CodeQL engine that powers GitHub code scanning is the exact same engine that powers LGTM.com. The exact set of rules has been tweaked slightly, but you should see almost exactly the same types of alerts as you were used to on LGTM.com: we’ve enabled the security-and-quality query suite for you.

    How do I upgrade my CodeQL engine?

    No need! New versions of the CodeQL analysis are constantly deployed on GitHub.com; your repository will automatically benefit from the most recently released version.

    The analysis doesn’t seem to be working

    If you get an error in GitHub Actions that indicates that CodeQL wasn’t able to analyze your code, please follow the instructions here to debug the analysis.

    How do I disable LGTM.com?

    If you have LGTM’s automatic pull request analysis enabled, then you can follow these steps to disable the LGTM pull request analysis. You don’t actually need to remove your repository from LGTM.com; it will automatically be removed in the next few months as part of the deprecation of LGTM.com (more info here).

    Which source code hosting platforms does code scanning support?

    GitHub code scanning is deeply integrated within GitHub itself. If you’d like to scan source code that is hosted elsewhere, we suggest that you create a mirror of that code on GitHub.

    How do I know this PR is legitimate?

    This PR is filed by the official LGTM.com GitHub App, in line with the deprecation timeline that was announced on the official GitHub Blog. The proposed GitHub Action workflow uses the official open source GitHub CodeQL Action. If you have any other questions or concerns, please join the discussion here in the official GitHub community!

    I have another question / how do I get in touch?

    Please join the discussion here to ask further questions and send us suggestions!

    opened by lgtm-com[bot] 1
  • Add markdoc property to AppProps type

    Add markdoc property to AppProps type

    Issue

    I noticed this is in an external project that was created from this template. After the update of Next.js 12.3.x, the AppProps (extends AppInitialProps) type no longer has pageProps type set to any, this means that a type error is thrown when building the project.

    Solution

    The solution here is to create a MyAppProps interface and add the markdoc property by setting its type to MarkdocNextJsPageProps['markdoc'] (imported from @markdoc/next.js) and pass it to the AppProps type. This fix allows the build step to successfully pass the validity of types check.

    opened by jayanratna 1
Owner
Markdoc
The Markdoc toolchain
Markdoc
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Markdoc plugin for Next.js

@markdoc/next.js Note: this plugin will be treated as a beta version until v1.0.0 is released. Using the @markdoc/next.js plugin allows you to create

Markdoc 105 Nov 30, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Markdoc is a Markdown-based syntax and toolchain for creating custom documentation sites and experiences.

A powerful, flexible, Markdown-based authoring framework. Markdoc is a Markdown-based syntax and toolchain for creating custom documentation sites and

Markdoc 5.8k Jan 2, 2023
This is email scheduler made using MERN. This repo contains server code, client repo is linked in readme.

Email Scheduler Client This is an email scheduler server (client in different repository). It is made using node.js/express.js. Overview User can sign

Sai Charan 2 Dec 3, 2022
Deploying Fake Back-End Server & DataBase Using JSON-SERVER, GitHub, and Heroku

Deploying Fake Back-End Server & DataBase Using JSON-SERVER, GitHub, and Heroku. In this article, we will create and host a fake server that we can de

Israel David 0 Sep 5, 2022
The Remix Stack for deploying to AWS with DynamoDB, authentication, testing, linting, formatting, etc.

The Remix Stack for deploying to AWS with DynamoDB, authentication, testing, linting, formatting, etc.

Remix 311 Jan 1, 2023
The Remix Stack for deploying to Fly with Supabase, authentication, testing, linting, formatting, etc.

Remix Supa Fly Stack Learn more about Remix Stacks. npx create-remix --template rphlmr/supa-fly-stack What's in the stack Fly app deployment with Doc

Raphaël Moreau 157 Jan 7, 2023
The Remix Blog Stack for deploying to Fly with MDX, SQLite, testing, linting, formatting, etc.

Remix Speed Metal Stack Learn more about Remix Stacks. npx create-remix --template Girish21/speed-metal-stack Remix Blog ?? This blog starter template

Girish 141 Jan 2, 2023
The Remix Stack for deploying to Fly with SQLite, authentication, testing, linting, formatting, etc.

Remix Indie Stack Learn more about Remix Stacks. npx create-remix --template remix-run/indie-stack What's in the stack Fly app deployment with Docker

Remix 688 Dec 30, 2022
The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc.

The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc.

Remix 677 Jan 2, 2023
Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collections

eznft Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collec

null 3 Sep 21, 2022
a quick start boilerplate for developing web3 apps and deploying smart contracts.

create-web3 A boilerplate for starting a web3 project. This boilerplate quickly creates a mono repo with 2 environments, a Next JS environment for fro

Eric Roupe 83 Dec 16, 2022
The Remix Stack for deploying to Vercel with testing, linting, formatting, structure and mock for 3rd party API integration.

Remix DnB Stack See it live: https://dnb-stack.vercel.app/ Learn more about Remix Stacks. npx create-remix --template robipop22/dnb-stack What's in th

Robert Pop 61 Dec 13, 2022
Remix Stack for deploying to Vercel with remix-auth, Planetscale, Radix UI, TailwindCSS, formatting, linting etc. Written in Typescript.

Remix Synthwave Stack Learn more about Remix Stacks. npx create-remix --template ilangorajagopal/synthwave-stack What's in the stack Vercel deploymen

Ilango 56 Dec 25, 2022
TypeScript framework for deploying distributed indexers on Aleph VMs for Solana.

Aleph Indexer Framework v0.1 The Aleph Indexer Framework is a high-level abstraction for building multithreaded indexers on Aleph. It is designed to b

Aleph.im 11 Dec 15, 2022
🦄 A CLI tool to quickly generate Next.js components

?? nextrate A CLI tool for quickly generating Next.js components. ✨ Features Automatically add the file type to the component name using the folder na

Kira 9 Aug 19, 2022
Quickly bootstrap your next TypeScript REST API project. Node 16+, auto OpenAPI, Prettier+ESLint, Jest

REST API template with autogenerated OpenAPI Quickly bootstrap your next TypeScript REST API project with the most up to date template. Included a sam

null 6 Oct 1, 2022