LOADING
411 mots
2 min

Guide Twilight - Personnalisation Avancée

Guide for Template - Advanced Customization

Avis de traduction (Non révisé)

Cette page a été traduite par IA et peut contenir des inexactitudes.

Traduit de: 🇬🇧 English (Deepseek)

Voir l'original Retour à la traduction

Ce guide couvre les options de personnalisation avancées et les fonctionnalités disponibles dans le modèle Twilight, des configurations globales aux extensions Markdown spécialisées.

Configuration Globale

Le fichier twilight.config.yaml est le cœur de la configuration de votre blog. Voici quelques paramètres avancés que vous pouvez ajuster :

Site et Localisation

  • Langue et Traduction : Activez la traduction côté client en utilisant site.translate.enable. Vous pouvez choisir différents services et configurer la détection automatique.

  • Polices Personnalisées : Ajoutez vos propres polices en fournissant un lien CSS ou un chemin de fichier sous site.font.

Effets Visuels

  • Couleur du Thème : Modifiez la couleur principale de votre blog en ajustant site.themeColor.hue (0-360).

  • Modes de Fond d’Écran : Choisissez entre banner, fullscreen ou none. Vous pouvez également activer un carousel pour plusieurs fonds d’écran avec l’effet kenBurns.

  • Effet de Vagues : Activez ou désactivez l’effet d’ondulation d’eau animé sur la bannière avec site.wallpaper.banner.waves.enable.

  • Effets de Particules : Activez les particules flottantes en arrière-plan avec particle.enable.

Interface Utilisateur

  • Transparence de la Barre de Navigation : Ajustez site.wallpaper.banner.navbar.transparentMode entre semi, full ou semifull.

  • Widgets de la Barre Latérale : Réorganisez ou activez/désactivez les composants de la barre latérale comme profile, announcement, categories, tags, toc et statistics dans sidebar.components.

Extensions Markdown

Cartes de Dépôt GitHub

Vous pouvez ajouter des cartes dynamiques qui pointent vers des dépôts GitHub. Au chargement de la page, les informations du dépôt sont récupérées depuis l’API GitHub.

Spr-Aachen
/
Twilight
Waiting for api.github.com...
00K
0K
0K
Waiting...

Créez une carte de dépôt GitHub avec le code ::github{repo="Spr-Aachen/Twilight"}.

::github{repo="Spr-Aachen/Twilight"}

Cartes Musicales

  • En ligne
Loading...
Loading...
Loading lyrics...
0:00 / 0:00
::music{meting="https://meting.spr-aachen.com/api?server=netease&type=song&id=1390882521"}
  • Locale
深海之息
Youzee Music
Loading lyrics...
0:00 / 0:00
::music{title="深海之息" artist="Youzee Music" cover="https://p1.music.126.net/PhKOqFtljgHDDpKYM2ADUA==/109951169858309716.jpg" audio="assets/music/深海之息.m4a" lrc="assets/music/深海之息.lrc"}

Admonitions

Les types d’admonitions suivants sont pris en charge : note tip important warning caution

Note

Met en évidence des informations que les utilisateurs devraient prendre en compte, même en survolant.

Tip

Informations facultatives pour aider un utilisateur à réussir davantage.

Important

Informations cruciales nécessaires pour que les utilisateurs réussissent.

Warning

Contenu critique nécessitant une attention immédiate de l’utilisateur en raison de risques potentiels.

Caution

Conséquences négatives potentielles d’une action.

  • Syntaxe de Base

    :::note
    Met en évidence des informations que les utilisateurs devraient prendre en compte, même en survolant.
    :::
    :::tip
    Informations facultatives pour aider un utilisateur à réussir davantage.
    :::
  • Titres Personnalisés

    Le titre de l’admonition peut être personnalisé.

    MON TITRE PERSONNALISÉ

    Ceci est une note avec un titre personnalisé.

    :::note[MON TITRE PERSONNALISÉ]
    Ceci est une note avec un titre personnalisé.
    :::
  • Syntaxe GitHub

    Tip

    La syntaxe GitHub est également prise en charge.

    > [!TIP]
    > La syntaxe GitHub est également prise en charge.
  • Spoiler

    Vous pouvez ajouter des spoilers à votre texte. Le texte prend également en charge la syntaxe Markdown.

    Le contenu est caché ayyy !

    Le contenu :spoiler[est caché **ayyy**] !

