core-maugli 1.0.2

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 (206) hide show
  1. package/LICENSE +727 -0
  2. package/README.md +108 -0
  3. package/bin/index.js +9 -0
  4. package/bin/init.js +38 -0
  5. package/package.json +73 -0
  6. package/public/blackbox.webp +0 -0
  7. package/public/favicon.svg +10 -0
  8. package/public/footerlabel.svg +18 -0
  9. package/public/icon-192.png +0 -0
  10. package/public/icon-512.png +0 -0
  11. package/public/img/page-images/blog_default.webp +0 -0
  12. package/public/logo-icon.svg +3 -0
  13. package/public/logoblog-icon.svg +10 -0
  14. package/public/manifest.webmanifest +21 -0
  15. package/public/maugli_for_animation.svg +6 -0
  16. package/public/mauglilabel.svg +17 -0
  17. package/public/tr-about-1200.webp +0 -0
  18. package/public/tr-about-400.webp +0 -0
  19. package/public/tr-about-800.webp +0 -0
  20. package/public/tr-about.webp +0 -0
  21. package/public/tr-post-1-1200.webp +0 -0
  22. package/public/tr-post-1-400.webp +0 -0
  23. package/public/tr-post-1-800.webp +0 -0
  24. package/public/tr-post0-1200.webp +0 -0
  25. package/public/tr-post0-400.webp +0 -0
  26. package/public/tr-post0-800.webp +0 -0
  27. package/public/tr-post0.webp +0 -0
  28. package/public/tr-prewiew.webp +0 -0
  29. package/resize-all.cjs +29 -0
  30. package/scripts/featured.js +208 -0
  31. package/scripts/update-with-backup.js +34 -0
  32. package/scripts/upgrade-config.js +90 -0
  33. package/scripts/verify-assets.js +28 -0
  34. package/src/assets/img/default/autor_default.webp +0 -0
  35. package/src/assets/img/default/blog_default.webp +0 -0
  36. package/src/assets/img/default/product_default.webp +0 -0
  37. package/src/assets/img/default/project_default.webp +0 -0
  38. package/src/assets/img/default/rubric_default.webp +0 -0
  39. package/src/assets/img/examples/authors/anna.webp +0 -0
  40. package/src/assets/img/examples/authors/carlos.webp +0 -0
  41. package/src/assets/img/examples/authors/daria.webp +0 -0
  42. package/src/assets/img/examples/authors/dmitry.webp +0 -0
  43. package/src/assets/img/examples/authors/igor.webp +0 -0
  44. package/src/assets/img/examples/authors/john.webp +0 -0
  45. package/src/assets/img/examples/blog/post-1-avtomatizaciya-marketinga-kak-ii-osvobozhdaet-predprinimatelei-ot-cifrovogo-rabstva.webp +0 -0
  46. package/src/assets/img/examples/blog/post_11.webp +0 -0
  47. package/src/assets/img/examples/blog/post_12.webp +0 -0
  48. package/src/assets/img/examples/blog/post_1_jsonld_guide.webp +0 -0
  49. package/src/assets/img/examples/blog/test-post.webp +0 -0
  50. package/src/assets/img/examples/blog/tr-post-1.webp +0 -0
  51. package/src/assets/img/examples/products/product_1.webp +0 -0
  52. package/src/assets/img/examples/products/product_2.webp +0 -0
  53. package/src/assets/img/examples/projects/project_1.webp +0 -0
  54. package/src/assets/img/examples/projects/project_2.webp +0 -0
  55. package/src/components/ArticleMeta.astro +103 -0
  56. package/src/components/AuthorCard.astro +95 -0
  57. package/src/components/AuthorLink.astro +25 -0
  58. package/src/components/AuthorLinksGroup.astro +135 -0
  59. package/src/components/Avatar.astro +32 -0
  60. package/src/components/BaseHead.astro +121 -0
  61. package/src/components/Breadcrumbs.astro +90 -0
  62. package/src/components/Button.astro +25 -0
  63. package/src/components/Card.astro +99 -0
  64. package/src/components/ContentFooter.astro +147 -0
  65. package/src/components/CopyLinkButton.astro +133 -0
  66. package/src/components/CountBadge.astro +17 -0
  67. package/src/components/Footer.astro +122 -0
  68. package/src/components/FormattedDate.astro +59 -0
  69. package/src/components/Header.astro +18 -0
  70. package/src/components/HeroImage.astro +38 -0
  71. package/src/components/IconButton.astro +23 -0
  72. package/src/components/Image.astro +13 -0
  73. package/src/components/InfoCard.astro +123 -0
  74. package/src/components/LanguageSwitcher.astro +122 -0
  75. package/src/components/MaugliFloatingLabel.astro +454 -0
  76. package/src/components/MobileTagsAndShare.astro +71 -0
  77. package/src/components/Nav.astro +151 -0
  78. package/src/components/NavLink.astro +31 -0
  79. package/src/components/Pagination.astro +70 -0
  80. package/src/components/PostPreview.astro +22 -0
  81. package/src/components/ProductBannerCard.astro +47 -0
  82. package/src/components/ProductPreview.astro +21 -0
  83. package/src/components/ProjectPreview.astro +21 -0
  84. package/src/components/RubricCard.astro +142 -0
  85. package/src/components/ShareIcon.astro +93 -0
  86. package/src/components/ShareLink.astro +58 -0
  87. package/src/components/Subscribe.astro +68 -0
  88. package/src/components/SummaryFAQCard.astro +106 -0
  89. package/src/components/TableOfContents.astro +143 -0
  90. package/src/components/TagPill.astro +41 -0
  91. package/src/components/TagPills.astro +42 -0
  92. package/src/components/TagsAndShare.astro +379 -0
  93. package/src/components/TagsSection.astro +203 -0
  94. package/src/components/ThemeToggle.astro +58 -0
  95. package/src/config/maugli.config.ts +213 -0
  96. package/src/content/authors/daria-zorina.md +42 -0
  97. package/src/content/authors/default-autor.md +47 -0
  98. package/src/content/authors/igor-sokolov.md +43 -0
  99. package/src/content/authors/john-walker.md +46 -0
  100. package/src/content/blog/jsonld-guide.md +260 -0
  101. package/src/content/blog/post-0.md +49 -0
  102. package/src/content/blog/post-1-avtomatizaciya-marketinga-kak-ii-osvobozhdaet-predprinimatelei-ot-cifrovogo-rabstva.md +72 -0
  103. package/src/content/blog/post-agent-experience-mcp-biznes-v-epohu-ii-agentov.md +116 -0
  104. package/src/content/blog/test-post-2025-07-11.md +73 -0
  105. package/src/content/config.ts +80 -0
  106. package/src/content/pages/about.md +40 -0
  107. package/src/content/pages/about.mdx +27 -0
  108. package/src/content/pages/authors.mdx +49 -0
  109. package/src/content/pages/blog.mdx +31 -0
  110. package/src/content/pages/contact.md +10 -0
  111. package/src/content/pages/products.mdx +30 -0
  112. package/src/content/pages/projects.mdx +28 -0
  113. package/src/content/pages/rubrics.mdx +35 -0
  114. package/src/content/pages/terms.md +12 -0
  115. package/src/content/products/example-product.md +28 -0
  116. package/src/content/products/maugli-editor.md +35 -0
  117. package/src/content/products/maugli-freeblog.md +162 -0
  118. package/src/content/projects/example-project.md +28 -0
  119. package/src/content/projects/project-1.md +70 -0
  120. package/src/content/projects/project-2.md +33 -0
  121. package/src/content/tags/ai-business.mdx +18 -0
  122. package/src/content/tags/automation.mdx +18 -0
  123. package/src/content/tags/content-strategy.mdx +18 -0
  124. package/src/content/tags/growth-marketing.mdx +18 -0
  125. package/src/content/tags/industry-reviews.mdx +18 -0
  126. package/src/content/tags/interesting.mdx +18 -0
  127. package/src/content/tags/seo-ai-seo.mdx +18 -0
  128. package/src/content.config.ts +260 -0
  129. package/src/data/site-config.ts +164 -0
  130. package/src/i18n/de.json +126 -0
  131. package/src/i18n/en.json +126 -0
  132. package/src/i18n/es.json +126 -0
  133. package/src/i18n/fr.json +126 -0
  134. package/src/i18n/index.ts +10 -0
  135. package/src/i18n/ja.json +126 -0
  136. package/src/i18n/languages.ts +23 -0
  137. package/src/i18n/pt.json +126 -0
  138. package/src/i18n/ru.json +123 -0
  139. package/src/i18n/zh.json +126 -0
  140. package/src/icons/ArrowLeft.astro +13 -0
  141. package/src/icons/ArrowRight.astro +13 -0
  142. package/src/icons/flags/brazil.svg +14 -0
  143. package/src/icons/flags/china.svg +15 -0
  144. package/src/icons/flags/france.svg +12 -0
  145. package/src/icons/flags/germany.svg +12 -0
  146. package/src/icons/flags/japan.svg +11 -0
  147. package/src/icons/flags/russia.svg +12 -0
  148. package/src/icons/flags/spain.svg +12 -0
  149. package/src/icons/flags/united arab emirates.svg +13 -0
  150. package/src/icons/flags/united states.svg +15 -0
  151. package/src/icons/socials/BlueskyIcon.astro +9 -0
  152. package/src/icons/socials/EmailIcon.astro +8 -0
  153. package/src/icons/socials/LinkedinIcon.astro +9 -0
  154. package/src/icons/socials/MastodonIcon.astro +9 -0
  155. package/src/icons/socials/MediumIcon.astro +9 -0
  156. package/src/icons/socials/RedditIcon.astro +11 -0
  157. package/src/icons/socials/TelegramIcon.astro +11 -0
  158. package/src/icons/socials/TwitterIcon.astro +9 -0
  159. package/src/img/default/autor_default.webp +0 -0
  160. package/src/img/default/default.webp +0 -0
  161. package/src/img/default/rubric_default.webp +0 -0
  162. package/src/img/default/test.webp +0 -0
  163. package/src/img/default/test2.webp +0 -0
  164. package/src/img/examples/authors/anna.webp +0 -0
  165. package/src/img/examples/authors/carlos.webp +0 -0
  166. package/src/img/examples/authors/daria.webp +0 -0
  167. package/src/img/examples/authors/dmitry.webp +0 -0
  168. package/src/img/examples/authors/igor.webp +0 -0
  169. package/src/img/examples/authors/john.webp +0 -0
  170. package/src/img/examples/blog/post-1-avtomatizaciya-marketinga-kak-ii-osvobozhdaet-predprinimatelei-ot-cifrovogo-rabstva.webp +0 -0
  171. package/src/img/examples/blog/post-2-avtomatizaciya-kontenta-kak-neiroseti-ubivayut-perfekcionizm-v-biznese.webp +0 -0
  172. package/src/img/examples/blog/post-3-laik-ne-valyuta-kak-avtomatizaciya-marketinga-spasaet-ot-lozhnyh-metrik.webp +0 -0
  173. package/src/img/examples/blog/post-5-5-fatalnyh-oshibok-marketinga-kotorye-ubivayut-startapy-na-starte.webp +0 -0
  174. package/src/img/examples/blog/post-6-5-strategii-kontent-marketinga-dlya-startapov-avtomatizaciya-i-revolyuciya.webp +0 -0
  175. package/src/img/examples/blog/post-7-viralnyi-kontent-ne-udacha-a-strategiya-avtomatizaciya-marketinga.webp +0 -0
  176. package/src/img/examples/blog/post-agent-experience-mcp-biznes-v-epohu-ii-agentov.webp +0 -0
  177. package/src/img/examples/blog/post_1_jsonld_guide.webp +0 -0
  178. package/src/img/examples/blog/tr-post-1.webp +0 -0
  179. package/src/layouts/BaseLayout.astro +59 -0
  180. package/src/pages/404.astro +24 -0
  181. package/src/pages/[...id].astro +50 -0
  182. package/src/pages/about.astro +0 -0
  183. package/src/pages/authors/[...page].astro +105 -0
  184. package/src/pages/authors/[id].astro +165 -0
  185. package/src/pages/blog/[...page].astro +59 -0
  186. package/src/pages/blog/[id].astro +175 -0
  187. package/src/pages/index.astro +90 -0
  188. package/src/pages/products/[...page].astro +50 -0
  189. package/src/pages/products/[id].astro +221 -0
  190. package/src/pages/projects/[...page].astro +74 -0
  191. package/src/pages/projects/[id].astro +165 -0
  192. package/src/pages/projects/tags/[id]/[...page].astro +58 -0
  193. package/src/pages/rss.xml.js +5 -0
  194. package/src/pages/tags/[id]/[...page].astro +110 -0
  195. package/src/pages/tags/index.astro +124 -0
  196. package/src/scripts/infoCardFadeIn.js +22 -0
  197. package/src/styles/global.css +272 -0
  198. package/src/utils/common-utils.ts +0 -0
  199. package/src/utils/content-loader.ts +14 -0
  200. package/src/utils/data-utils.ts +49 -0
  201. package/src/utils/featuredManager.ts +118 -0
  202. package/src/utils/posts.ts +43 -0
  203. package/src/utils/reading-time.ts +28 -0
  204. package/src/utils/remark-slugify.js +8 -0
  205. package/src/utils/rss.ts +23 -0
  206. package/typograf-batch.js +49 -0
