{% extends '../layout/admin.html' %} {% block html_title %}{{ customTitle(t('Customize')) }} {% endblock %} {% block style_css_block %} {% endblock %} {% block html_additional_headers %} {% parent %} {% endblock %} {% block content_header %}
{% endblock %} {% block content_main %}
{% set smessage = req.flash('successMessage') %} {% if smessage.length %}
{{ smessage }}
{% endif %} {% set emessage = req.flash('errorMessage') %} {% if emessage.length %}
{{ emessage }}
{% endif %}
{% include './widget/menu.html' with {current: 'customize'} %}
{{ t('customize_page.Theme') }}
{{ t('customize_page.Behavior') }} {% set isBehaviorGrowi = 'growi' === settingForm['customize:behavior'] || 'crowi-plus' === settingForm['customize:behavior'] %}

  • Both of /page and /page/ shows the same page
  • /nonexistent_page shows editing form
  • All pages shows the list of sub pages if using GROWI Enhanced Layout

  • /page shows the page
  • /page/ shows the list of sub pages
    • If portal is applied to /page/ , the portal and the list of sub pages are shown
  • /nonexistent_page shows editing form
  • /nonexistent_page/ the list of sub pages
{{ t('customize_page.Layout') }} {% set isLayoutGrowi = 'growi' === settingForm['customize:layout'] || 'crowi-plus' === settingForm['customize:layout'] %}

  • Simple and Clear
    • Show and post comments from the bottom of the page
    • Affix Table-of-contents

  • Functional
    • Collapsible Sidebar
    • Show and post comments in Sidebar
    • Collapsible Table-of-contents
{{ t('customize_page.Function') }}

{{ t("customize_page.function_choose") }}

{{ t("customize_page.subpage_display") }}

{{ t("customize_page.performance_decrease") }}
{{ t("customize_page.list_page_display") }}

{{ t("customize_page.save_edit") }}
{{ t("customize_page.by_invalidating") }}

{{ t("customize_page.attach_title_header_desc") }}
{{ t("customize_page.by_invalidating_title_header") }}

{{ t('customize_page.Code Highlight') }}

Examples:

function $initHighlight(block, cls) {
  try {
    if (cls.search(/\bno\-highlight\b/) != -1)
      return process(block, true, 0x0F) +
              ` class="${cls}"`;
  } catch (e) {
    /* handle exception */
  }
  for (var i = 0 / 2; i < classes.length; i++) {
    if (checkCondition(classes[i]) === undefined)
      console.log('undefined');
  }
}

export  $initHighlight;

カスタム Title

<title>タグのコンテンツをカスタマイズできます。
{{sitename}}がサイト名、{{page}}がページ名またはページパスに置換されます

Default Value: {{page}} - {{sitename}}
Default Output:

<title>/Sandbox - {{ appTitle }}</title>

カスタムヘッダーHTML

システム全体に適用される HTML を記述できます。<header> タグ内の他の <script> タグ読み込み前に展開されます。
変更の反映はページの更新が必要です。

Examples:

<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/languages/yaml.min.js" defer></script>

Ctrl+Space でコード補完

{{ t('customize_page.Custom CSS') }}

{{ t("customize_page.write_CSS") }}
{{ t("customize_page.reflect_change") }}

{{ t("customize_page.ctrl_space") }}

{{ t('customize_page.Custom script') }}

{{ t("customize_page.write_java") }}
{{ t("customize_page.reflect_change") }}

Placeholders:
(Available after load event)

$
jQuery instance
crowi
Crowi context instance
Crowi
Crowi legacy instance (jQuery based)
crowiRenderer
Crowi Renderer instance
crowiPlugin
GROWI plugin manager instance

Examples:

console.log($('.main-container'));

window.addEventListener('load', (event) => {
  console.log('config: ', crowi.config);
});

{{ t("customize_page.ctrl_space") }}

{% endblock content_main %} {% block body_end %} {% parent %}
{% endblock %} {% block content_footer %} {% endblock content_footer %}