This website is built using Docusaurus 2, a modern static website generator.
Node.js version >= 14 or above (which can be checked by running node -v).
npm install
Copy .env.local.example
to .env.local
:
cp .env.local.example .env.local
npm run start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
To scaffold a blog post run:
npm run blog:new --slug={slug for your post}
This will create a directory in the format {current date}-{slug}
with a
index.mdx
. Update index.mdx
with your blog post content.
Newsletters subscriptions make a POST request to http://www.tigrisdata.com/api/newsletter/
This works in production because the blog is served from the same www.tigrisdata.com domain. It will not work in other scenarios where a cross-domain request is attempted since CORS is not enabled on the newsletter subscription API endpoint.
So to test this locally, you'll need to use a local proxy. To support this, you
can change the base URL of the newsletter subscription API endpoint using
NEXT_NEWSLETTER_API_BASE_URL
in the .env.local
file.
If you use https://github.com/garmeeh/local-cors-proxy, you can then set
NEXT_NEWSLETTER_API_BASE_URL
to http://localhost:8010/proxy
.
npm run build
npm run serve
This command generates static content into the build
directory and can be
served using any static contents hosting service.
The coding style rules are defined by Prettier and enforced by Eslint
We use pre-commit to automatically setup and run git hooks.
On every git commit
we check the code quality using prettier and eslint.
Install pre-commit and initialize it with the included commit hooks as follows:
brew install pre-commit
pre-commit install