12 |
Documentation
13 |
Installation
14 |
15 |
16 |
17 |
18 | Clone the repository and install the dependencies
19 | (you may want to{" "}
20 |
21 | fork
22 | {" "}
23 | the project before, to have your own copy):
24 |
25 |
26 | git clone https://github.com/jsulpis/nextjs-template.git && cd
27 | nextjs-template && yarn install
28 |
29 |
30 |
31 | Update the package.json metadata with yours.
32 |
33 |
34 |
Configuration
35 |
Tailwind CSS
36 |
37 |
38 | You may want to change the theme in tailwind.config.js to
39 | use your own color palette.
40 |
41 |
42 | See the{" "}
43 | documentation for
44 | more details.
45 |
46 |
47 |
48 |
SonarCloud
49 |
50 |
51 | Create a new project on{" "}
52 | SonarCloud and note the
53 | generated token.
54 |
55 |
56 | Update the project description in sonar-project.properties.
57 |
58 |
59 | The Sonar Scanner is set up to run in the GitHub Actions workflow. You just need
60 | to add a SONAR_TOKEN secret in your GitHub repository (
61 | Settings > Secrets) with the token generated
62 | in SonarCloud.
63 |
64 |
65 |
66 |
Deployment
67 |
68 | This template is ready to be deployed on{" "}
69 | Vercel : just connect it to your
70 | GitHub repository and let it deploy it. The deployement should also be fairly
71 | straightforward with any other cloud platform like{" "}
72 | Netlify.
73 |
74 |
75 |
Environment variables
76 |
77 | This project uses the NEXT_PUBLIC_ROOT_URL environment
78 | variable in several meta tags. This variable refers to the deploy url of your
79 | application. A value is given in the .env.production file,
80 | which you may want to update with your url. You can also set this variable in the
81 | settings of your project on Vercel.
82 |
83 |
84 |