diff --git a/assets/js/hugegraph-shell.js b/assets/js/hugegraph-shell.js index 2cbf2e7028..38402d12d2 100644 --- a/assets/js/hugegraph-shell.js +++ b/assets/js/hugegraph-shell.js @@ -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); diff --git a/assets/js/kapa-adapter.js b/assets/js/kapa-adapter.js index 35a7d9f2fa..3422d0fb31 100644 --- a/assets/js/kapa-adapter.js +++ b/assets/js/kapa-adapter.js @@ -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); diff --git a/assets/js/language-preference.js b/assets/js/language-preference.js index 871ca2d968..5837da1982 100644 --- a/assets/js/language-preference.js +++ b/assets/js/language-preference.js @@ -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); diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss index 8135ec2cf5..aea5710a0e 100644 --- a/assets/scss/_styles_project.scss +++ b/assets/scss/_styles_project.scss @@ -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; + } +} diff --git a/content/cn/docs/config/config-backend-rocksdb.md b/content/cn/docs/config/config-backend-rocksdb.md index 22a188d11f..f54a0b8667 100644 --- a/content/cn/docs/config/config-backend-rocksdb.md +++ b/content/cn/docs/config/config-backend-rocksdb.md @@ -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 表格式与块缓存配置项 diff --git a/content/cn/docs/config/config-option.md b/content/cn/docs/config/config-option.md index 5a51412e3e..03d78f5223 100644 --- a/content/cn/docs/config/config-option.md +++ b/content/cn/docs/config/config-option.md @@ -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` diff --git a/content/cn/docs/quickstart/hugegraph/hugegraph-pd.md b/content/cn/docs/quickstart/hugegraph/hugegraph-pd.md index 0ee64df8ec..c2c53d8bd7 100644 --- a/content/cn/docs/quickstart/hugegraph/hugegraph-pd.md +++ b/content/cn/docs/quickstart/hugegraph/hugegraph-pd.md @@ -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} **线程池** diff --git a/content/en/docs/config/config-backend-rocksdb.md b/content/en/docs/config/config-backend-rocksdb.md index dc0fad035d..dd54111f24 100644 --- a/content/en/docs/config/config-backend-rocksdb.md +++ b/content/en/docs/config/config-backend-rocksdb.md @@ -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 diff --git a/content/en/docs/config/config-option.md b/content/en/docs/config/config-option.md index 8ccda4a40c..9ad3a0eb75 100644 --- a/content/en/docs/config/config-option.md +++ b/content/en/docs/config/config-option.md @@ -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` diff --git a/content/en/docs/quickstart/hugegraph/hugegraph-pd.md b/content/en/docs/quickstart/hugegraph/hugegraph-pd.md index 9bf9a27fef..778b28ccde 100644 --- a/content/en/docs/quickstart/hugegraph/hugegraph-pd.md +++ b/content/en/docs/quickstart/hugegraph/hugegraph-pd.md @@ -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** diff --git a/contribution.md b/contribution.md index 1feba1a30b..e2591895fe 100644 --- a/contribution.md +++ b/contribution.md @@ -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 @@ -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. @@ -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. diff --git a/go.mod b/go.mod index ed7705a94f..89ea065047 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index e4f4337787..c0b266540e 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/hugo.yaml b/hugo.yaml index b941e19696..4757992598 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -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: diff --git a/layouts/_partials/actions/manifest.html b/layouts/_partials/actions/manifest.html index 3029720f3b..3030af534b 100644 --- a/layouts/_partials/actions/manifest.html +++ b/layouts/_partials/actions/manifest.html @@ -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 -}} diff --git a/layouts/_partials/navbar.html b/layouts/_partials/navbar.html index 751432de74..bd95e827eb 100644 --- a/layouts/_partials/navbar.html +++ b/layouts/_partials/navbar.html @@ -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" . -}} @@ -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" . -}} diff --git a/layouts/_partials/shell/sidebar-panel.html b/layouts/_partials/shell/sidebar-panel.html index 0b5e2e9cd5..58fe90191b 100644 --- a/layouts/_partials/shell/sidebar-panel.html +++ b/layouts/_partials/shell/sidebar-panel.html @@ -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 -}} @@ -9,7 +9,7 @@