Skip to content

Commit b9f4309

Browse files
committed
Add French documentation for PurgeCSS guides and plugins
- Created guides for Razzle, React, Vue, WordPress, Gatsby, Grunt, Gulp, PostCSS, and Webpack in French. - Added an introduction page and a safelisting guide in French. - Each guide includes installation instructions, usage examples, and configuration options. - Ensured all pages have appropriate metadata for SEO and social sharing.
1 parent 076c027 commit b9f4309

24 files changed

+3015
-118
lines changed

docs/.vuepress/config.ts

Lines changed: 261 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,247 @@ import { searchPlugin } from "@vuepress/plugin-search";
44
import { viteBundler } from "@vuepress/bundler-vite";
55
import { markdownTabPlugin } from "@vuepress/plugin-markdown-tab";
66

7+
// Sidebar configuration for reuse across locales
8+
const getEnglishSidebar = () => [
9+
{
10+
text: "PurgeCSS",
11+
children: [
12+
{
13+
text: "About PurgeCSS",
14+
link: "/introduction",
15+
},
16+
{
17+
text: "Getting Started",
18+
link: "/getting-started",
19+
},
20+
{
21+
text: "Configuration",
22+
link: "/configuration",
23+
},
24+
{
25+
text: "Command Line Interface",
26+
link: "/CLI",
27+
},
28+
{
29+
text: "Programmatic API",
30+
link: "/api",
31+
},
32+
{
33+
text: "Safelisting",
34+
link: "/safelisting",
35+
},
36+
{
37+
text: "Extractors",
38+
link: "/extractors",
39+
},
40+
],
41+
},
42+
{
43+
text: "Plugins",
44+
children: [
45+
{
46+
text: "PostCSS",
47+
link: "/plugins/postcss",
48+
},
49+
{
50+
text: "Webpack",
51+
link: "/plugins/webpack",
52+
},
53+
{
54+
text: "Gulp",
55+
link: "/plugins/gulp",
56+
},
57+
{
58+
text: "Grunt",
59+
link: "/plugins/grunt",
60+
},
61+
{
62+
text: "Gatsby",
63+
link: "/plugins/gatsby",
64+
},
65+
],
66+
},
67+
{
68+
text: "Guides",
69+
children: [
70+
{
71+
text: "Vue",
72+
link: "/guides/vue",
73+
},
74+
{
75+
text: "React",
76+
link: "/guides/react",
77+
},
78+
{
79+
text: "Next.js",
80+
link: "/guides/next",
81+
},
82+
{
83+
text: "Nuxt.js",
84+
link: "/guides/nuxt",
85+
},
86+
{
87+
text: "Razzle",
88+
link: "/guides/razzle",
89+
},
90+
{
91+
text: "WordPress",
92+
link: "/guides/wordpress",
93+
},
94+
{
95+
text: "Hugo",
96+
link: "/guides/hugo",
97+
},
98+
],
99+
},
100+
{
101+
text: "Comparison",
102+
link: "/comparison",
103+
},
104+
{
105+
text: "Common Questions",
106+
children: [
107+
{
108+
text: "How to use with CSS modules",
109+
link: "/css_modules",
110+
},
111+
{
112+
text: "How to use with Ant Design",
113+
link: "/ant_design",
114+
},
115+
],
116+
},
117+
];
118+
119+
const getFrenchSidebar = () => [
120+
{
121+
text: "PurgeCSS",
122+
children: [
123+
{
124+
text: "À propos de PurgeCSS",
125+
link: "/fr/introduction",
126+
},
127+
{
128+
text: "Démarrage rapide",
129+
link: "/fr/getting-started",
130+
},
131+
{
132+
text: "Configuration",
133+
link: "/fr/configuration",
134+
},
135+
{
136+
text: "Interface en ligne de commande",
137+
link: "/fr/CLI",
138+
},
139+
{
140+
text: "API programmatique",
141+
link: "/fr/api",
142+
},
143+
{
144+
text: "Liste blanche",
145+
link: "/fr/safelisting",
146+
},
147+
{
148+
text: "Extracteurs",
149+
link: "/fr/extractors",
150+
},
151+
],
152+
},
153+
{
154+
text: "Plugins",
155+
children: [
156+
{
157+
text: "PostCSS",
158+
link: "/fr/plugins/postcss",
159+
},
160+
{
161+
text: "Webpack",
162+
link: "/fr/plugins/webpack",
163+
},
164+
{
165+
text: "Gulp",
166+
link: "/fr/plugins/gulp",
167+
},
168+
{
169+
text: "Grunt",
170+
link: "/fr/plugins/grunt",
171+
},
172+
{
173+
text: "Gatsby",
174+
link: "/fr/plugins/gatsby",
175+
},
176+
],
177+
},
178+
{
179+
text: "Guides",
180+
children: [
181+
{
182+
text: "Vue",
183+
link: "/fr/guides/vue",
184+
},
185+
{
186+
text: "React",
187+
link: "/fr/guides/react",
188+
},
189+
{
190+
text: "Next.js",
191+
link: "/fr/guides/next",
192+
},
193+
{
194+
text: "Nuxt.js",
195+
link: "/fr/guides/nuxt",
196+
},
197+
{
198+
text: "Razzle",
199+
link: "/fr/guides/razzle",
200+
},
201+
{
202+
text: "WordPress",
203+
link: "/fr/guides/wordpress",
204+
},
205+
{
206+
text: "Hugo",
207+
link: "/fr/guides/hugo",
208+
},
209+
],
210+
},
211+
{
212+
text: "Comparaison",
213+
link: "/fr/comparison",
214+
},
215+
{
216+
text: "Questions fréquentes",
217+
children: [
218+
{
219+
text: "Utilisation avec les modules CSS",
220+
link: "/fr/css_modules",
221+
},
222+
{
223+
text: "Utilisation avec Ant Design",
224+
link: "/fr/ant_design",
225+
},
226+
],
227+
},
228+
];
229+
7230
export default defineUserConfig({
8231
bundler: viteBundler({
9232
viteOptions: {},
10233
vuePluginOptions: {},
11234
}),
12-
lang: "en-US",
13-
title: "PurgeCSS",
14-
description: "PurgeCSS is a tool to remove unused CSS from your project",
235+
locales: {
236+
"/": {
237+
lang: "en-US",
238+
title: "PurgeCSS",
239+
description: "PurgeCSS is a tool to remove unused CSS from your project",
240+
},
241+
"/fr/": {
242+
lang: "fr-FR",
243+
title: "PurgeCSS",
244+
description:
245+
"PurgeCSS est un outil pour supprimer le CSS inutilisé de votre projet",
246+
},
247+
},
15248
head: [
16249
[
17250
"link",
@@ -90,123 +323,33 @@ export default defineUserConfig({
90323
theme: localTheme({
91324
logo: "https://i.imgur.com/UEiUiJ0.png",
92325
repo: "FullHuman/purgecss",
93-
navbar: [
94-
{
95-
text: "API Reference",
96-
link: "/api-reference/",
97-
},
98-
],
99-
sidebar: {
100-
"/": [
101-
{
102-
text: "PurgeCSS",
103-
children: [
104-
{
105-
text: "About PurgeCSS",
106-
link: "/introduction",
107-
},
108-
{
109-
text: "Getting Started",
110-
link: "/getting-started",
111-
},
112-
{
113-
text: "Configuration",
114-
link: "/configuration",
115-
},
116-
{
117-
text: "Command Line Interface",
118-
link: "/CLI",
119-
},
120-
{
121-
text: "Programmatic API",
122-
link: "/api",
123-
},
124-
{
125-
text: "Safelisting",
126-
link: "/safelisting",
127-
},
128-
{
129-
text: "Extractors",
130-
link: "/extractors",
131-
},
132-
],
133-
},
134-
{
135-
text: "Plugins",
136-
children: [
137-
{
138-
text: "PostCSS",
139-
link: "/plugins/postcss",
140-
},
141-
{
142-
text: "Webpack",
143-
link: "/plugins/webpack",
144-
},
145-
{
146-
text: "Gulp",
147-
link: "/plugins/gulp",
148-
},
149-
{
150-
text: "Grunt",
151-
link: "/plugins/grunt",
152-
},
153-
{
154-
text: "Gatsby",
155-
link: "/plugins/gatsby",
156-
},
157-
],
158-
},
159-
{
160-
text: "Guides",
161-
children: [
162-
{
163-
text: "Vue",
164-
link: "/guides/vue",
165-
},
166-
{
167-
text: "React",
168-
link: "/guides/react",
169-
},
170-
{
171-
text: "Next.js",
172-
link: "/guides/next",
173-
},
174-
{
175-
text: "Nuxt.js",
176-
link: "/guides/nuxt",
177-
},
178-
{
179-
text: "Razzle",
180-
link: "/guides/razzle",
181-
},
182-
{
183-
text: "WordPress",
184-
link: "/guides/wordpress",
185-
},
186-
{
187-
text: "Hugo",
188-
link: "/guides/hugo",
189-
},
190-
],
326+
locales: {
327+
"/": {
328+
selectLanguageName: "English",
329+
selectLanguageText: "Languages",
330+
navbar: [
331+
{
332+
text: "API Reference",
333+
link: "/api-reference/",
334+
},
335+
],
336+
sidebar: {
337+
"/": getEnglishSidebar(),
191338
},
192-
{
193-
text: "Comparison",
194-
link: "/comparison",
195-
},
196-
{
197-
text: "Common Questions",
198-
children: [
199-
{
200-
text: "How to use with CSS modules",
201-
link: "/css_modules",
202-
},
203-
{
204-
text: "How to use with Ant Design",
205-
link: "/ant_design",
206-
},
207-
],
339+
},
340+
"/fr/": {
341+
selectLanguageName: "Français",
342+
selectLanguageText: "Langues",
343+
navbar: [
344+
{
345+
text: "Référence API",
346+
link: "/api-reference/",
347+
},
348+
],
349+
sidebar: {
350+
"/fr/": getFrenchSidebar(),
208351
},
209-
],
352+
},
210353
},
211354
}),
212355
plugins: [

0 commit comments

Comments
 (0)