# install
yarn install
# run
yarn dev
Located in ./.env
NEXT_PUBLIC_SITE_URL
- used to transform absolute links when applicable (omithttps://www
. ex:elegantseagulls.com
)NEXT_PUBLIC_NO_INDEX
- prevent search engines from crawling the website
- CMS/API urls
- API Access Tokens
- Anything that shouldn't be stored in github or visible on the front-end. Remember that variables used on the front-end will be visible in bundled code.
- styles →
@styles/*
- utils →
@utils/*
- components →
@components/*
Example aliasing
/* src/components/MyComponent.js */
import * as React from 'react';
export const MyComponent = () => <div>I'm a Component</div>;
/* src/pages/MyPage.js */
import React from 'react';
import { MyComponent } from '@components/MyComponent';
const MyPage = () => (
<div>
<p>I'm a Page</p>
<MyComponent />
</div>
);
export default MyPage;