Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions assets/js/hugegraph-shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,12 @@
}

function init(windowObject, documentObject) {
if (windowObject.OinkComparePane) {
// Duo View panes are ordinary documents: keep article table behavior,
// but do not bind navigation, storage, search or version controllers twice.
initScrollableTables(documentObject);
return;
}
var config = readConfig(documentObject);
consumeVersionFallback(windowObject, documentObject, config);
initVersionSwitching(windowObject, documentObject);
Expand Down
1 change: 1 addition & 0 deletions assets/js/kapa-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@
}

function init(windowObject, documentObject) {
if (windowObject.OinkComparePane) return null;
var config = readConfig(documentObject);
if (!config) return null;
var controller = createController(windowObject, documentObject, config);
Expand Down
2 changes: 2 additions & 0 deletions assets/js/language-preference.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
(function () {
'use strict';

if (window.OinkComparePane) return;

var node = document.getElementById('hg-language-config');
if (!node) return;
var config = JSON.parse(node.textContent);
Expand Down
17 changes: 17 additions & 0 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -931,3 +931,20 @@
width: 100%;
max-width: 36rem;
}

@media screen {
// Let configuration keys set the width of their own column.
.td-content .td-table-scroll:not(.td-table-scroll--static) > .hg-config-keys > tbody > tr > td:first-child {
max-width: none;
}
}

// OINK Duo View loads ordinary pages in same-origin iframes. Keep content-level
// interactions, but remove HugeGraph's top-level AI chrome from both panes.
html[data-td-compare-pane] {
.hg-ask-ai-launcher,
.hg-ai-consent,
.hg-ai-status {
display: none !important;
}
}
2 changes: 1 addition & 1 deletion content/cn/docs/config/config-backend-rocksdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ rocksdb-data/
| rocksdb.use_direct_io_for_flush_and_compaction | `false` | flush 和 compaction 时使用直接读写。 |
| rocksdb.use_fsync | `false` | 为 true 时每次持久化都会执行 fsync。 |
| rocksdb.atomic_flush | `false` | 为 true 时多个列族的 flush 结果会原子地提交到 MANIFEST。WAL 一直开启的情况下不必设置该项。 |
{.td-table--wide}
{.wide .hg-config-keys}

### SST 表格式与块缓存配置项

Expand Down
2 changes: 1 addition & 1 deletion content/cn/docs/config/config-option.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ HStore 后端还会从图配置文件 `{graph-name}.properties` 中读取以下
| rocksdb.partition_filters_and_indexes | false | If bloom filter is enabled, set this option true to use partitioned full filters and indexes for each sst file. This option is incompatible with block-based filters. |
| rocksdb.pin_top_level_index_and_filter | true | If partition_filters_and_indexes is set true, set this option true if we'd pin top-level index of partitioned filter and index blocks to the block cache. |
| rocksdb.prefix_extractor_n_bytes | 0 | The prefix-extractor uses the first N bytes of a key as its prefix, it will use the full key when a key is shorter than the N. 0 means unset prefix-extractor. |
{.td-table--wide}
{.wide .hg-config-keys}

> [!DETAILS]- **K8s 配置项 (可选)**
> 对应配置文件`rest-server.properties`
Expand Down
2 changes: 1 addition & 1 deletion content/cn/docs/quickstart/hugegraph/hugegraph-pd.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ PD 启动脚本读取安装目录中的 `conf/application.yml`。请使用与安
| `management.metrics.export.prometheus.enabled` | `true` | Spring Boot 默认值 | 是否暴露 `/actuator/prometheus`。 |
| `management.endpoints.web.exposure.include` | `health,metrics,prometheus` | Spring Boot 默认只暴露 `health` | Actuator 暴露白名单;这些端点不经过 PD REST Basic 拦截器。 |
| `logging.config` | `file:./conf/log4j2.xml` | 无 | Log4j2 配置文件,会写出 `logs/hugegraph-pd.log`、`logs/hugegraph-pd_raft.log` 和 `logs/audit-hugegraph-pd.log`。 |
{.td-table--wide}
{.wide .hg-config-keys}

**线程池**

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/config/config-backend-rocksdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Other points to keep in mind:
| rocksdb.use_direct_io_for_flush_and_compaction | `false` | Enable the OS to use direct read/writes in flush and compaction. |
| rocksdb.use_fsync | `false` | If true, then every store to stable storage will issue a fsync. |
| rocksdb.atomic_flush | `false` | If true, flushing multiple column families and committing their results atomically to MANIFEST. Note that it's not necessary to set atomic_flush=true if WAL is always enabled. |
{.td-table--wide}
{.wide .hg-config-keys}

### SST table format and block cache options

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/config/config-option.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ Basic Config Options and Backend Config Options correspond to configuration file
| rocksdb.partition_filters_and_indexes | false | If bloom filter is enabled, set this option true to use partitioned full filters and indexes for each sst file. This option is incompatible with block-based filters. |
| rocksdb.pin_top_level_index_and_filter | true | If partition_filters_and_indexes is set true, set this option true if we'd pin top-level index of partitioned filter and index blocks to the block cache. |
| rocksdb.prefix_extractor_n_bytes | 0 | The prefix-extractor uses the first N bytes of a key as its prefix, it will use the full key when a key is shorter than the N. 0 means unset prefix-extractor. |
{.td-table--wide}
{.wide .hg-config-keys}

> [!DETAILS]- **K8s Config Options (Optional)**
> Corresponding configuration file `rest-server.properties`
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/quickstart/hugegraph/hugegraph-pd.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ initial partitions = store count * partition.store-max-shard-count / partition.d
| `management.metrics.export.prometheus.enabled` | `true` | Spring Boot default | Exposes `/actuator/prometheus`. |
| `management.endpoints.web.exposure.include` | `health,metrics,prometheus` | Spring Boot exposes only `health` by default | Actuator allowlist; these endpoints bypass the PD REST Basic interceptor. |
| `logging.config` | `file:./conf/log4j2.xml` | none | Log4j2 configuration. Writes `logs/hugegraph-pd.log`, `logs/hugegraph-pd_raft.log` and `logs/audit-hugegraph-pd.log`. |
{.td-table--wide}
{.wide .hg-config-keys}

**Thread pools**

Expand Down
6 changes: 3 additions & 3 deletions contribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ effect. Use `--baseURL` or `HG_DOC_SITE_ORIGIN` when changing the rendered
origin (the flag wins when both are set); a server `--port` is reflected in
the generated local origin.

OINK 1.4 uses Hugo's built-in LibSass. Its deprecation warning must remain visible;
The pinned OINK release uses Hugo's built-in LibSass. Its deprecation warning must remain visible;
do not add `--panicOnWarning` or suppress it with `ignoreLogs`. The shared
`scripts/hugo_build.py` gate permits only that exact warning and fails builds on
all other Hugo warnings, including missing translations and duplicate target
Expand All @@ -91,7 +91,7 @@ validate commands so older candidate branches do not need the new CI helpers.
Candidates pinned to OINK 1.3.0 are outside this workflow's supported scope.
OINK 1.3.1 requires standalone Dart Sass, while this workflow installs native
LibSass only. Both pins are rejected before scheduling builds; upgrade such a
candidate to OINK 1.4.0 before dispatching it.
candidate to the current OINK pin before dispatching it.
Historical documentation versions still use the current site's shell and are
unaffected by this candidate-theme restriction. Cache hits still run the full
version validator, and aggregation validates every selected version again.
Expand Down Expand Up @@ -124,7 +124,7 @@ latest 文档使用 SeaTunnel 3.0+ 等最低版本说明,并引用上游 lates

Use the focused [OINK feature reference](scripts/oink-features.md) for component
selection, copyable syntax and real HugeGraph source examples. It covers the
native components used by this site, OINK 1.4.0's table reader and release cards,
native components used by this site, including the table reader, release cards and Duo View,
and the public interfaces used by the site shell. Read the relevant section
before adding a renderer, shortcode, script or stylesheet.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/apache/hugegraph-doc

go 1.27.3

require github.com/pgsty/oink v1.4.0
require github.com/pgsty/oink v1.5.1
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/pgsty/oink v1.4.0 h1:EAYCzReap9+nrXuZUogmrXEv62ulJUaSNK1zpGRwM5Y=
github.com/pgsty/oink v1.4.0/go.mod h1:GBKnERMfbKlRSFuKCa+kV7sehSAT7kAlYHxwxglg9Jw=
github.com/pgsty/oink v1.5.1 h1:PgOZ7gnbkoJKZMFZ4YvCVXNL7HDiMV0LJiNYYhxiRmw=
github.com/pgsty/oink v1.5.1/go.mod h1:GBKnERMfbKlRSFuKCa+kV7sehSAT7kAlYHxwxglg9Jw=
2 changes: 2 additions & 0 deletions hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ params:
reading_time: false
feedback: false
keyboard_nav: true
# OINK native Duo View is exposed only for real Docs/Book/Blog translations.
compare: true

module:
imports:
Expand Down
2 changes: 1 addition & 1 deletion layouts/_partials/actions/manifest.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $outputFormat := lower (.Store.Get "tdOutputFormat" | default "html") -}}
{{- $context := partialCached "actions/context.html" . .Site.BaseURL .Site.Language.Lang .RelPermalink $outputFormat -}}
{{- $context := partialCached "actions/context.html" . .Site.BaseURL .Site.Language.Lang (partial "compare/page-key.html" .) $outputFormat -}}
{{- $versionOptions := partial "version-options.html" . -}}
{{- $actions := slice -}}
{{- range $context.actions -}}
Expand Down
14 changes: 6 additions & 8 deletions layouts/_partials/navbar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- /* OINK v1.3.1 override: keep keyboard help in the header and expose
version links inside the landing-page mobile drawer. */ -}}
{{- /* OINK v1.5.1 override: keep keyboard help in the header and expose
HugeGraph version links inside the native navbar-only mobile drawer. */ -}}
{{- $config := partialCached "shell/config.html" . .Site.Language.Lang -}}
{{- $targets := partialCached "language-targets.html" . .Site.BaseURL .RelPermalink .Site.Language.Lang -}}
{{- $localSearch := partial "shell/search-enabled.html" . -}}
Expand All @@ -8,12 +8,10 @@
aside). */ -}}
{{- $landingLayout := eq .Layout "landing" -}}
{{- $drawerMode := and (not $landingLayout) (partial "shell/chrome-enabled.html" .) (partial "shell/sidebar-enabled.html" .) -}}
{{- /* Home and explicit Landing layouts render the drawer entry: these are
the navbar-only surfaces with no sidebar drawer to fall back on. CSS
gates the button to the below-md tier, where it joins search as the
whole right-hand contract; the centered link tree stays at every
width, so the drawer only restores the full labelled hierarchy. */ -}}
{{- $landingSurface := and (not $drawerMode) (or .IsHome $landingLayout) -}}
{{- /* Every navbar-only surface needs the native mobile drawer. OINK 1.5.1
widened this from home/landing pages so utility controls stay reachable
on taxonomy, list and other pages without the docs sidebar. */ -}}
{{- $landingSurface := not $drawerMode -}}
{{- /* The navbar owns this drawer even with a local homepage renderer. */ -}}
{{- if $landingSurface }}{{ .Page.Store.Set "hasLanding" true }}{{ end -}}
{{- $githubStars := partial "landing/github-stars.html" . -}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/_partials/shell/sidebar-panel.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- /* OINK override (reviewed against v1.1.0): the mobile Docs drawer owns global controls that
{{- /* OINK override (reviewed against v1.5.1): the mobile Docs drawer owns global controls that
disappear from the compact header and no longer repeat in the footer. */ -}}
{{- $config := partialCached "shell/config.html" . .Site.Language.Lang -}}
{{- $hasAlgolia := partialCached "search/algolia-enabled.html" . .Site.Language.Lang .Site.BaseURL -}}
Expand All @@ -9,7 +9,7 @@
<div class="td-shell-sidebar__panel">
<div class="td-shell-sidebar__header">
<div class="td-shell-sidebar__brand-row">
<a class="td-shell-sidebar__brand" href="{{ .Site.Home.RelPermalink }}" aria-label="{{ $config.brandName }} home">
<a class="td-shell-sidebar__brand" href="{{ .Site.Home.RelPermalink }}" aria-label="{{ $config.brandName }} — {{ T "ui_home" }}">
<img src="{{ $config.logoURL }}" alt="" width="20" height="20">
{{- if $config.wordmarkURL }}
<img class="td-shell-brand-logo--wordmark" src="{{ $config.wordmarkURL }}" alt="" width="100" height="40">
Expand Down
8 changes: 4 additions & 4 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Legacy/ad-hoc preview only. ASF staging and production use .github/workflows/hugo.yml.
[build]
command = "hugo --cleanDestinationDir --gc --minify --environment production --printPathWarnings --printI18nWarnings --panicOnWarning"
command = "bash scripts/hugo.sh build"
publish = "public"

