Configuration globale
DocKit offre des options de configuration globale flexibles pour personnaliser l’apparence, le comportement et les fonctionnalités de votre site de documentation. Ce guide couvre tous les paramètres essentiels que vous pouvez configurer.
Fichiers de configuration
Section titled “Fichiers de configuration”DocKit utilise plusieurs fichiers de configuration situés dans le répertoire src/config/:
src/config/├── config.json # Configuration principale du site├── theme.json # Options de thème et de style├── menu.json # Structure du menu de navigation├── social.json # Liens de réseaux sociaux└── locals.json # Paramètres de localisationConfiguration principale (config.json)
Section titled “Configuration principale (config.json)”Le fichier de configuration principal contrôle les paramètres de base de votre site:
{ "site": { "title": "Documentation DocKit", "description": "Belle documentation rendue facile", "author": "Votre nom", "email": "votre.email@exemple.com", "base_url": "https://votredomaine.com" }, "metadata": { "meta_author": "Équipe DocKit", "meta_image": "/images/og-image.png", "meta_description": "Créez une belle documentation avec DocKit" }}Options de configuration
Section titled “Options de configuration”| Option | Type | Description |
|---|---|---|
site.title | String | Le titre principal de votre site |
site.description | String | Brève description de votre documentation |
site.author | String | Nom d’auteur par défaut |
site.email | String | Adresse e-mail de contact |
site.base_url | String | L’URL de production de votre site |
metadata.meta_image | String | Image Open Graph par défaut |
Configuration du thème (theme.json)
Section titled “Configuration du thème (theme.json)”Personnalisez l’apparence visuelle de votre site:
{ "theme": { "primary_color": "#2563eb", "secondary_color": "#64748b", "accent_color": "#06b6d4", "background_color": "#ffffff", "text_color": "#1e293b" }, "layout": { "sidebar_width": "280px", "content_max_width": "1200px", "enable_breadcrumbs": true, "enable_toc": true }, "features": { "dark_mode": true, "search": true, "print_button": true, "edit_page": true }}Thema opties
Section titled “Thema opties”Kleuren
Section titled “Kleuren”primary_color: Hoofdmerkkleur voor links en knoppensecondary_color: Secundaire elementen en randenaccent_color: Highlights en call-to-action elementenbackground_color: Hoofdachtergrondkleurtext_color: Standaardtekstkleur
Layout
Section titled “Layout”sidebar_width: Breedte van de navigatiezijbalkcontent_max_width: Maximale breedte van het contentgebiedenable_breadcrumbs: Toon/verberg breadcrumb navigatieenable_toc: Toon/verberg inhoudsopgave
Functies
Section titled “Functies”dark_mode: Donkere modus schakelaar inschakelensearch: Site zoekfunctionaliteit inschakelenprint_button: Printknop op pagina’s tonenedit_page: “Bewerk deze pagina” links tonen
Navigatiemenu (menu.json)
Section titled “Navigatiemenu (menu.json)”Definieer de navigatiestructuur van je site:
{ "main": [ { "name": "Aan de slag", "url": "/getting-started/", "children": [ { "name": "Introductie", "url": "/getting-started/introduction/" }, { "name": "Globale instellingen", "url": "/getting-started/global-settings/" } ] }, { "name": "Gidsen", "url": "/guides/" }, { "name": "Referentie", "url": "/reference/" } ]}Sociale links (social.json)
Section titled “Sociale links (social.json)”Configureer sociale media en externe links:
{ "social": [ { "name": "GitHub", "icon": "github", "url": "https://github.com/jouwgebruikersnaam/jouw-repo" }, { "name": "Twitter", "icon": "twitter", "url": "https://twitter.com/jouwgebruikersnaam" }, { "name": "Discord", "icon": "discord", "url": "https://discord.gg/your-server" } ]}Lokalisatie (locals.json)
Section titled “Lokalisatie (locals.json)”Stel meertalige ondersteuning in:
{ "defaultLocale": "ru", "locales": { "ru": { "label": "Русский", "lang": "ru", "dir": "ltr" }, "en": { "label": "English", "lang": "en", "dir": "ltr" } }}Beste praktijken
Section titled “Beste praktijken”Prestaties
Section titled “Prestaties”- Houd configuratiebestanden klein en gefocust
- Gebruik juiste datatypes (strings, booleans, numbers)
- Vermijd diep geneste structuren
Onderhoud
Section titled “Onderhoud”- Documenteer je aangepaste configuraties
- Gebruik versiebeheer voor configuratiewijzigingen
- Test configuratiewijzigingen eerst in ontwikkeling
Beveiliging
Section titled “Beveiliging”- Commit nooit gevoelige data naar configuratiebestanden
- Gebruik omgevingsvariabelen voor geheimen
- Valideer configuratie-inputs
