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
TranslateModulein the component where you want to translate the text.// xxx.component.ts import { TranslateModule } from 'src/translate/translate.module';
-
Add the
translateDirective 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}.jsonfile by runningpnpm i18n:extract.Then you can find the extracted text in both the
src/assets/i18n/en.jsonandsrc/assets/i18n/zh.jsonfile.{ "This is an example text.": "This is an example text." } -
Manually update the translation in the
src/assets/i18n/zh.jsonfile.{ "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}.mdin thecommunity/articlesdirectory. -
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 eitherenorzh. -
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 a transparent background (png format best).
Then add the image file xxx.png in the src/assets/users/ directory and add the xxx.png item in the src/app/tokens/users.ts.
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}.mdin thecommunity/docs/releasesdirectory. -
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 weight: 90 ---
The
weightfield is used to sort the release notes in the website. The higher the number, the earlier the release note will be displayed.If you'd like to use some pictures in the markdown, you can save theme in the
public/imgdirectory and use relative path, such as. -
Update the latest version in the
community/docs/downloads.md. -
Commit the changes and push them to the repository.