Podcast
Questions and Answers
Which variable represents a normal blue color?
Which variable represents a normal blue color?
- $color-blue-normal (correct)
- $color-blue-ultra-light
- $color-blue-mid
- $color-blue-light
Which of the following is defined as the default color?
Which of the following is defined as the default color?
- $color-default
- $color-grey-normal (correct)
- $color-blue-normal
- $color-white-normal
Which file contains global CSS styles not bound to a specific module?
Which file contains global CSS styles not bound to a specific module?
- Person.js
- Person.module.scss
- styles.css
- globals.css (correct)
What is the primary purpose of the Person.js
file?
What is the primary purpose of the Person.js
file?
Which file type is less powerful than SCSS files?
Which file type is less powerful than SCSS files?
What is the primary purpose of Node.js?
What is the primary purpose of Node.js?
What is the Node Package Manager (NPM) mainly used for?
What is the Node Package Manager (NPM) mainly used for?
What is the main benefit of using Node Version Manager (NVM)?
What is the main benefit of using Node Version Manager (NVM)?
Which command is used to install the required Node.js modules?
Which command is used to install the required Node.js modules?
Which command is used to install Node.js version 18.18.2 using NVM on Windows?
Which command is used to install Node.js version 18.18.2 using NVM on Windows?
Which file stores environment variables for the application?
Which file stores environment variables for the application?
How do you check which version of Node.js is installed?
How do you check which version of Node.js is installed?
How can you list all installed Node.js versions using NVM on macOS?
How can you list all installed Node.js versions using NVM on macOS?
What is the purpose of the STORYBLOK_PREVIEW_SECRET
variable?
What is the purpose of the STORYBLOK_PREVIEW_SECRET
variable?
What is the function of an HTTPS proxy when developing locally with Storyblok CMS?
What is the function of an HTTPS proxy when developing locally with Storyblok CMS?
In the Storyblok preview URL, what should YOUR_STORYBLOK_PREVIEW_SECRET_GOES_HERE
be replaced with?
In the Storyblok preview URL, what should YOUR_STORYBLOK_PREVIEW_SECRET_GOES_HERE
be replaced with?
What is the typical protocol and port used for the local development server?
What is the typical protocol and port used for the local development server?
Which of these statements accurately describes Node.js?
Which of these statements accurately describes Node.js?
What action is needed to enable the Storyblok visual editor?
What action is needed to enable the Storyblok visual editor?
After setting up the environment, how do you start the debugging mode in VSCode?
After setting up the environment, how do you start the debugging mode in VSCode?
What is the final step to test the local development server?
What is the final step to test the local development server?
What command is used to build the site locally in a way that mirrors Vercel's production build process?
What command is used to build the site locally in a way that mirrors Vercel's production build process?
Where can environment variables be set for a Vercel project after an initial failed build?
Where can environment variables be set for a Vercel project after an initial failed build?
How can a new build be triggered from the 'Deployments' page in Vercel?
How can a new build be triggered from the 'Deployments' page in Vercel?
What action is required to reflect changes made to the site's content online, when the site is statically generated?
What action is required to reflect changes made to the site's content online, when the site is statically generated?
What is the function of a deploy hook in Vercel?
What is the function of a deploy hook in Vercel?
What is the role of a webhook in the context of content changes and Vercel?
What is the role of a webhook in the context of content changes and Vercel?
After successfully deploying your site to Vercel, what is the key change in the URL that can be noticed?
After successfully deploying your site to Vercel, what is the key change in the URL that can be noticed?
If environment variables are forgotten initially, what must be done to ensure that new values are picked up by Vercel?
If environment variables are forgotten initially, what must be done to ensure that new values are picked up by Vercel?
Which of the following best describes the primary difference between Google Analytics and HotJar?
Which of the following best describes the primary difference between Google Analytics and HotJar?
In the described development process, what is the primary function of Vercel?
In the described development process, what is the primary function of Vercel?
Which tool is primarily used for local code testing and debugging?
Which tool is primarily used for local code testing and debugging?
What role does GitHub play in the development process described?
What role does GitHub play in the development process described?
What is the purpose of an 'integration' environment in a real-world development setting?
What is the purpose of an 'integration' environment in a real-world development setting?
What does an 'acceptance' environment provide for the software development process?
What does an 'acceptance' environment provide for the software development process?
Which of the following tools is explicitly described as an email communication tool?
Which of the following tools is explicitly described as an email communication tool?
According to the passage, what causes the deployment process to happen automatically when using Vercel?
According to the passage, what causes the deployment process to happen automatically when using Vercel?
What is the primary purpose of a Vercel Deploy Hook?
What is the primary purpose of a Vercel Deploy Hook?
In the context of the described code execution order, what is the role of getStaticPaths
?
In the context of the described code execution order, what is the role of getStaticPaths
?
Which of the following best describes the purpose of getStaticProps
?
Which of the following best describes the purpose of getStaticProps
?
What is the correct order of code execution when processing an incoming request, according to the material?
What is the correct order of code execution when processing an incoming request, according to the material?
What is the role of the _app.js/MyApp
component?
What is the role of the _app.js/MyApp
component?
Why would a website be statically generated when deploying to Vercel?
Why would a website be statically generated when deploying to Vercel?
Which of these is NOT one of the primary component systems described in this content?
Which of these is NOT one of the primary component systems described in this content?
What action initiates the fetching of data for a specific URL in this setup?
What action initiates the fetching of data for a specific URL in this setup?
Flashcards
SCSS Variable
SCSS Variable
A variable, in SCSS, defined with a dollar sign ($) followed by the name of the variable and a colon (:). The value of the variable is set after the colon.
Global CSS File
Global CSS File
A CSS file used to store general, non-module-specific CSS styles, applying globally to the website.
Why SCSS is More Powerful than CSS?
Why SCSS is More Powerful than CSS?
SCSS files are more powerful than CSS files because they offer advanced features like variables, mixins, and nested rules.
Person Component
Person Component
Signup and view all the flashcards
Storyblok Component
Storyblok Component
Signup and view all the flashcards
Node.js
Node.js
Signup and view all the flashcards
NPM (Node Package Manager)
NPM (Node Package Manager)
Signup and view all the flashcards
NVM (Node Version Manager)
NVM (Node Version Manager)
Signup and view all the flashcards
Installing an HTTPS Proxy
Installing an HTTPS Proxy
Signup and view all the flashcards
Command Window (Windows) or Terminal (macOS/Linux)
Command Window (Windows) or Terminal (macOS/Linux)
Signup and view all the flashcards
node --version
node --version
Signup and view all the flashcards
nvm install [version number]
nvm install [version number]
Signup and view all the flashcards
nvm list
nvm list
Signup and view all the flashcards
npm install
npm install
Signup and view all the flashcards
env.local file
env.local file
Signup and view all the flashcards
STORYBLOK_API_KEY
STORYBLOK_API_KEY
Signup and view all the flashcards
STORYBLOK_PREVIEW_SECRET
STORYBLOK_PREVIEW_SECRET
Signup and view all the flashcards
Preview endpoint
Preview endpoint
Signup and view all the flashcards
Exit Preview endpoint
Exit Preview endpoint
Signup and view all the flashcards
Default environment location
Default environment location
Signup and view all the flashcards
Debugging mode
Debugging mode
Signup and view all the flashcards
Local Development Environment
Local Development Environment
Signup and view all the flashcards
IDE and Browser Developer Tools
IDE and Browser Developer Tools
Signup and view all the flashcards
GitHub
GitHub
Signup and view all the flashcards
Production Environment
Production Environment
Signup and view all the flashcards
Vercel
Vercel
Signup and view all the flashcards
Integration Environment
Integration Environment
Signup and view all the flashcards
Acceptance Environment
Acceptance Environment
Signup and view all the flashcards
Simplified Development Process
Simplified Development Process
Signup and view all the flashcards
What does "npm run build" do?
What does "npm run build" do?
Signup and view all the flashcards
What are Environment Variables?
What are Environment Variables?
Signup and view all the flashcards
How do code and content changes trigger a build?
How do code and content changes trigger a build?
Signup and view all the flashcards
What happens when you change content on your website?
What happens when you change content on your website?
Signup and view all the flashcards
Why does code changing trigger a build?
Why does code changing trigger a build?
Signup and view all the flashcards
What is deploying to Vercel?
What is deploying to Vercel?
Signup and view all the flashcards
What is the "Deployments" page?
What is the "Deployments" page?
Signup and view all the flashcards
How does Vercel handle changes?
How does Vercel handle changes?
Signup and view all the flashcards
Deploy Hook
Deploy Hook
Signup and view all the flashcards
Server-Side Rendering (SSR) with getStaticPaths and getStaticProps
Server-Side Rendering (SSR) with getStaticPaths and getStaticProps
Signup and view all the flashcards
The _app.js file
The _app.js file
Signup and view all the flashcards
The [[...slug]].js/Page file
The [[...slug]].js/Page file
Signup and view all the flashcards
Static Site Generation (SSG)
Static Site Generation (SSG)
Signup and view all the flashcards
The [[...slug]].js/Page component
The [[...slug]].js/Page component
Signup and view all the flashcards
Dynamic Storyblok Component
Dynamic Storyblok Component
Signup and view all the flashcards
StoryBlok
StoryBlok
Signup and view all the flashcards
Study Notes
Connecting the CMS and the Site
- Introduction
- The data model was introduced and implemented in Storyblok
- The resume website needs to connect to the new data model in the content management system
- Getting the Code
- The easiest way to get the code for the Resume project is to fork it.
- Instructions for forking the repository are available at: https://docs.github.com/en/get-started/quickstart/fork-a-repo
- Steps to get the code:
- Log in to your GitHub account
- Search for JanMoonsUGent/resume
- Open the repository
- Fork the repository
- You will now be in your account/resume
- Git Clone vs. Fork
- Developers who work on a common codebase will clone the repository to synchronize changes
- Forking creates a new codebase. Updates to a fork are not synchronized with the original repo
- Cloning the Project
- Use the GitHub CLI to clone the project from your online GitHub account to your local computer. This is described in part 1, starting from step 7
Software Structure
- After cloning, open the folder in VSCode
- The file structure is a Next.js project
- Important folders/files:
components
: Contains JavaScript files for UI componentsnode_modules
: Contains external modules used by the sitepublic
: Contains publicly accessible assets (e.g., images)styles
: Contains CSS stylesheets (using SCSS)pages
: Contains Next.js pages. Includes[[...slug]].js
,_app.js
, and_document.js
which are relevant for StoryBlok
- Specific files:
_app.js
: Initializes pages in NextJS[[...slug]].js
: Uses dynamic routes based on Storyblok information. The catch-all route handler runs before any page.styles/colors.scss
: Contains CSS color variables
- Code examples:
pages/_app.js
: maps Storyblok component names to Next.js component namespages/[[...slug]].js
: responsible for executing for every URL request to the site and includes three important methods:
- getStaticPaths: gets all possible paths for the server-side rendering of pages
- getStaticProps: retrieves data from the CMS needed for the current page
components/genericComponents/Person/Person.js
: Displays person information, including experience. Uses storyblokEditable to support real-time editing in Storyblok.components/genericComponents/Experience/Experience.js
: Displays experience information. Uses RichTextToHTML to handle rich text content from Storyblok, making the code snippet dynamically generate HTML.
Environment Variables
.env.local
: Contains sensitive information like API keys, preview secret key, and deployment URLSTORYBLOK_API_KEY
: Allows connection to the Storyblok CMSSTORYBLOK_PREVIEW_SECRET
: Used for previewing the site within StoryblokNEXT_PUBLIC_DEPLOY_URL
: URL to the site after deployment
Deployment to Vercel
- Deploy the project to Vercel using the deployment button
- Set the environment variables in Vercel settings before deploying
- Now the site will be accessible online.
Additional Notes
npm run build
: Builds the site for production.- Deployment hooks and webhooks can be used to automatically rebuild the website when changes are made in Storyblok.
- If environment variables aren't correctly configured, the site may not function correctly.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.