首页 > 其他分享 >create-a-page

create-a-page

时间:2024-02-05 14:25:06浏览次数:24  
标签:src create pages React 3000 Create page

sidebar_position: 1

Create a Page

Add Markdown or React files to src/pages to create a standalone page:

  • src/pages/index.jslocalhost:3000/
  • src/pages/foo.mdlocalhost:3000/foo
  • src/pages/foo/bar.jslocalhost:3000/foo/bar

Create your first React Page

Create a file at src/pages/my-react-page.js:

import React from 'react';
import Layout from '@theme/Layout';

export default function MyReactPage() {
  return (
    <Layout>
      <h1>My React page</h1>
      <p>This is a React page</p>
    </Layout>
  );
}

A new page is now available at http://localhost:3000/my-react-page.

Create your first Markdown Page

Create a file at src/pages/my-markdown-page.md:

# My Markdown page

This is a Markdown page

A new page is now available at http://localhost:3000/my-markdown-page.

标签:src,create,pages,React,3000,Create,page
From: https://www.cnblogs.com/ameng666/p/18007880

相关文章

  • create-a-blog-post
    sidebar_position:3CreateaBlogPostDocusauruscreatesapageforeachblogpost,butalsoablogindexpage,atagsystem,anRSSfeed...CreateyourfirstPostCreateafileatblog/2021-02-28-greetings.md:---slug:greetingstitle:Greetings!auth......
  • [MIT 6.S081] Lab: xv6 lazy page allocation
    Lab:xv6lazypageallocationEliminateallocationfromsbrk()这一步比较简单,直接在sys_sbrk中将分配内存改为对内存大小进行修改而不分配内存即可。uint64sys_sbrk(void){intaddr;intn;if(argint(0,&n)<0)return-1;addf=myproc()->sz;my......
  • 编译时process_begin: CreateProcess | mutex/condition_variable 报错的一种解决办法
    系统:win10目的:想跑一下wisper.cpp前置操作:把该项目git下来后打算make,一make就报错注意,图里其实有两种错误,第一种是process_begin:CreateProcess(NULL,xxx)failed,第二种是error:'thread'isnotamemberof'std'.第二种错误是因为mingw不支持thread库,但是官方有给过补丁,可......
  • sql server执行dbcc修复,提示:(类型为 In-row data)的对象 "hr_bd_BusTables",计数 In-ro
    问题:数据库执行DBCCCHECKDBwithNO_INFOMSGS检查提示:计数In-rowdataUSEDpage不正确。请运行DBCCUPDATEUSAGE。DBCCCHECKDBwithNO_INFOMSGS;消息2508,级别16,状态1,第1行对于索引ID为1、分区ID为311221045166080、分配单元ID为311221045166080(类型......
  • MIT 6.1810 Lab: page tables
    lab网址:https://pdos.csail.mit.edu/6.828/2022/labs/pgtbl.htmlxv6Book:https://pdos.csail.mit.edu/6.828/2022/xv6/book-riscv-rev3.pdfBooklearningXv6使用Sv39RISC-V标准,即使用39位的虚拟地址。前27位作为页表项索引,后12位作为页内偏移。页表项记录一个44位的实页号......
  • Spring Data审计功能@CreatedDate、@CreatedBy、@LastModifiedDate、@LastModifiedBy
    在SpringJPA中,在实体bean的属性上加注解@CreatedDate、@CreatedBy、@LastModifiedDate、@LastModifiedBy,可以再实体插入数据库时进行设置值,这样以来,在对普通实体类的添加、修改操作时,就不用关心创建时间、更新时间这些信息了。本文以SpringBoot为例1、引入依赖<dependency><......
  • CSharp: create pdf file using iText 8.0 in donet 8.0
     /*IDE:VS202217.5OS:windows10.net8.0iText8.0System.Text.Encoding.CodePages*/namespaceConsoleAppPdfdemo{usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.IO;usingSystem.Text;......
  • Page.ClientScript.RegisterClientScriptBlock 有时在前台页面无法注册的可能原因
    原因一:前台页面缺少<formid="form1"runat="server"></form>标签。加上即可。原因二:如果一个页面顺序执行多个Page.ClientScript.RegisterClientScriptBlock(this.GetType(),"key","jsfunction")且RegisterClientScriptBlock方法的第二个参数为脚本的Key都为......
  • createDelegatingPasswordEncoder只有在spring 5.1.13才能用吗?
    springboot和spring版本对应关系:SpringBoot1.x支持SpringFramework4.x系列,包括4.0、4.1、4.2和4.3等版本。SpringBoot2.x支持SpringFramework5.x系列,包括5.0、5.1和5.2等版本。 下载springboot会一并下载 ......
  • epoll_create函数
    目录函数简介低层实现逻辑epoll_create与epoll_create1函数的区别函数简介/*Createsanepollinstance.Returnsanfdforthenewinstance.The"size"parameterisahintspecifyingthenumberoffiledescriptorstobeassociatedwiththenewinstance.......