@jjlmoya/utils-social 1.11.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/package.json +1 -1
  2. package/src/pages/[locale]/[slug].astro +28 -12
  3. package/src/tests/locale_completeness.test.ts +4 -14
  4. package/src/tests/shared-test-helpers.ts +56 -0
  5. package/src/tests/tool_exports.test.ts +34 -0
  6. package/src/tool/redditFormatter/bibliography.astro +2 -10
  7. package/src/tool/redditFormatter/bibliography.ts +12 -0
  8. package/src/tool/redditFormatter/i18n/de.ts +3 -13
  9. package/src/tool/redditFormatter/i18n/en.ts +3 -13
  10. package/src/tool/redditFormatter/i18n/es.ts +3 -13
  11. package/src/tool/redditFormatter/i18n/fr.ts +3 -13
  12. package/src/tool/redditFormatter/i18n/id.ts +3 -13
  13. package/src/tool/redditFormatter/i18n/it.ts +3 -13
  14. package/src/tool/redditFormatter/i18n/ja.ts +3 -13
  15. package/src/tool/redditFormatter/i18n/ko.ts +3 -13
  16. package/src/tool/redditFormatter/i18n/nl.ts +3 -13
  17. package/src/tool/redditFormatter/i18n/pl.ts +3 -13
  18. package/src/tool/redditFormatter/i18n/pt.ts +3 -13
  19. package/src/tool/redditFormatter/i18n/ru.ts +3 -13
  20. package/src/tool/redditFormatter/i18n/sv.ts +3 -13
  21. package/src/tool/redditFormatter/i18n/tr.ts +3 -13
  22. package/src/tool/redditFormatter/i18n/zh.ts +3 -13
  23. package/src/tool/redditFormatter/reddit-text-formatter.css +1 -1
  24. package/src/tool/redditFormatter/seo.astro +2 -1
  25. package/src/tool/safeZones/bibliography.astro +2 -10
  26. package/src/tool/safeZones/bibliography.ts +20 -0
  27. package/src/tool/safeZones/i18n/de.ts +3 -21
  28. package/src/tool/safeZones/i18n/en.ts +3 -21
  29. package/src/tool/safeZones/i18n/es.ts +3 -21
  30. package/src/tool/safeZones/i18n/fr.ts +3 -21
  31. package/src/tool/safeZones/i18n/id.ts +3 -21
  32. package/src/tool/safeZones/i18n/it.ts +3 -21
  33. package/src/tool/safeZones/i18n/ja.ts +3 -21
  34. package/src/tool/safeZones/i18n/ko.ts +3 -21
  35. package/src/tool/safeZones/i18n/nl.ts +3 -21
  36. package/src/tool/safeZones/i18n/pl.ts +3 -21
  37. package/src/tool/safeZones/i18n/pt.ts +3 -21
  38. package/src/tool/safeZones/i18n/ru.ts +3 -21
  39. package/src/tool/safeZones/i18n/sv.ts +3 -21
  40. package/src/tool/safeZones/i18n/tr.ts +3 -21
  41. package/src/tool/safeZones/i18n/zh.ts +3 -21
  42. package/src/tool/safeZones/seo.astro +2 -1
  43. package/src/tool/socialImageResizer/bibliography.astro +2 -10
  44. package/src/tool/socialImageResizer/bibliography.ts +12 -0
  45. package/src/tool/socialImageResizer/i18n/de.ts +3 -13
  46. package/src/tool/socialImageResizer/i18n/en.ts +3 -13
  47. package/src/tool/socialImageResizer/i18n/es.ts +3 -13
  48. package/src/tool/socialImageResizer/i18n/fr.ts +3 -13
  49. package/src/tool/socialImageResizer/i18n/id.ts +3 -13
  50. package/src/tool/socialImageResizer/i18n/it.ts +3 -13
  51. package/src/tool/socialImageResizer/i18n/ja.ts +3 -13
  52. package/src/tool/socialImageResizer/i18n/ko.ts +3 -13
  53. package/src/tool/socialImageResizer/i18n/nl.ts +3 -13
  54. package/src/tool/socialImageResizer/i18n/pl.ts +3 -13
  55. package/src/tool/socialImageResizer/i18n/pt.ts +3 -13
  56. package/src/tool/socialImageResizer/i18n/ru.ts +3 -13
  57. package/src/tool/socialImageResizer/i18n/sv.ts +3 -13
  58. package/src/tool/socialImageResizer/i18n/tr.ts +3 -13
  59. package/src/tool/socialImageResizer/i18n/zh.ts +3 -13
  60. package/src/tool/socialImageResizer/seo.astro +2 -1
  61. package/src/tool/socialImageResizer/social-media-image-resizer.css +1 -1
  62. package/src/tool/socialValueCalculator/bibliography.astro +2 -10
  63. package/src/tool/socialValueCalculator/bibliography.ts +16 -0
  64. package/src/tool/socialValueCalculator/i18n/de.ts +3 -17
  65. package/src/tool/socialValueCalculator/i18n/en.ts +3 -17
  66. package/src/tool/socialValueCalculator/i18n/es.ts +3 -17
  67. package/src/tool/socialValueCalculator/i18n/fr.ts +3 -17
  68. package/src/tool/socialValueCalculator/i18n/id.ts +3 -17
  69. package/src/tool/socialValueCalculator/i18n/it.ts +3 -17
  70. package/src/tool/socialValueCalculator/i18n/ja.ts +3 -17
  71. package/src/tool/socialValueCalculator/i18n/ko.ts +3 -17
  72. package/src/tool/socialValueCalculator/i18n/nl.ts +3 -17
  73. package/src/tool/socialValueCalculator/i18n/pl.ts +3 -17
  74. package/src/tool/socialValueCalculator/i18n/pt.ts +3 -17
  75. package/src/tool/socialValueCalculator/i18n/ru.ts +3 -17
  76. package/src/tool/socialValueCalculator/i18n/sv.ts +3 -17
  77. package/src/tool/socialValueCalculator/i18n/tr.ts +3 -17
  78. package/src/tool/socialValueCalculator/i18n/zh.ts +3 -17
  79. package/src/tool/socialValueCalculator/seo.astro +2 -1
  80. package/src/tool/socialValueCalculator/social-account-value-calculator.css +1 -1
  81. package/src/tool/tinderPhotoOptimizer/bibliography.astro +2 -10
  82. package/src/tool/tinderPhotoOptimizer/bibliography.ts +12 -0
  83. package/src/tool/tinderPhotoOptimizer/i18n/de.ts +3 -13
  84. package/src/tool/tinderPhotoOptimizer/i18n/en.ts +3 -13
  85. package/src/tool/tinderPhotoOptimizer/i18n/es.ts +3 -13
  86. package/src/tool/tinderPhotoOptimizer/i18n/fr.ts +3 -13
  87. package/src/tool/tinderPhotoOptimizer/i18n/id.ts +3 -13
  88. package/src/tool/tinderPhotoOptimizer/i18n/it.ts +3 -13
  89. package/src/tool/tinderPhotoOptimizer/i18n/ja.ts +3 -13
  90. package/src/tool/tinderPhotoOptimizer/i18n/ko.ts +3 -13
  91. package/src/tool/tinderPhotoOptimizer/i18n/nl.ts +3 -13
  92. package/src/tool/tinderPhotoOptimizer/i18n/pl.ts +3 -13
  93. package/src/tool/tinderPhotoOptimizer/i18n/pt.ts +3 -13
  94. package/src/tool/tinderPhotoOptimizer/i18n/ru.ts +3 -13
  95. package/src/tool/tinderPhotoOptimizer/i18n/sv.ts +3 -13
  96. package/src/tool/tinderPhotoOptimizer/i18n/tr.ts +3 -13
  97. package/src/tool/tinderPhotoOptimizer/i18n/zh.ts +3 -13
  98. package/src/tool/tinderPhotoOptimizer/seo.astro +2 -1
  99. package/src/tool/tinderPhotoOptimizer/tinder-photo-optimizer.css +7 -7
  100. package/src/tool/youtubeThumbnail/bibliography.astro +2 -10
  101. package/src/tool/youtubeThumbnail/bibliography.ts +16 -0
  102. package/src/tool/youtubeThumbnail/i18n/de.ts +3 -17
  103. package/src/tool/youtubeThumbnail/i18n/en.ts +3 -17
  104. package/src/tool/youtubeThumbnail/i18n/es.ts +3 -17
  105. package/src/tool/youtubeThumbnail/i18n/fr.ts +3 -17
  106. package/src/tool/youtubeThumbnail/i18n/id.ts +3 -17
  107. package/src/tool/youtubeThumbnail/i18n/it.ts +3 -17
  108. package/src/tool/youtubeThumbnail/i18n/ja.ts +3 -17
  109. package/src/tool/youtubeThumbnail/i18n/ko.ts +3 -17
  110. package/src/tool/youtubeThumbnail/i18n/nl.ts +3 -17
  111. package/src/tool/youtubeThumbnail/i18n/pl.ts +3 -17
  112. package/src/tool/youtubeThumbnail/i18n/pt.ts +3 -17
  113. package/src/tool/youtubeThumbnail/i18n/ru.ts +3 -17
  114. package/src/tool/youtubeThumbnail/i18n/sv.ts +3 -17
  115. package/src/tool/youtubeThumbnail/i18n/tr.ts +3 -17
  116. package/src/tool/youtubeThumbnail/i18n/zh.ts +3 -17
  117. package/src/tool/youtubeThumbnail/seo.astro +2 -1
  118. package/src/tool/youtubeThumbnail/youtube-thumbnail-extractor.css +1 -1
  119. package/src/tool/youtubeThumbnailPreviewer/bibliography.astro +2 -10
  120. package/src/tool/youtubeThumbnailPreviewer/bibliography.ts +16 -0
  121. package/src/tool/youtubeThumbnailPreviewer/i18n/de.ts +3 -17
  122. package/src/tool/youtubeThumbnailPreviewer/i18n/en.ts +3 -17
  123. package/src/tool/youtubeThumbnailPreviewer/i18n/es.ts +3 -17
  124. package/src/tool/youtubeThumbnailPreviewer/i18n/fr.ts +3 -17
  125. package/src/tool/youtubeThumbnailPreviewer/i18n/id.ts +3 -17
  126. package/src/tool/youtubeThumbnailPreviewer/i18n/it.ts +3 -17
  127. package/src/tool/youtubeThumbnailPreviewer/i18n/ja.ts +3 -17
  128. package/src/tool/youtubeThumbnailPreviewer/i18n/ko.ts +3 -17
  129. package/src/tool/youtubeThumbnailPreviewer/i18n/nl.ts +3 -17
  130. package/src/tool/youtubeThumbnailPreviewer/i18n/pl.ts +3 -17
  131. package/src/tool/youtubeThumbnailPreviewer/i18n/pt.ts +3 -17
  132. package/src/tool/youtubeThumbnailPreviewer/i18n/ru.ts +3 -17
  133. package/src/tool/youtubeThumbnailPreviewer/i18n/sv.ts +3 -17
  134. package/src/tool/youtubeThumbnailPreviewer/i18n/tr.ts +3 -17
  135. package/src/tool/youtubeThumbnailPreviewer/i18n/zh.ts +3 -17
  136. package/src/tool/youtubeThumbnailPreviewer/seo.astro +2 -1
  137. package/src/tool/youtubeThumbnailPreviewer/youtube-thumbnail-previewer.css +523 -273
  138. package/src/types.ts +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-social",
