Documentation website for Kata Products
Welcome to the GitHub project for Kata Documentations (Kata Docs 2.0) using Next.js. We've built this site from the ground-up with performance, accessibility, and fanciness in mind. It contains documentation from all across the Kata Products:
Mainly, you can access the documentation website at https://docs.kata.ai
Clone this repository.
git clone `link here`
cd to the generated project. Here we'll have to install our node dependencies. To do so, run (one of) the following command(s).
# npm
npm install
# yarn
yarnTo start working on this documentation, you need to start a development server.
# npm
npm run dev
# yarn
yarn devWe use Commitizen with the cz-conventional-changelog standard. We included the Commitizen CLI inside the repository so that you can generate a formatted commit message simply by typing yarn commit (or npm commit).
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
The first line must contain a commit type, an optional scope, and the subject of the commit.
The message body contains a longer description of the change. This is reserved for any information that won't fit inside the subject line of a commit message. Note that each line of the commit message should not be longer than 72 characters.
Footer is optional, and contains any additional information for the commit (e.g. issues fixed, breaking changes).
We use the following conventional-changelog commit types:
feat: A new feature
fix: A bug fix
docs: Documentation only changes
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
refactor: A code change that neither fixes a bug nor adds a feature
perf: A code change that improves performance
test: Adding missing tests or correcting existing tests
build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
ci: Changes to our CI configuration files and scripts (example scopes: travis, circle)
chore: Other changes that don't modify src or test files
revert: Reverts a previous commit
Helper scripts are scripts collection that helps in kata docs development. All of them are included in the scripts folder. You could contact the creator of the scripts if you need more explanation. There are three scripts in the folder.
-
Steven Evan -
addDimensionImage.jsThis script helps to add property
naturalHeightandnaturalWidthon Image component in.mdxfiles. You ask why we manually add the dimension into the component. The answer is that we usenext/imagefor the image component that contains the lazy load feature to improve performance significantly. In the next documentation, we must define the dimension in thenext/imagecomponent or the container (if using thefilllayout). Additional note:- One of the authors, Steven Evan, had tried to create a solution for not defining
naturalWidthandnaturalHeightusing theonLoadingCompletefunction onnext/image. But, a major bug showed up that made the author makes this script. That bug was a navigation scrolling bug. When the user clicks the accordion item on the navigation sidebar, the page will scroll into the wrong position. That could happen because the image will have zero height and zero-width initially before we define the image using theonLoadingCompletefunction.
- One of the authors, Steven Evan, had tried to create a solution for not defining
-
Steven Evan -
linkingToc.jsThis script will generate a
JSONfile that defines the relationship of each markdown or MDX (next and previous docs). You can see the outputs in this link. This approach improves the performance of the previous one for the markdown relationship issue that used BFS or DFS search. -
Steven Evan -
sanitize.jsThis script is related to JSON outputs from the
markdown2jsonlibrary. These outputs will be used in the searching feature using Fusejs.markdown2jsonwill get the content and all the frontmatter based on the settings of each kata product setting in themarkdown-to-json/settingsfolder. Besides the settings folder, there is the output folder. This folder contains each output in themarkdown-to-json/outputsfolder (that will be sanitized by this script later).Using this script, you will get additional properties in the json output. Those properties will help for showing the data in the search result.
- Izzan Nuruddin (@IzzanNurdin) – Kata.ai
- Steven Evan (@stevenevan) - Kata.ai
- Mirza Zanuar (@zanuarmirza) - Kata.ai