-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy patharticle-html.ts
More file actions
71 lines (63 loc) · 2.11 KB
/
Copy patharticle-html.ts
File metadata and controls
71 lines (63 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// SPDX-FileCopyrightText: 2024-2026 Hack23 AB
// SPDX-License-Identifier: Apache-2.0
/**
* @module Aggregator/ArticleHtml
* @description Barrel re-export for the article HTML chrome / shell /
* enhancement layer. The previous monolithic module was split
* (Refactor 7/8) into focused sub-modules under `./html/`:
*
* - `./html/shell.ts` — `wrapArticleHtml` + `WrapArticleOptions`
* - `./html/toc.ts` — `buildArticleToc` + helpers
* - `./html/hreflang.ts` — language switcher + alternate links
* - `./html/headline.ts` — title / headline / separator helpers
* - `./html/localize-body.ts` — appendix-section localization
* - `./html/tradecraft-cards.ts` — Tradecraft References card grid
* - `./html/analysis-index-cards.ts` — Analysis Index card grid
*
* Public API is preserved for downstream importers (production code in
* `src/aggregator/article-generator.ts`, `src/index.ts`, tests in
* `test/unit/article-html.test.js` + siblings, and any compiled
* `scripts/aggregator/*.js` consumers).
*/
// Shell + entry point
export {
wrapArticleHtml,
PUBLISHER_NAME,
SITE_NAME,
type WrapArticleOptions,
type ArticleTocEntry,
} from './html/shell.js';
// Hreflang & language switcher
export {
getArticleFilename,
buildArticleHreflangLinks,
buildLanguageSwitcher,
} from './html/hreflang.js';
// TOC
export { buildArticleToc, getLocalizedTocTitle, getTocSectionIcon } from './html/toc.js';
// Headline helpers
export {
truncateHeadline,
getTitleSeparator,
getLocalizedArticleType,
getLocalizedArticleTypePlain,
HEADLINE_LIMIT,
} from './html/headline.js';
// Body localization
export {
localizeArticleBody,
replaceFirstStringIn,
replaceHeadingById,
} from './html/localize-body.js';
// Tradecraft / artifact card grids
export {
enhanceTradecraftCards,
extractTradecraftLinks,
renderTradecraftCard,
getViewMethodologyLabel,
getStemIcon,
STEM_ICONS,
DEFAULT_CARD_ICON,
type ExtractedLink,
} from './html/tradecraft-cards.js';
export { enhanceAnalysisIndexCards } from './html/analysis-index-cards.js';