3
- "version": "1.11.0",
3
+ "version": "1.14.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -34,18 +34,28 @@ export async function getStaticPaths() {
34
34
  ]),
35
35
  ) as Partial<Record<KnownLocale, string>>;
36
36
 
37
+ const firstLoader = entry.i18n.en ?? Object.values(entry.i18n)[0];
38
+ const englishSlug = firstLoader ? (await firstLoader()).slug : entry.id;
39
+
37
40
  for (const { locale, content } of localeContents) {
38
- const allToolsNav = await Promise.all(
39
- ALL_TOOLS.map(async ({ entry: navEntry }) => ({
40
- id: navEntry.id,
41
- title: (await navEntry.i18n[locale]!()).title,
42
- href: `/${locale}/${(await navEntry.i18n[locale]!()).slug}`,
43
- isActive: navEntry.id === entry.id,
44
- })),
45
- );
41
+ const allToolsNav = (
42
+ await Promise.all(
43
+ ALL_TOOLS.map(async ({ entry: navEntry }) => {
44
+ const loader = navEntry.i18n[locale] ?? navEntry.i18n.en;
45
+ if (!loader) return null;
46
+ const navContent = await loader();
47
+ return {
48
+ id: navEntry.id,
49
+ title: navContent.title,
50
+ href: `/${locale}/${navContent.slug}`,
51
+ isActive: navEntry.id === entry.id,
52
+ };
53
+ }),
54
+ )
55
+ ).filter(Boolean) as NavItem[];
46
56
  paths.push({
47
57
  params: { locale, slug: content.slug },
48
- props: { Component, locale, content, localeUrls, allToolsNav },
58
+ props: { Component, locale, content, localeUrls, allToolsNav, englishSlug },
49
59
  });
50
60
  }
