Run the following command on your local environment:
git clone https://github.com/huynguyen1305/nextjs-tailwind-mantine-i18next.git my-project-name
cd my-project-name
yarn install
Then, you can run locally in development mode with live reload:
yarn dev
Open http://localhost:3000 with your favorite browser to see your project.
**Note:
git remote remove origin
git remote set-url origin git://new.url.here
You can easily configure Next js Boilerplate by making a search in the whole project with FIXME:
for making quick customization. Here is some of the most important files to customize:
public/apple-touch-icon.png
, public/favicon.ico
, public/favicon-16x16.png
and public/favicon-32x32.png
: your website favicon, you can generate from https://favicon.io/favicon-converter/src/styles/global.scss
: your SCSS file using Tailwind CSSsrc/config/appSEOConfig.ts
: configuration SEOnext-sitemap.config.js
: sitemap configurationYou have access to the whole code source if you need further customization. The provided code is only example for you to start your project. The sky is the limit π.
export const getStaticProps: GetStaticProps = async ({ locale }) => {
return {
props: {
...(await serverSideTranslations(locale ?? 'en', ['common'])),
// Will be passed to the page component as props
},
};
};
remotePatterns
in next.config.js
. fill
props because of it can't responsive. Use this:<div style={{ position: 'relative', width: '300px' }}>
<Image
src="https://nxas.nexon.com/images/background/pc-background-07.png"
alt="testPic"
width={1280} // This will be resolution of image. Suggest: 1280x720 (HD)
height={720} // This will be resolution of image. Suggest: 1280x720 (HD)
style={{
width: '100%',
height: 'auto',
objectFit: 'cover',
}} // Treat image span full parent div width
/>
</div>
/components
git status
git stash
and pull new change git pull
git stash list
to show list stash. And choose stash {id}git stash show -p stash@{id}
. git stash apply stash@{id}
or git stash pop
to get and clean up newest stashgit add .
yarn commit
to start cz
. Remember, subject will be the Jira Task Codeyarn commit
$ yarn build
$ yarn start
Developer experience first:
@
prefixThe generated HTML and CSS files are minified (built-in feature from Next js). It will also removed unused CSS from Tailwind CSS.
You can create an optimized production build with:
yarn build-prod
All generated files are located at out
folder, which you can deploy with any hosting service.
All tests are colocated with the source code inside the same directory. So, it makes it easier to find them. Unfortunately, it is not possible with the pages
folder which is used by Next.js for routing. So, what is why we have a pages.test
folder to write tests from files located in pages
folder.
If you are VSCode users, you can have a better integration with VSCode by installing the suggested extension in .vscode/extension.json
. The starter code comes up with Settings for a seamless integration with VSCode. The Debug configuration is also provided for frontend and backend debugging experience.
With the plugins installed on your VSCode, ESLint and Prettier can automatically fix the code and show you the errors. Same goes for testing, you can install VSCode Jest extension to automatically run your tests and it also show the code coverage in context.
Made with β₯ by CreativeDesignsGuru
Licensed under the MIT License, Copyright Β© 2022
See LICENSE for more information.