Math2IT belongs to Coprimal. It is a Coprimal project, and this repository lives in the Coprimal GitHub org.
- Domain: https://math2it.com
- The repo lives at github.com/Coprimal/math2it.com. It moved from
dinhanhthi/math2it.comon 2026-11-18. GitHub redirects the old path, so never create a repo nameddinhanhthi/math2it.comagain (that breaks the redirect). - Vercel builds and deploys every push to
mainthrough its GitHub App, which must keep access to this repo in the Coprimal org. - The repo must stay public while the Vercel project is on the Hobby plan: Hobby does not deploy private repos owned by a GitHub organization. Making it private again needs Vercel Pro.
- The site stays on
www.math2it.com(Cloudflare DNS → Vercel);math2it.comredirects to it.
- BEFORE PUSHING: run
yarn run checkto check if there are errors! - DON'T comment on the right side of the variable in
.env.local!!! - Change something in
.env.local, MUST restart manually theyarn dev! - Dev tags (used to search globally in the project)
###M: useful in dev mode, not prod mode.###TODO: to to.###R: remarks!###Thior###R: should be removed before building.
First time only,
# install yarn
npm install -g corepack
yarn init -2
yarn set version stable
# Global tools
npm install -g fontello-cli
# install
yarnDaily dev,
yarn dev # port 3003
# build before deploying
yarn build
# serve locally what are built
yarn start # port 3003
# lint
yarn prettierUPDATE 25/9/23: This step is nolonger needed.
Show the content
For updating cover and book cover and images in post!
If an image on Notion isn't hosted on imgur, download this image -> upload to imgur -> get the url -> update the corresponding field on notion.
# Update cover for a single post
yarn ud-cover <postId>
# Update cover for all posts in a database
# (look for posts who need to be updated)
yarn ud-cover-all
# Update book cover for a single post
yarn ud-book-cover <postId>
# For both Cover and Book Cover of a post
yarn ud-header <postId>
# For both Cover and Book Cover of ALL post
yarn ud-header-all
# Update image blocks in post
yarn ud-images-post <postId>For a custom font, use fontello.
# ud fontello
# (update file fontello/config.json)
yarn ud-fontelloUsage (ng is the field css in the config file),
<i className="icon-ng"></i>🚸 Make sure the codes are unique! You can check the tab "Customize Codes" on the fontello page.
Custom svg icon
- Drag and drop svg to fontello.
- If having problem "If image looks not as expected please convert to compound path manually" -> use this site to fix the svg and then download the fixed svg and try again!
# Version: 1.2.3
# means: breaking.feature.fix
npm version patch # 1.0.0 -> 1.0.1 (fixes)
npm version minor # 1.0.1 -> 1.1.0 (new features )
npm version major # 1.1.0 -> 2.0.0 (completely new APIs)Check Notion Note.