GithubHelp home page GithubHelp logo

nextjs-starter's Introduction

Instruction

$ npm install

For development

$ npm run dev - run app default on port 5200

For deployment

$ npm run build - build app

$ npm start - run app with prod flag on port 3000

Configs

You can change config like default title for pages and ports in file config.js

HOC withPage

During creating new pages remember to export your page component with HOC withPage to keep defaultHead data like global styles or fonts. You can define your global link for styles or fonts or some other resources in:

src/app-bootstrap/HeadData.js - there are just elements which goes to <head> tag on every page as a global.

If you want to have custom headData per page then you should pass second parameter to withPage HOC for example:


export default withPage(Index, {
    title: 'My custom title for Index page',
    metas: [
        {
            name: 'keywords',
            content: 'Keyword for index page'
        },
        {
            name: 'description',
            content: 'Description for index page'
         }
    ]
})

as a result your <head> tag receive:

<title>My custom title for Index page</title>
<meta name="keywords" content="Keyword for index page">
<meta name="description" content="Description for index page">

Directory aliases

You can check and create new one directory aliases in file .babelrc

nextjs-starter's People

Contributors

fasosnql avatar przemekfingoweb avatar

Stargazers

 avatar

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.