@@ -0,0 +1,23 @@
1
+ import rss from '@astrojs/rss';
2
+ import { getFilteredCollection } from './content-loader';
3
+ import siteConfig from '../data/site-config';
4
+ import { sortItemsByDateDesc } from './data-utils';
5
+
6
+ /**
7
+ * Generate RSS feed for blog posts.
8
+ * This helper can be used in API routes or build scripts.
9
+ */
10
+ export async function generateBlogRss(context: { site: string }) {
11
+ const posts = (await getFilteredCollection('blog')).sort(sortItemsByDateDesc);
12
+ return rss({
13
+ title: siteConfig.title,
14
+ description: siteConfig.description,
15
+ site: context.site,
16
+ items: posts.map((item) => ({
17
+ title: item.data.title,
18
+ description: item.data.excerpt,
19
+ link: `/blog/${item.id}/`,
20
+ pubDate: item.data.publishDate.setUTCHours(0)
21
+ }))
22
+ });
23
+ }
@@ -0,0 +1,49 @@
1
+ import Typograf from 'typograf';
2
+ import { readFileSync, writeFileSync, readdirSync, statSync, existsSync } from 'fs';
3
+ import yaml from 'js-yaml';
4
+
5
+ const tp = new Typograf({ locale: ['ru', 'en-US'] });
6
+ const dir = './src/content/blog';
7
+ const cacheFile = './.typograf-cache.json';
8
+
9
+ let cache = {};
10
+ if (existsSync(cacheFile)) {
11
+ cache = JSON.parse(readFileSync(cacheFile, 'utf8'));
12
+ }
13
+
14
+ let cacheUpdated = false;
15
+
16
+ readdirSync(dir)
17
+ .filter(f => f.endsWith('.md'))
18
+ .forEach(f => {
19
+ const file = dir + '/' + f;
20
+ const stats = statSync(file);
21
+ const mtime = stats.mtimeMs;
22
+
23
+ // Если не изменялся — скипаем
24
+ if (cache[f] === mtime) return;
25
+
26
+ const data = readFileSync(file, 'utf8');
27
+ const parts = data.split('---');
28
+ if (parts.length < 3) return;
29
+ let fm = yaml.load(parts[1]);
30
+ if (fm.title) fm.title = tp.execute(fm.title);
31
+ if (fm.description) fm.description = tp.execute(fm.description);
32
+
33
+ const newData = [
34
+ '---',
35
+ yaml.dump(fm).trim(),
36
+ '---',
37
+ tp.execute(parts.slice(2).join('---'))
38
+ ].join('\n');
39
+
40
+ writeFileSync(file, newData);
41
+ cache[f] = mtime;
42
+ cacheUpdated = true;
43
+ console.log(`Typografed: ${file}`);
44
+ });
45
+
46
+ // Сохраняем кеш только если были изменения
47
+ if (cacheUpdated) {
48
+ writeFileSync(cacheFile, JSON.stringify(cache, null, 2));
49
+ }