[build.environment]
GO_VERSION = "1.27.0"
HUGO_VERSION = "0.165.0"
GO_VERSION = "1.27.3"
HUGO_VERSION = "0.168.0"
HUGO_ENVIRONMENT = "production"

27 changes: 23 additions & 4 deletions scripts/oink-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Expo's generated previews, neighboring-original preload and album layout work
do not apply to Gallery. Supply intrinsic `width` and `height` on standalone
Markdown images to reserve space; those attributes do not compress the file.
Inspect generated HTML and measure bytes/timing before claiming an improvement.
See the [tagged Expo implementation](https://github.com/pgsty/oink/blob/v1.4.0/layouts/_partials/expo/items.html).
See the [tagged Expo implementation](https://github.com/pgsty/oink/blob/v1.5.1/layouts/_partials/expo/items.html).

### Terminal recordings

Expand All @@ -197,6 +197,24 @@ only for presentation. Resize the terminal before recording: overriding player
`cols`/`rows` can crop it. Check desktop and mobile playback.
The recorder is an authoring tool, not a build dependency.

## Native Duo View

OINK 1.5.1 calls the feature **Duo View** in English and **双列视图** in
Chinese. Use **Sync Scroll / 同步滚动** for its optional approximate heading
alignment. The configuration and action IDs remain `params.ui.compare` and
`compare_translations`; do not rename those public identifiers.

HugeGraph enables the native feature globally. OINK discovers only real,
same-origin HTML translations of Docs, Book and Blog pages, loads the peer page
on demand, and hides the entry when no valid translation exists. Do not add a
parallel route map, copied reader template, machine-generated placeholder
translation or site-specific comparison controller. Align heading IDs only on
important pages where a real Sync Scroll problem is observed.

Site-level integrations loaded from hooks must stand down when
`window.OinkComparePane` is true. Content runtimes remain active so tables, tabs,
diagrams, code controls and fragment links continue to work inside each pane.

## Site integration and output checks

- `hugo.yaml` owns appearance, search and output configuration. Four style
Expand Down Expand Up @@ -225,7 +243,8 @@ The recorder is an authoring tool, not a build dependency.
fallbacks. Check RSS where the component appears in a feed. A successful Hugo
render alone does not establish compatibility.

The [1.4.0 release notes](https://oink.pgsty.com/zh/blog/release/1.4.0/) and
[tagged source](https://github.com/pgsty/oink/tree/v1.4.0) are the reference for
this upgrade. Consult the pinned release before extending a component; the
The [1.5.1 release](https://github.com/pgsty/oink/releases/tag/v1.5.1),
[changelog](https://github.com/pgsty/oink/blob/v1.5.1/CHANGELOG.md) and
[tagged source](https://github.com/pgsty/oink/tree/v1.5.1) are the reference for
the current pin. Consult the pinned release before extending a component; the
upstream website can describe a newer version.
Loading
Loading