- This is a Next.js application for building the Emeritus Microsites bootstrapped with
create-next-app
. - The content for these landing pages will be powered through Contentful
Folder structure is very key for any new application.
We have divided the folders based on how landing pages are visually organized
- Layouts - Defines the layout of the pages
- Sections - A page can have multiple sections like header section, foooter section, banner section, testimony section etc. Section is basically a collection of modules
- Modules - A module is a collection of components that represents the part of a section like Facutly card in a faculties section. Module is based on components
- Components - Components are the basic building blocks of the pages. example button, text box, links are considered to be components
- Use nvm to install version of node mentioned in
.nvmrc file
. - If you don't have nvm follow the link to get it installed https://github.com/nvm-sh/nvm
- Once nvm is installed do
nvm use
npm install yarn
yarn dev
Open http://localhost:3000 with your browser to see the result.
Install Nginx:
brew install nginx
If you want to test a subdomain (eg: wsj.partner.emeritusdev.com
), add the following line to /etc/hosts
using sudo:
127.0.0.1 localhost wsj.partner.emeritusdev.com
You can add as many subdomains as you want by adding more lines to /etc/hosts
.
Start the server with:
yarn dev-nginx
If you get a permissions error from the command try to give execution permissions to the script with:
chmod 744 bin/dev-nginx
You can access the subdomains you configured from your browser:
wsj.partner.emeritusdev.com:3000
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!