コンテンツにスキップ
Kong Logo | Kong Docs Logo
  • ドキュメント
    • API仕様を確認する
      View all API Specs すべてのAPI仕様を表示 View all API Specs arrow image
    • ドキュメンテーション
      API Specs
      Kong Gateway
      軽量、高速、柔軟なクラウドネイティブAPIゲートウェイ
      Kong Konnect
      SaaSのエンドツーエンド接続のための単一プラットフォーム
      Kong AI Gateway
      GenAI インフラストラクチャ向けマルチ LLM AI Gateway
      Kong Mesh
      Kuma と Envoy をベースにしたエンタープライズサービスメッシュ
      decK
      Kongの構成を宣言型で管理する上で役立ちます
      Kong Ingress Controller
      Kubernetesクラスタ内で動作し、Kongをプロキシトラフィックに設定する
      Kong Gateway Operator
      YAMLマニフェストを使用してKubernetes上のKongデプロイメントを管理する
      Insomnia
      コラボレーティブAPI開発プラットフォーム
  • Plugin Hub
    • Plugin Hubを探索する
      View all plugins すべてのプラグインを表示 View all plugins arrow image
    • 機能性 すべて表示 View all arrow image
      すべてのプラグインを表示
      AI's icon
      AI
      マルチ LLM AI Gatewayプラグインを使用してAIトラフィックを管理、保護、制御する
      認証's icon
      認証
      認証レイヤーでサービスを保護する
      セキュリティ's icon
      セキュリティ
      追加のセキュリティレイヤーでサービスを保護する
      トラフィック制御's icon
      トラフィック制御
      インバウンドおよびアウトバウンドAPIトラフィックの管理、スロットル、制限
      サーバーレス's icon
      サーバーレス
      他のプラグインと組み合わせてサーバーレス関数を呼び出します
      分析と監視's icon
      分析と監視
      APIとマイクロサービストラフィックを視覚化、検査、監視
      変革's icon
      変革
      Kongでリクエストとレスポンスをその場で変換
      ログ記録's icon
      ログ記録
      インフラストラクチャに最適なトランスポートを使用して、リクエストと応答データをログに記録します
  • サポート
  • コミュニティ
  • Kongアカデミー
デモを見る 無料トライアルを開始
貢献ガイドライン
  • Home icon
  • Style guide and contribution guidelines
  • Reusable content
report-issue問題を報告する
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Kong AI Gateway
  • Plugin Hub
  • decK
  • Kong Ingress Controller
  • Kong Gateway Operator
  • Insomnia
  • Kuma

  • ドキュメント投稿ガイドライン
  • Contribution guidelines
  • Style guidelines
    • Style guide
    • Word choice and naming
    • Notes and other notices
    • Diagrams
    • Documenting user interfaces
    • Contribution templates
    • Plugin documentation
      • Documenting Kong-owned plugins
      • Documenting partner plugins
  • Markdown rules and formatting
    • Markdown rules
    • Reusable content
    • Variables
    • Single-sourced versions
    • Single-sourced plugins
    • Conditional rendering
  • Community
    • Welcome to the Kong Docs community
    • Community expectations
    • Hackathons
enterprise-switcher-icon 次に切り替える: OSS
On this pageOn this page
  • Create an include
    • File formats and directories
    • Markdown comments
    • Page variables
  • Use an include
    • Conditional content
  • include-check script

このページは、まだ日本語ではご利用いただけません。翻訳中です。

Reusable content

In Jekyll, reusable content is managed using include snippets, which are located in the /app/_includes folder. Use includes to reuse snippets of the same content across multiple pages.

The examples in this topic reference a short include file with a snippet about installation.

Snippets from that include file are called with an include tag in a few target files, such as the Docker installation guide.

Create an include

File formats and directories

Add a Markdown (.md) or HTML (.html) file to the /app/_includes directory at the root of the Kong/docs.konghq.com repository.

  • Markdown includes contain snippets of documentation content, for example, common installation steps.
  • HTML includes contain pieces of website layout and functionality, for example, the footer and top navigation bar.

If your Markdown include does not need to belong to a particular product version, place it in a product directory. For example:

  • app/_includes/mesh
  • app/_includes/plugins-hub

If the include will be used across products, place it directly in of the app/_includes/md/ directory.

If you have different versions of the include content:

  • Content for current version continues to live at the root of the product directory
  • Versioned content (for non-current versions only!) lives in a sub-directory named {VERSION_NUMBER}

Markdown comments

At the top of an include file, add a Markdown comment to note the instances where this include is being used. For example:

<!-- Shared between all Community Linux installation topics: Amazon Linux,
 CentOS, Debian, RedHat, and Ubuntu -->

Page variables

If using page variables inside an include, replace page in the variable with include. For example, page.release becomes include.release.

This is an include that uses {{ include.release }}.

This is necessary because we use the jekyll_include_cache plugin on the docs site, and the plugin needs to know that the variable should not be cached.

Use an include

To add an include, use the include tag with the following basic syntax:

{% include_cached /md/install.md %}
  • Declare the tag with include_cached
  • Add a path relative to the _includes directory

Depending on the content of the snippet, you can pass various parameters to the include tag. If the include content has a variable anywhere in the text, map it to the page variable:

{% include_cached /md/install.md release=page.release %}

This maps page.release to the include.release from the source include file.

Conditional content

You can add if statements to an include to create variations of the content for use in different contexts. For example, in an file named install.md, you might have a snippet where the instructions are specific to Docker:

{% if include.install == "docker" %}
your docker content goes here
{% endif %}

In the target file (the file where you want the content to display), call the Docker section of the include:

{% include_cached /md/install.md install='docker' %}

The syntax for the if statement and the include is not the same.

  • When creating an if statement condition based on a string, the string must be enclosed in double quotes (" ") and use two equals signs: if include.install == "docker"
  • When calling the section in an include_cached tag, use single quotes (' ') and one equals sign: install='docker'

include-check script

The Kong docs site runs an include check script on every change pushed to the repository. If you run into issues with an include, the check will flag them. See more info about the include check in our repository README.

Thank you for your feedback.
Was this page useful?
情報が多すぎる場合 close cta icon
Kong Konnectを使用すると、より多くの機能とより少ないインフラストラクチャを実現できます。月額1Mリクエストが無料。
無料でお試しください
  • Kong
    APIの世界を動かす

    APIマネジメント、サービスメッシュ、イングレスコントローラーの統合プラットフォームにより、開発者の生産性、セキュリティ、パフォーマンスを大幅に向上します。

    • 製品
      • Kong Konnect
      • Kong Gateway Enterprise
      • Kong Gateway
      • Kong Mesh
      • Kong Ingress Controller
      • Kong Insomnia
      • 製品アップデート
      • 始める
    • ドキュメンテーション
      • Kong Konnectドキュメント
      • Kong Gatewayドキュメント
      • Kong Meshドキュメント
      • Kong Insomniaドキュメント
      • Kong Konnect Plugin Hub
    • オープンソース
      • Kong Gateway
      • Kuma
      • Insomnia
      • Kongコミュニティ
    • 会社概要
      • Kongについて
      • お客様
      • キャリア
      • プレス
      • イベント
      • お問い合わせ
  • 利用規約• プライバシー• 信頼とコンプライアンス
© Kong Inc. 2025