Pour plus de détails, consultez la Documentation.

This guide covers advanced customization options and features available in the Twilight template, from global configurations to specialized Markdown extensions.

Global Configuration

The twilight.config.yaml file is the heart of your blog’s configuration. Here are some advanced settings you can tweak:

Site & Localization

  • Language & Translation: Enable client-side translation using site.translate.enable. You can choose different services and configure auto-detection.

  • Custom Fonts: Add your own fonts by providing a CSS link or file path under site.font.

Visual Effects

  • Theme Color: Change the primary color of your blog by adjusting the site.themeColor.hue (0-360).

  • Wallpaper Modes: Choose between banner, fullscreen, or none. You can also enable a carousel for multiple wallpapers with the kenBurns effect.

  • Waves Effect: Toggle the animated water ripple effect on the banner using site.wallpaper.banner.waves.enable.

  • Particle Effects: Enable floating particles in the background with particle.enable.

UI

  • Navbar Transparency: Adjust site.wallpaper.banner.navbar.transparentMode between semi, full, or semifull.

  • Sidebar Widgets: Reorder or toggle sidebar components like profile, announcement, categories, tags, toc, and statistics in sidebar.components.

Markdown Extensions

GitHub Repository Cards

You can add dynamic cards that link to GitHub repositories, on page load, the repository information is pulled from the GitHub API.

Spr-Aachen
/
Twilight
Waiting for api.github.com...
00K
0K
0K
Waiting...

Create a GitHub repository card with the code ::github{repo="Spr-Aachen/Twilight"}.

::github{repo="Spr-Aachen/Twilight"}

Music Cards

  • Online
Loading...
Loading...
Loading lyrics...
0:00 / 0:00
::music{meting="https://meting.spr-aachen.com/api?server=netease&type=song&id=1390882521"}
  • Local
深海之息
Youzee Music
Loading lyrics...
0:00 / 0:00
::music{title="深海之息" artist="Youzee Music" cover="https://p1.music.126.net/PhKOqFtljgHDDpKYM2ADUA==/109951169858309716.jpg" audio="assets/music/深海之息.m4a" lrc="assets/music/深海之息.lrc"}

Admonitions

Following types of admonitions are supported: note tip important warning caution

Note

Highlights information that users should take into account, even when skimming.

Tip

Optional information to help a user be more successful.

Important

Crucial information necessary for users to succeed.

Warning

Critical content demanding immediate user attention due to potential risks.

Caution

Negative potential consequences of an action.

  • Basic Syntax

    :::note
    Highlights information that users should take into account, even when skimming.
    :::
    :::tip
    Optional information to help a user be more successful.
    :::
  • Custom Titles

    The title of the admonition can be customized.

    MY CUSTOM TITLE

    This is a note with a custom title.

    :::note[MY CUSTOM TITLE]
    This is a note with a custom title.
    :::
  • GitHub Syntax

    Tip

    The GitHub syntax is also supported.

    > [!TIP]
    > The GitHub syntax is also supported.
  • Spoiler

    You can add spoilers to your text. The text also supports Markdown syntax.

    The content is hidden ayyy!

    The content :spoiler[is hidden **ayyy**]!

For more details, check the Documentation.

Guide Twilight - Personnalisation Avancée
/fr-FR/posts/twilight-guide-advanced-customization/
Author
MuxBuffer
Published at
2024-02-10
License
CC BY-NC-SA 4.0
Indice d'implication de l'IA IIIA-0
Catégorie Sans IA
Niveau 0
Description Aucune IA utilisée

This page may not be the latest version.

Profile Image of the Author
MuxBuffer
Muxing life, buffering thoughts.
Catégories
Table of Contents