51
61
  }
@@ -66,11 +76,16 @@ interface Props {
66
76
  content: ToolLocaleContent;
67
77
  localeUrls: Partial<Record<KnownLocale, string>>;
68
78
  allToolsNav: NavItem[];
79
+ englishSlug: string;
69
80
  }
70
81
 
71
- const { Component, locale, content, localeUrls, allToolsNav } = Astro.props;
82
+ const { Component, locale, content, localeUrls, allToolsNav, englishSlug } = Astro.props;
83
+
84
+ const cssFiles = import.meta.glob("../../tool/*/*.css", { query: "?raw", import: "default" });
85
+ const cssKey = Object.keys(cssFiles).find((k) => k.endsWith(`/${englishSlug}.css`));
86
+ const toolCss = cssKey ? await cssFiles[cssKey]() as string : "";
72
87
 
73
- const seoContent: UtilitySEOContent = { locale, sections: content.seo };
88
+ const seoContent: UtilitySEOContent = { locale, sections: content.seo ?? [] };
74
89
 
75
90
  const words = content.title.split(" ");
76
91
  const titleHighlight = words[0] || "";
@@ -89,8 +104,9 @@ const titleBase = words.slice(1).join(" ") || "";
89
104
  tools={allToolsNav}
90
105
  />
91
106
  <Fragment slot="head">
