-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Refer to 'ceresdb/doc' for better language switch #5
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
# README | ||
|
||
# Install mdBook | ||
# Install mdBook & mdBook-i18n | ||
|
||
Download mdBook from its [release page](https://github.com/rust-lang/mdBook/releases) and put it on your `$PATH`. | ||
You should install `Rust lang` first. | ||
|
||
Verify mdBook: | ||
```bash | ||
mdbook --version | ||
``` | ||
Check [this doc](https://www.rust-lang.org/learn/get-started). | ||
|
||
output: | ||
```text | ||
mdbook v0.4.26 | ||
Then install mdBook & mdBook-i18n using `cargo`: | ||
|
||
```bash | ||
./scripts/install.sh | ||
``` | ||
|
||
Read [mdBook Documentation](https://rust-lang.github.io/mdBook/format/summary.html) | ||
Read [mdBook Documentation](https://rust-lang.github.io/mdBook/format/summary.html) for more details. | ||
|
||
# Write documentations | ||
|
||
Directory structure: | ||
```text | ||
docs/ | ||
en/ English translation | ||
src/ | ||
book/ -> Build book result, ignored by git | ||
src/ | ||
en/ -> English translation | ||
introduction/ | ||
introduction.md A documentation | ||
SUMMARY.md A markdown which generates the sidebar menu. Check the detail here https://rust-lang.github.io/mdBook/format/summary.html | ||
zh/ Chinese translation, has same directory structure as en/ | ||
introduction.md -> A markdown | ||
SUMMARY.md -> A markdown which generates the sidebar menu. Check the detail here https://rust-lang.github.io/mdBook/format/summary.html | ||
cn/ -> Chinese translation. It has same directory structure as 'en/'. | ||
resources/ -> Static resources | ||
``` | ||
|
||
The 'mdbook serve' command is used to preview a book by serving it via HTTP at `localhost:3000` by default: | ||
The './scripts/serve.sh' command is used to preview a book by serving it via HTTP at `localhost:3000` by default: | ||
```bash | ||
mdbook serve ./docs/en | ||
./scripts/serve.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,34 @@ | ||
# README | ||
|
||
# 安装 mdBook | ||
# 安装 mdBook 和 mdBook-i18n | ||
|
||
从 [release page](https://github.com/rust-lang/mdBook/releases) 下载 mdBook,并将其放置在 `$PATH` 下. | ||
你需要先安装 Rust 语言. | ||
|
||
验证 mdBook: | ||
```bash | ||
mdbook --version | ||
``` | ||
请参考这个文档 [this doc](https://www.rust-lang.org/learn/get-started). | ||
|
||
输出: | ||
```text | ||
mdbook v0.4.26 | ||
使用 `cargo` 安装 mdBook 和 mdBook-i18n: | ||
|
||
```bash | ||
./scripts/install.sh | ||
``` | ||
|
||
阅读 [mdBook 文档](https://rust-lang.github.io/mdBook/format/summary.html) | ||
更多详情请阅读 [mdBook 文档](https://rust-lang.github.io/mdBook/format/summary.html) | ||
|
||
# 编写文档 | ||
|
||
目录结构: | ||
```text | ||
docs/ | ||
en/ 英文翻译 | ||
src/ | ||
introduction/ | ||
introduction.md 一个文档 | ||
SUMMARY.md 一个 markdown 文档,用于生成侧边菜单栏. 详情请参考 mdBook 文档。 | ||
zh/ 中文翻译,与 en/ 有相同的目录结构。 | ||
book/ -> 书的构建结果,会被 git 忽略 | ||
src/ | ||
en/ 英文翻译 | ||
introduction/ | ||
introduction.md -> 一个文档 | ||
SUMMARY.md -> 一个 markdown 文档,用于生成侧边菜单栏. 详情请参考 mdBook 文档。 | ||
cn/ -> 中文翻译,与 en/ 有相同的目录结构。 | ||
``` | ||
|
||
使用 'mdbook serve' 命令在 `localhost:3000` 部署一个 HTTP 服务器用于预览渲染结果。 | ||
使用 './scripts/serve.sh' 命令在 `localhost:3000` 部署一个 HTTP 服务器用于预览渲染结果。 | ||
```bash | ||
mdbook serve ./docs/en | ||
./scripts/serve.sh | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[book] | ||
title = "HoloInsight Documentation" | ||
authors = ["HoloInsight Authors"] | ||
src = "src/en" | ||
language = "en" | ||
multilingual = true | ||
|
||
[build] | ||
use-default-preprocessors = false | ||
|
||
|
||
[preprocessor.links] | ||
|
||
[[output.i18n.translations]] | ||
src = "src/cn" | ||
language = "cn" | ||
translators = ["HoloInsight Authors"] | ||
title = "HoloInsight 文档" | ||
|
||
[output.random] | ||
command = "/bin/bash ../../move.sh" | ||
|
||
[output.html] | ||
site-url = "/holoinsight-docs/" | ||
additional-css = ["style.css"] | ||
additional-js = ["sidebar.js"] | ||
|
||
[output.html.fold] | ||
enable = true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
echo "ready to move files" | ||
cp -r ../i18n/cn ../html/cn | ||
cp -r ../i18n/en ../html/en | ||
cp -r ../../src/resources ../../book/html/resources | ||
echo "copy done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Un-active everything when you click it | ||
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el) { | ||
el.addEventHandler("click", function() { | ||
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el) { | ||
el.classList.remove("active"); | ||
}); | ||
el.classList.add("active"); | ||
}); | ||
}); | ||
|
||
var updateFunction = function() { | ||
|
||
var id; | ||
var elements = document.getElementsByClassName("header"); | ||
Array.prototype.forEach.call(elements, function(el) { | ||
if (window.pageYOffset >= el.offsetTop) { | ||
id = el; | ||
} | ||
}); | ||
|
||
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el) { | ||
el.classList.remove("active"); | ||
}); | ||
|
||
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el) { | ||
if (id.href.localeCompare(el.href) == 0) { | ||
el.classList.add("active"); | ||
} | ||
}); | ||
}; | ||
|
||
// Populate sidebar on load | ||
window.addEventListener('load', function() { | ||
var pagetoc = document.getElementsByClassName("pagetoc")[0]; | ||
var elements = document.getElementsByClassName("header"); | ||
Array.prototype.forEach.call(elements, function(el) { | ||
var link = document.createElement("a"); | ||
|
||
// Indent shows hierarchy | ||
var indent = ""; | ||
switch (el.parentElement.tagName) { | ||
case "H2": | ||
indent = "20px"; | ||
break; | ||
case "H3": | ||
indent = "40px"; | ||
break; | ||
case "H4": | ||
indent = "60px"; | ||
break; | ||
default: | ||
break; | ||
} | ||
|
||
link.appendChild(document.createTextNode(el.text)); | ||
link.style.paddingLeft = indent; | ||
link.href = el.href; | ||
pagetoc.appendChild(link); | ||
}); | ||
updateFunction.call(); | ||
}); | ||
|
||
|
||
|
||
// Handle active elements on scroll | ||
window.addEventListener("scroll", updateFunction); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
![HoloInsight](https://github.com/traas-stack/holoinsight/raw/main/docs/logo/logo.png) | ||
|
||
![License](https://img.shields.io/badge/license-Apache--2.0-green.svg) | ||
[![OpenIssue](https://img.shields.io/github/issues/traas-stack/holoinsight)](https://github.com/CeresDB/ceresdb/issues) | ||
|
||
# 什么是 HoloInsight | ||
|
||
HoloInsight 关联项目: | ||
* <a href="https://github.com/traas-stack/holoinsight" target="_blank">HoloInsight</a> | ||
* <a href="https://github.com/traas-stack/holoinsight-agent" target="_blank">HoloInsight Agent</a> | ||
* <a href="https://github.com/traas-stack/holoinsight-docs" target="_blank">HoloInsight Docs</a> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...n/src/introduction/what-is-holoinsight.md → ...rc/en/introduction/what-is-holoinsight.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
![HoloInsight](https://github.com/traas-stack/holoinsight/raw/main/docs/logo/logo.png) | ||
|
||
![License](https://img.shields.io/badge/license-Apache--2.0-green.svg) | ||
[![OpenIssue](https://img.shields.io/github/issues/traas-stack/holoinsight)](https://github.com/CeresDB/ceresdb/issues) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The issue address incorrectly points to repo CeresDB. |
||
|
||
# What is HoloInsight | ||
HoloInsight is a cloud-native observability platform with a special focus on real-time log analysis and AI integration. You can check the following documentation for more information. | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
@media only screen and (max-width:1439px) { | ||
.sidetoc { | ||
display: none; | ||
} | ||
} | ||
|
||
@media only screen and (min-width:1440px) { | ||
main { | ||
position: relative; | ||
} | ||
.sidetoc { | ||
margin-left: auto; | ||
margin-right: auto; | ||
left: calc(100% + (var(--content-max-width))/4 - 140px); | ||
position: absolute; | ||
} | ||
.pagetoc { | ||
position: fixed; | ||
width: 200px; | ||
height: calc(100vh - var(--menu-bar-height) - 0.67em * 4); | ||
overflow: auto; | ||
} | ||
.pagetoc a { | ||
border-left: 1px solid var(--sidebar-bg); | ||
color: var(--fg) !important; | ||
display: block; | ||
padding-bottom: 5px; | ||
padding-top: 5px; | ||
padding-left: 10px; | ||
text-align: left; | ||
text-decoration: none; | ||
} | ||
.pagetoc a:hover, | ||
.pagetoc a.active { | ||
background: var(--sidebar-bg); | ||
color: var(--sidebar-fg) !important; | ||
} | ||
.pagetoc .active { | ||
background: var(--sidebar-bg); | ||
color: var(--sidebar-fg); | ||
} | ||
} | ||
|
||
@media print { | ||
.sidetoc { | ||
display: none; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue address incorrectly points to repo CeresDB.