This project is a website UI for Apache Paimon.
Run pnpm install
to install all dependencies.
Note: Make sure you have installed pnpm before running the command.
Run pnpm start
for a dev server. Navigate to http://localhost:8801/
. The application will automatically reload if you change any of the source files.
Run pnpm build
to build the project. The build artifacts will be stored in the dist/
directory.
You can also run npx http-server dist
to serve the build files to preview the website.
Run pnpm lint
to lint the project to ensure the code quality. Run pnpm lint:fix
to fix the linting issues. Of course, husky
will run the linting automatically before each commit.
This project supports both English and Chinese. The language of the website (defaults to English) will be determined by the users choice in the website, which is stored in the browser's local storage.
-
Import
TranslateModule
in the component where you want to translate the text.// xxx.component.ts import { TranslateModule } from 'src/translate/translate.module';
-
Add the
translate
Directive to the HTML element you want to translate.<p translate>This is an example text.</p>
Note: Refer to @ngx-translate/core for more usages.
-
Extract the text to the
src/assets/i18n/{language}.json
file by runningpnpm i18n:extract
.Then you can find the extracted text in both the
src/assets/i18n/en.json
andsrc/assets/i18n/zh.json
file.{ "This is an example text.": "This is an example text." }
-
Manually update the translation in the
src/assets/i18n/zh.json
file.{ "This is an example text.": "这是一个示例文本。" }
If you just want to update the Chinese translation, you can directly modify the src/assets/i18n/zh.json
file.
If you want to update the English translation, you need to modify the component's HTML file and run pnpm i18n:extract
to extract the text again, then update the src/assets/i18n/zh.json
file.
-
Create a new markdown file
{title}.md
in thecommunity/articles
directory. -
Add the following front matter to the markdown file, including the title, author, categories, release date, and languages.
--- authors: - 李劲松 categories: - 技术探索 date: 2024.08.22 languages: - zh ---
Please make sure the date is in the format
yyyy.MM.dd
, and the language is eitheren
orzh
. -
Parse the articles and generate the blog metadata by running
pnpm parse
. The metadata will be stored in thesrc/assets/metadata/
directory. -
Wait for the dev server to reload, and you can preview the new blog post on your localhost website.
-
Commit the changes and push them to the repository.
The blog post supports both English and Chinese. The language of the blog post will be determined by the languages
field in the front matter of the markdown file.
If user chooses the Chinese language in the website, the Chinese blog post will be displayed; otherwise, the English blog post will be displayed.
List of users who are using Apache Paimon are maintained in the src/assets/users/
file.
Firstly You should prepare a new image file with transparent background (png format best) and which color is in grayscale.
Then add the image file xxx.png
in the src/assets/users/
directory and add the xxx.png
item in the WhosusingComponent
.
Save the file and preview the page to make sure it looks well.
The release notes are maintained in the community/docs/releases
directory.
-
Create a new markdown file
release-{version}.md
in thecommunity/docs/releases
directory. -
Add the following front matter to the markdown file, including the title, type (always
release
) and semantic version.--- title: "Release 0.9" type: release version: 0.9.0 ---
If you'd like to use some pictures in the markdown, you can save theme in the
public/img
directory and use relative path, such as![image](./img/xxx.png)
. -
Update the latest version in the
community/docs/downloads.md
. -
Commit the changes and push them to the repository.