Coder Social home page Coder Social logo

next-site-cn's Introduction

前言

Next.js 是一个轻量级的 React 服务端渲染应用框架。

next.js中文文档:http://nextjs.frontendx.cn

当前翻译版本为 7.0.0-canary.8。

案例

  • 用nextjs + express + MongoDB的增删改查项目:程序员英语学习

  • 本站就是next.js编写的生成静态网站,是个很好的 Demo, ^ ^.

讨论组

https://gitter.im/next-site-cn/nextjs?utm_source=share-link&utm_medium=link&utm_campaign=share-link

安装运行

  • Clone 代码到本地并运行
git clone https://github.com/raoenhui/next-site-cn.git
cd next-site-cn
yarn
yarn dev
  • 在浏览器中打开 http://localhost:3000 进行访问

相关仓库

next-site-cn's People

Contributors

arunoda avatar brianlovin avatar bringking avatar dependabot[bot] avatar evilrabbit avatar judy98taylor avatar kmelve avatar leo avatar lfades avatar mottox2 avatar nhodges avatar papucho avatar ragingwind avatar raoenhui avatar tgrecojs avatar timneutkens avatar timothyis avatar turbo87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

next-site-cn's Issues

使用postcss-loader出现的问题!!!!

我的postcss-config.js
`const autoprefixer = require('autoprefixer');
const pxtorem = require('postcss-pxtorem');

module.exports = {
plugins: [
autoprefixer({
overrideBrowserslist: ['> 1%', 'last 4 versions'],
}),
pxtorem({
rootValue: 70,
unitPrecision: 5,
propList: ["*"],
selectorBlackList: [/^.nop2r/, /^.am/],
replace: true,
mediaQuery: false,
minPixelValue: 0
})
],
};next.config.jsconst withCSS = require('@zeit/next-css')
module.exports = withCSS()
const withSass = require('@zeit/next-sass')
module.exports = withSass({
cssModules: true,
cssLoaderOptions: {
importLoaders: 1,
localIdentName: "[local]___[hash:base64:5]",
}
}) 出现的问题如下: 我给一个h1标签设置字体大小h1 {
display: flex;
flex: 1;
font-size: 20px;
width: 70px;
}`
但是在浏览器显示:

next.js 自定义路由

我想实现自定义路由/detail/2333

const express = require('express');
const next = require('next');

const dev = process.env.NODE_ENV !== 'production';
const app = next({ dev });
const handle = app.getRequestHandler();

app.prepare().then(() => {
    const server = express();
    server.get('/detail/:id', (req, res) => {
        const actualPage = '/detail';
        return app.render(req, res, actualPage);
    });
    server.get('*', (req, res) => {
        handle(req, res);
    });
    server.listen(8060, '0.0.0.0');
});

可是这样写没有效果,连服务都起不来了
求助

关于postcss-pxtorem

hello 您知道nextjs 中 post-pxtorem 怎么配置吗, 我配置后没法设置html 中根元素 font-size 大小,也就没法自定义 postcss-pxtorem 中rootValue 了 有什么解决办法吗~
谢谢~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.