the next generation block styled editor -- eidtor.js
what’s editor?
Next generation block styled editor. Free. Use for pleasure.
Editor.js is a block-style editor for rich media stories. It outputs clean data in JSON instead of heavy HTML markup. And more important thing is that Editor.js is designed to be API extendable and pluggable.
So there ar ...
Next.js -- SSG of React
SSR
https://css-tricks.com/server-side-react-rendering/
react代码在客户端渲染,这样导致SEO不友好。
由此引入,SSR 服务器端渲染技术:ReactDomServer库。
The Benefits of Server-Side Rendering
SEO might be the conversation that starts your team talking about server-side rendering, but it’s not the only ...
链表
//JS没有链表,可以用object 模拟链表
const a = { val: 'a'};
const b = { val: 'b'};
const c = { val: 'c'};
const d = { val: 'd'};
a.next = b;
b.next = c;
c.next = d;
//遍历链表
let p = a;
while (p) {
console.log(p.val);
p = p.next;
}
//插入
const e = { val: 'e'}
c.next = e;
e.next = d;
来 ...
Next.js 是怎么做预渲染的
前言
打开 next.js 官网,首先映入眼帘的是它的 Slogan 和介绍:
The React Framework for ProductionNext.js gives you the best developer experience with all the features you need for production: hybrid static & server rendering, TypeScript support, smart bundling, route pre-fetching, and more ...
Next.js + 云开发Webify 打造绝佳网站
Next.js酷在哪里?
之前使用 Next.js + strapi 做了一个简单博客站点也顺道写了一篇 Next.js 简明教程,之后 Next 本身一直在迅猛发展。利用代 js 能力来说做到了:
极佳的开发体验
极佳的网站最佳的”动“,“静”平衡
从特性上来说,支持:
SSR(Server Side Rendering)
提供 getServerSideProps 方法,在用户访问时请 ...
next.js引入antd报错
首先在pages根目录下新建一个_app.js ,代码如下,然后再引入对应antd组件即可
import App from 'next/app'
import 'antd/dist/antd.css'
export default App
来源:https://www.cnblogs.com/xiaoyaoweb/p/15125909.html
Leetcode 86 分割链表
JAVA:
public final ListNode partition(ListNode head, int x) {
ListNode leftHead = new ListNode(), rightHead = new ListNode(),
left = leftHead, right = rightHead;
while (head != null) {
if (head.val < x) {
...
数据结构之-反向打印链表
通过数组或者栈保存元素来实现
翻转链表,再打印
reversePrint = function(nodes){
let prev= null;
let next= null;
// let cur = nodes
while(nodes){
next = nodes.next
nodes.next = prev
prev = nodes;
nodes = next
}
return prev
}
var nodes = {
val:1,
next:{
...
vue 全局路由守卫,系统未登录时自动跳转到登录页面
main.js:
router.beforeEach((to, from, next) => {
const loginPath = '/login'
if (to.path !== loginPath && !localStorage.getItem('user')) {
next(loginPath)
} else {
next()
}
})
来源:https://www.cnblogs.com/150536FBB/p/14703278.html
Secure your local development server with HTTPS (Next.JS)
https://anmagpie.medium.com/secure-your-local-development-server-with-https-next-js-81ac6b8b3d68
Create certificate
Creating a certificate for localhost is easy with openssl . Just put the following command in the terminal. The output will be two files: localhost.key and localhost.crt
openssl req -x ...
从做中学01-Next.js
一.Nextjs的简单介绍
Next.js 是一个轻量级的 React 服务端渲染应用框架
与客户端渲染相比,其优势在于:①更利于SEO;②利于首屏加载
当使用 React 开发系统的时候,常常需要配置很多繁琐的参数,如 Webpack 配置、Router 配置和服务器配置等。如果需要做 SEO,要考虑的事情就更多了,怎么让服务端渲染和客户端渲染保持一 ...
使用Next.js快速创建react
1.安装next脚手架https://create-next-app.js.org/2.控制台运行
npx create-next-app
yarn与npm命令无法创建,原因未知
3.安装配置依赖
npm install next react react-dom
# or
yarn add next react react-dom
等待安装成功后运行npm run dev,进入http://localhost:3000/便能进入首页了
来源:http ...
使用next.js完成从开发到部署,一组开源技术大全
next.js 是一个非常棒的轻量级的react同构框架,使用它可以快速的开发出基于服务端渲染的react应用。在next.js 官网推荐的是使用now来部署应用,但是对于国内用户或者说是有特殊需求的用户来说,部署到自定义服务器也许是大多数人希望的。借着近期公司官网改版,顺便分享下自己从开发到部署过程中所经历的点点滴 ...
Next.js
这是一个用于 生产环境的React 框架
Next.js 为您提供生产环境所需的所有功能以及最佳的开发体验:包括静态及服务器端融合渲染、 支持 TypeScript、智能化打包、 路由预取等功能 无需任何配置。
开始学习
中文文档
漫思
来源:https://www.cnblogs.com/sexintercourse/p/14421174.html ...
Next.js SSR Tutorials
Next.js SSR Tutorials
https://codesandbox.io/s/nextjs-demo-h49zt
cli
$ npx create-next-app ssr-demo-app --use-npm
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客 ...
hexo的 使用
1hexo安装
npm install -g hexo
2初始化并下载工程
hexo init
2生成首页
hexo g
3运行下载的hexo
hexo s
4更新文件后工程里
hexo g
hexo s
5更新主题
git clone https://github.com/theme-next/hexo-theme-next themes/next
6清空原来默认的主题
hexo clean
7安装部署
npm install hexo-deployer-git --save
hexo ...
JavaScript 算法 1_1 下压堆栈 (链表实现)
JavaScript 算法 1_1 下压堆栈 (链表实现)
链表是一种递归的数据结构
目录JavaScript 算法 1_1 下压堆栈 (链表实现)1. 节点结构2. 构造链表3. 从表头插入和删除元素4. 代码实现
1. 节点结构
node = {
ele: null,
next: null,
}
这里使用了 ele 作为一个节点的元素内容, next 作为下个节点的索引
2. 构造链表
let ...
vue跳转新页面后回到顶部
全部页面就在mian.js中设置
router.afterEach((to,from,next)=>{window,scrollTo(0,0)})
来源:https://www.cnblogs.com/zhang-DaChong/p/14255636.html
react+next.js遇到的问题及解决
1.使用react-image插件做图片预览,报错:window is not defined。
因为next.js使用的是服务端渲染,没有window。
解决方法是引入的时候,加一个对象 {SSR:false}。
import dynamic from 'next/dynamic'
let Zmage = dynamic(import('react-zmage'), { ssr: false })
2.使用this.props.router.query获取不到查询 ...
如何把 Next.js 项目部署到服务器?
Next.js 是什么?
Next.js 是一个用于 生产环境的 React 框架。Next.js 为您提供生产环境所需的所有功能以及最佳的开发体验:包括静态及服务器端融合渲染、 支持 TypeScript、智能化打包、 路由预取等功能 无需任何配置。
21云盒提供了速简单的Next.js部署方法,你可以在21云盒子上通过以静态网页或以Node Server的方式进行 ...