107
+ {toolCss ? <Fragment set:html={`<style is:inline>${toolCss}</style>`} /> : null}
92
108
  {
93
- content.schemas.map((schema: unknown) => (
109
+ ( content.schemas ?? []).map((schema: unknown) => (
94
110
  <script
95
111
  is:inline
96
112
  type="application/ld+json"
@@ -7,28 +7,18 @@ describe('Locale Completeness Validation', () => {
7
7
  describe(`Tool: ${tool.entry.id}`, () => {
8
8
  Object.keys(tool.entry.i18n).forEach((locale) => {
9
9
  describe(`Locale: ${locale}`, () => {
10
- it('faqTitle should be defined when faq items exist', async () => {
10
+ it('faq should have items if intended', async () => {
11
11
  const loader = tool.entry.i18n[locale as keyof typeof tool.entry.i18n];
12
12
  const content = (await loader?.()) as ToolLocaleContent;
13
13
 
14
- if (content.faq.length > 0) {
15
- expect(
16
- content.faqTitle,
17
- `Tool "${tool.entry.id}" locale "${locale}" has ${content.faq.length} FAQ items but is missing faqTitle`,
18
- ).toBeTruthy();
19
- }
14
+ expect(Array.isArray(content.faq)).toBe(true);
20
15
  });
21
16
 
22
- it('bibliographyTitle should be defined when bibliography items exist', async () => {
17
+ it('bibliography should have items if intended', async () => {
23
18
  const loader = tool.entry.i18n[locale as keyof typeof tool.entry.i18n];
24
19
  const content = (await loader?.()) as ToolLocaleContent;
25
20
 
26
- if (content.bibliography.length > 0) {
27
- expect(
28
- content.bibliographyTitle,
29
- `Tool "${tool.entry.id}" locale "${locale}" has ${content.bibliography.length} bibliography items but is missing bibliographyTitle`,
30
- ).toBeTruthy();
31
- }
21
+ expect(Array.isArray(content.bibliography)).toBe(true);
32
22
  });
33
23
  });
34
24
  });
@@ -0,0 +1,56 @@
1
+ import type { ToolDefinition } from '../types';
2
+
3
+ export interface ToolExportValidationResult {
4
+ passed: boolean;
5
+ failures: string[];
6
+ }
7
+
8
+ function validateComponentType(
9
+ toolId: string,
10
+ componentName: string,
11
+ component: unknown,
12
+ failures: string[],
13
+ ): void {
14
+ if (typeof component !== 'function') {
15
+ failures.push(`${toolId}: ${componentName} is not a function (${typeof component})`);
16
+ }
17
+ }
18
+
19
+ async function validateComponentExecution(
20
+ toolId: string,
21
+ componentName: string,
22
+ fn: () => Promise<unknown>,
23
+ failures: string[],
24
+ ): Promise<void> {
25
+ try {
26
+ const result = await fn();
27
+ if (!result || typeof result !== 'object') {
28
+ failures.push(`${toolId}: ${componentName} import returned invalid result`);
29
+ }
30
+ } catch (error) {
31
+ failures.push(`${toolId}: ${componentName} execution error - ${error instanceof Error ? error.message : 'unknown'}`);
32
+ }
33
+ }
34
+
35
+ export async function validateToolExports(tools: ToolDefinition[]): Promise<ToolExportValidationResult> {
36
+ const failures: string[] = [];
37
+
38
+ for (const tool of tools) {
39
+ validateComponentType(tool.entry.id, 'Component', tool.Component, failures);
40
+ validateComponentType(tool.entry.id, 'SEOComponent', tool.SEOComponent, failures);
41
+ validateComponentType(tool.entry.id, 'BibliographyComponent', tool.BibliographyComponent, failures);
42
+
43
+ const componentFn = tool.Component as () => Promise<unknown>;
44
+ const seoFn = tool.SEOComponent as () => Promise<unknown>;
45
+ const bibFn = tool.BibliographyComponent as () => Promise<unknown>;
46
+
47
+ await validateComponentExecution(tool.entry.id, 'Component', componentFn, failures);
48
+ await validateComponentExecution(tool.entry.id, 'SEOComponent', seoFn, failures);
49
+ await validateComponentExecution(tool.entry.id, 'BibliographyComponent', bibFn, failures);
50
+ }
51
+
52
+ return {
53
+ passed: failures.length === 0,
54
+ failures,
55
+ };
56
+ }
@@ -0,0 +1,34 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { ALL_TOOLS } from '../tools';
3
+ import { validateToolExports } from './shared-test-helpers';
4
+
5
+ describe('Tool Exports Pattern Validation', () => {
6
+ describe('Component Exports Format', () => {
7
+ ALL_TOOLS.forEach((tool) => {
8
+ it(`${tool.entry.id}: Component should be a lazy-loaded function`, () => {
9
+ expect(typeof tool.Component).toBe('function');
10
+ expect(tool.Component).toBeInstanceOf(Function);
11
+ });
12
+
13
+ it(`${tool.entry.id}: SEOComponent should be a lazy-loaded function`, () => {
14
+ expect(typeof tool.SEOComponent).toBe('function');
15
+ expect(tool.SEOComponent).toBeInstanceOf(Function);
16
+ });
17
+
18
+ it(`${tool.entry.id}: BibliographyComponent should be a lazy-loaded function`, () => {
19
+ expect(typeof tool.BibliographyComponent).toBe('function');
20
+ expect(tool.BibliographyComponent).toBeInstanceOf(Function);
21
+ });
22
+ });
23
+ });
24
+
25
+ describe('Dynamic Import Validation', () => {
26
+ it('all tools must have functional dynamic imports', async () => {
27
+ const result = await validateToolExports(ALL_TOOLS);
28
+ if (!result.passed) {
29
+ throw new Error(`Tool export validation failed:\n${result.failures.join('\n')}`);
30
+ }
31
+ expect(result.passed).toBe(true);
32
+ });
33
+ });
34
+ });
@@ -1,14 +1,6 @@
1
1
  ---
2
2
  import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
- import { redditFormatter } from './index';
4
- import type { KnownLocale } from '../../types';
5
-
6
- interface Props {
7
- locale?: KnownLocale;
8
- }
9
-
10
- const { locale = 'es' } = Astro.props;
11
- const content = await redditFormatter.i18n[locale]?.();
3
+ import { bibliography } from './bibliography';
12
4
  ---
13
5
 
14
- {content && <SharedBibliography links={content.bibliography} />}
6
+ <SharedBibliography links={bibliography} />
@@ -0,0 +1,12 @@
1
+ import type { BibliographyEntry } from '../../types';
2
+
3
+ export const bibliography: BibliographyEntry[] = [
4
+ {
5
+ name: 'Reddit Help: Formatting text in posts and comments',
6
+ url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
7
+ },
8
+ {
9
+ name: 'Reddit Markdown guide',
10
+ url: 'https://www.reddit.com/wiki/markdown/',
11
+ },
12
+ ];
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Häufig gestellte Fragen',
91
- faq: faqData,
92
- bibliographyTitle: 'Referenzen',
93
- bibliography: [
94
- {
95
- name: 'Reddit Hilfe: Text in Beiträgen und Kommentaren formatieren',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Reddit Markdown Leitfaden',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Frequently Asked Questions',
91
- faq: faqData,
92
- bibliographyTitle: 'References',
93
- bibliography: [
94
- {
95
- name: 'Reddit Help: Formatting text in posts and comments',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Reddit Markdown guide',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Preguntas Frecuentes',
91
- faq: faqData,
92
- bibliographyTitle: 'Referencias',
93
- bibliography: [
94
- {
95
- name: 'Reddit Help: Formatting text in posts and comments',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Reddit Markdown guide',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Questions Fréquentes',
91
- faq: faqData,
92
- bibliographyTitle: 'Références',
93
- bibliography: [
94
- {
95
- name: 'Reddit Help: Formatting text in posts and comments',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Reddit Markdown guide',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Pertanyaan yang Sering Diajukan',
91
- faq: faqData,
92
- bibliographyTitle: 'Referensi',
93
- bibliography: [
94
- {
95
- name: 'Bantuan Reddit: Memformat teks dalam postingan dan komentar',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Panduan Markdown Reddit',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Domande Frequenti',
91
- faq: faqData,
92
- bibliographyTitle: 'Riferimenti',
93
- bibliography: [
94
- {
95
- name: 'Aiuto di Reddit: Formattazione del testo nei post e nei commenti',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Guida al Markdown di Reddit',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'よくある質問',
91
- faq: faqData,
92
- bibliographyTitle: '参考文献',
93
- bibliography: [
94
- {
95
- name: 'Redditヘルプ:投稿やコメントでのテキストの書式設定',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Reddit Markdownガイド',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: '자주 묻는 질문',
91
- faq: faqData,
92
- bibliographyTitle: '참고 문헌',
93
- bibliography: [
94
- {
95
- name: 'Reddit 도움말: 게시물 및 댓글의 텍스트 서식 지정',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Reddit 마크다운 가이드',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Veelgestelde Vragen',
91
- faq: faqData,
92
- bibliographyTitle: 'Referenties',
93
- bibliography: [
94
- {
95
- name: 'Reddit Help: Tekst opmaken in berichten en reacties',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Reddit Markdown gids',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Często Zadawane Pytania',
91
- faq: faqData,
92
- bibliographyTitle: 'Referencje',
93
- bibliography: [
94
- {
95
- name: 'Pomoc Reddit: Formatowanie tekstu w postach i komentarzach',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Przewodnik po Markdown na Reddit',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Perguntas Frequentes',
91
- faq: faqData,
92
- bibliographyTitle: 'Referências',
93
- bibliography: [
94
- {
95
- name: 'Ajuda do Reddit: Formatação de texto em posts e comentários',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Guia de Markdown do Reddit',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Часто задаваемые вопросы',
91
- faq: faqData,
92
- bibliographyTitle: 'Источники',
93
- bibliography: [
94
- {
95
- name: 'Справка Reddit: форматирование текста в постах и комментариях',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Руководство по Markdown на Reddit',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Vanliga frågor',
91
- faq: faqData,
92
- bibliographyTitle: 'Referenser',
93
- bibliography: [
94
- {
95
- name: 'Reddit Help: Formatera text i inlägg och kommentarer',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Reddit Markdown-guide',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Sıkça Sorulan Sorular',
91
- faq: faqData,
92
- bibliographyTitle: 'Referanslar',
93
- bibliography: [
94
- {
95
- name: 'Reddit Yardımı: Gönderilerde ve yorumlarda metni biçimlendirme',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Reddit Markdown kılavuzu',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { RedditFormatterUI } from '../ui';
@@ -87,19 +88,8 @@ export const content: ToolLocaleContent<RedditFormatterUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: '常见问题',
91
- faq: faqData,
92
- bibliographyTitle: '参考资料',
93
- bibliography: [
94
- {
95
- name: 'Reddit 帮助:在帖子和评论中格式化文本',
96
- url: 'https://support.reddithelp.com/hc/en-us/articles/360043033952-Formatting-text-in-posts-and-comments',
97
- },
98
- {
99
- name: 'Reddit Markdown 指南',
100
- url: 'https://www.reddit.com/wiki/markdown/',
101
- },
102
- ],
91
+ faq: faqData,
92
+ bibliography,
103
93
  howTo: howToData,
104
94
  schemas: [faqSchema, howToSchema, appSchema],
105
95
  seo: [
@@ -18,7 +18,7 @@
18
18
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
19
19
  }
20
20
 
21
- :global(.theme-dark) .rdf-root {
21
+ .theme-dark .rdf-root {
22
22
  --bg: rgba(15, 23, 42, 0.6);
23
23
  --border: rgba(255, 255, 255, 0.08);
24
24
  --label: #94a3b8;
@@ -11,4 +11,5 @@ const { locale = 'es' } = Astro.props;
11
11
  const content = await redditFormatter.i18n[locale]?.();
12
12
  if (!content) return null;
13
13
  ---
14
- <SEORenderer content={{ locale: locale as string, sections: content.seo }} />
14
+
15
+ {content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}