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.
- package/LICENSE +727 -0
- package/README.md +108 -0
- package/bin/index.js +9 -0
- package/bin/init.js +38 -0
- package/package.json +73 -0
- package/public/blackbox.webp +0 -0
- package/public/favicon.svg +10 -0
- package/public/footerlabel.svg +18 -0
- package/public/icon-192.png +0 -0
- package/public/icon-512.png +0 -0
- package/public/img/page-images/blog_default.webp +0 -0
- package/public/logo-icon.svg +3 -0
- package/public/logoblog-icon.svg +10 -0
- package/public/manifest.webmanifest +21 -0
- package/public/maugli_for_animation.svg +6 -0
- package/public/mauglilabel.svg +17 -0
- package/public/tr-about-1200.webp +0 -0
- package/public/tr-about-400.webp +0 -0
- package/public/tr-about-800.webp +0 -0
- package/public/tr-about.webp +0 -0
- package/public/tr-post-1-1200.webp +0 -0
- package/public/tr-post-1-400.webp +0 -0
- package/public/tr-post-1-800.webp +0 -0
- package/public/tr-post0-1200.webp +0 -0
- package/public/tr-post0-400.webp +0 -0
- package/public/tr-post0-800.webp +0 -0
- package/public/tr-post0.webp +0 -0
- package/public/tr-prewiew.webp +0 -0
- package/resize-all.cjs +29 -0
- package/scripts/featured.js +208 -0
- package/scripts/update-with-backup.js +34 -0
- package/scripts/upgrade-config.js +90 -0
- package/scripts/verify-assets.js +28 -0
- package/src/assets/img/default/autor_default.webp +0 -0
- package/src/assets/img/default/blog_default.webp +0 -0
- package/src/assets/img/default/product_default.webp +0 -0
- package/src/assets/img/default/project_default.webp +0 -0
- package/src/assets/img/default/rubric_default.webp +0 -0
- package/src/assets/img/examples/authors/anna.webp +0 -0
- package/src/assets/img/examples/authors/carlos.webp +0 -0
- package/src/assets/img/examples/authors/daria.webp +0 -0
- package/src/assets/img/examples/authors/dmitry.webp +0 -0
- package/src/assets/img/examples/authors/igor.webp +0 -0
- package/src/assets/img/examples/authors/john.webp +0 -0
- package/src/assets/img/examples/blog/post-1-avtomatizaciya-marketinga-kak-ii-osvobozhdaet-predprinimatelei-ot-cifrovogo-rabstva.webp +0 -0
- package/src/assets/img/examples/blog/post_11.webp +0 -0
- package/src/assets/img/examples/blog/post_12.webp +0 -0
- package/src/assets/img/examples/blog/post_1_jsonld_guide.webp +0 -0
- package/src/assets/img/examples/blog/test-post.webp +0 -0
- package/src/assets/img/examples/blog/tr-post-1.webp +0 -0
- package/src/assets/img/examples/products/product_1.webp +0 -0
- package/src/assets/img/examples/products/product_2.webp +0 -0
- package/src/assets/img/examples/projects/project_1.webp +0 -0
- package/src/assets/img/examples/projects/project_2.webp +0 -0
- package/src/components/ArticleMeta.astro +103 -0
- package/src/components/AuthorCard.astro +95 -0
- package/src/components/AuthorLink.astro +25 -0
- package/src/components/AuthorLinksGroup.astro +135 -0
- package/src/components/Avatar.astro +32 -0
- package/src/components/BaseHead.astro +121 -0
- package/src/components/Breadcrumbs.astro +90 -0
- package/src/components/Button.astro +25 -0
- package/src/components/Card.astro +99 -0
- package/src/components/ContentFooter.astro +147 -0
- package/src/components/CopyLinkButton.astro +133 -0
- package/src/components/CountBadge.astro +17 -0
- package/src/components/Footer.astro +122 -0
- package/src/components/FormattedDate.astro +59 -0
- package/src/components/Header.astro +18 -0
- package/src/components/HeroImage.astro +38 -0
- package/src/components/IconButton.astro +23 -0
- package/src/components/Image.astro +13 -0
- package/src/components/InfoCard.astro +123 -0
- package/src/components/LanguageSwitcher.astro +122 -0
- package/src/components/MaugliFloatingLabel.astro +454 -0
- package/src/components/MobileTagsAndShare.astro +71 -0
- package/src/components/Nav.astro +151 -0
- package/src/components/NavLink.astro +31 -0
- package/src/components/Pagination.astro +70 -0
- package/src/components/PostPreview.astro +22 -0
- package/src/components/ProductBannerCard.astro +47 -0
- package/src/components/ProductPreview.astro +21 -0
- package/src/components/ProjectPreview.astro +21 -0
- package/src/components/RubricCard.astro +142 -0
- package/src/components/ShareIcon.astro +93 -0
- package/src/components/ShareLink.astro +58 -0
- package/src/components/Subscribe.astro +68 -0
- package/src/components/SummaryFAQCard.astro +106 -0
- package/src/components/TableOfContents.astro +143 -0
- package/src/components/TagPill.astro +41 -0
- package/src/components/TagPills.astro +42 -0
- package/src/components/TagsAndShare.astro +379 -0
- package/src/components/TagsSection.astro +203 -0
- package/src/components/ThemeToggle.astro +58 -0
- package/src/config/maugli.config.ts +213 -0
- package/src/content/authors/daria-zorina.md +42 -0
- package/src/content/authors/default-autor.md +47 -0
- package/src/content/authors/igor-sokolov.md +43 -0
- package/src/content/authors/john-walker.md +46 -0
- package/src/content/blog/jsonld-guide.md +260 -0
- package/src/content/blog/post-0.md +49 -0
- package/src/content/blog/post-1-avtomatizaciya-marketinga-kak-ii-osvobozhdaet-predprinimatelei-ot-cifrovogo-rabstva.md +72 -0
- package/src/content/blog/post-agent-experience-mcp-biznes-v-epohu-ii-agentov.md +116 -0
- package/src/content/blog/test-post-2025-07-11.md +73 -0
- package/src/content/config.ts +80 -0
- package/src/content/pages/about.md +40 -0
- package/src/content/pages/about.mdx +27 -0
- package/src/content/pages/authors.mdx +49 -0
- package/src/content/pages/blog.mdx +31 -0
- package/src/content/pages/contact.md +10 -0
- package/src/content/pages/products.mdx +30 -0
- package/src/content/pages/projects.mdx +28 -0
- package/src/content/pages/rubrics.mdx +35 -0
- package/src/content/pages/terms.md +12 -0
- package/src/content/products/example-product.md +28 -0
- package/src/content/products/maugli-editor.md +35 -0
- package/src/content/products/maugli-freeblog.md +162 -0
- package/src/content/projects/example-project.md +28 -0
- package/src/content/projects/project-1.md +70 -0
- package/src/content/projects/project-2.md +33 -0
- package/src/content/tags/ai-business.mdx +18 -0
- package/src/content/tags/automation.mdx +18 -0
- package/src/content/tags/content-strategy.mdx +18 -0
- package/src/content/tags/growth-marketing.mdx +18 -0
- package/src/content/tags/industry-reviews.mdx +18 -0
- package/src/content/tags/interesting.mdx +18 -0
- package/src/content/tags/seo-ai-seo.mdx +18 -0
- package/src/content.config.ts +260 -0
- package/src/data/site-config.ts +164 -0
- package/src/i18n/de.json +126 -0
- package/src/i18n/en.json +126 -0
- package/src/i18n/es.json +126 -0
- package/src/i18n/fr.json +126 -0
- package/src/i18n/index.ts +10 -0
- package/src/i18n/ja.json +126 -0
- package/src/i18n/languages.ts +23 -0
- package/src/i18n/pt.json +126 -0
- package/src/i18n/ru.json +123 -0
- package/src/i18n/zh.json +126 -0
- package/src/icons/ArrowLeft.astro +13 -0
- package/src/icons/ArrowRight.astro +13 -0
- package/src/icons/flags/brazil.svg +14 -0
- package/src/icons/flags/china.svg +15 -0
- package/src/icons/flags/france.svg +12 -0
- package/src/icons/flags/germany.svg +12 -0
- package/src/icons/flags/japan.svg +11 -0
- package/src/icons/flags/russia.svg +12 -0
- package/src/icons/flags/spain.svg +12 -0
- package/src/icons/flags/united arab emirates.svg +13 -0
- package/src/icons/flags/united states.svg +15 -0
- package/src/icons/socials/BlueskyIcon.astro +9 -0
- package/src/icons/socials/EmailIcon.astro +8 -0
- package/src/icons/socials/LinkedinIcon.astro +9 -0
- package/src/icons/socials/MastodonIcon.astro +9 -0
- package/src/icons/socials/MediumIcon.astro +9 -0
- package/src/icons/socials/RedditIcon.astro +11 -0
- package/src/icons/socials/TelegramIcon.astro +11 -0
- package/src/icons/socials/TwitterIcon.astro +9 -0
- package/src/img/default/autor_default.webp +0 -0
- package/src/img/default/default.webp +0 -0
- package/src/img/default/rubric_default.webp +0 -0
- package/src/img/default/test.webp +0 -0
- package/src/img/default/test2.webp +0 -0
- package/src/img/examples/authors/anna.webp +0 -0
- package/src/img/examples/authors/carlos.webp +0 -0
- package/src/img/examples/authors/daria.webp +0 -0
- package/src/img/examples/authors/dmitry.webp +0 -0
- package/src/img/examples/authors/igor.webp +0 -0
- package/src/img/examples/authors/john.webp +0 -0
- package/src/img/examples/blog/post-1-avtomatizaciya-marketinga-kak-ii-osvobozhdaet-predprinimatelei-ot-cifrovogo-rabstva.webp +0 -0
- package/src/img/examples/blog/post-2-avtomatizaciya-kontenta-kak-neiroseti-ubivayut-perfekcionizm-v-biznese.webp +0 -0
- package/src/img/examples/blog/post-3-laik-ne-valyuta-kak-avtomatizaciya-marketinga-spasaet-ot-lozhnyh-metrik.webp +0 -0
- package/src/img/examples/blog/post-5-5-fatalnyh-oshibok-marketinga-kotorye-ubivayut-startapy-na-starte.webp +0 -0
- package/src/img/examples/blog/post-6-5-strategii-kontent-marketinga-dlya-startapov-avtomatizaciya-i-revolyuciya.webp +0 -0
- package/src/img/examples/blog/post-7-viralnyi-kontent-ne-udacha-a-strategiya-avtomatizaciya-marketinga.webp +0 -0
- package/src/img/examples/blog/post-agent-experience-mcp-biznes-v-epohu-ii-agentov.webp +0 -0
- package/src/img/examples/blog/post_1_jsonld_guide.webp +0 -0
- package/src/img/examples/blog/tr-post-1.webp +0 -0
- package/src/layouts/BaseLayout.astro +59 -0
- package/src/pages/404.astro +24 -0
- package/src/pages/[...id].astro +50 -0
- package/src/pages/about.astro +0 -0
- package/src/pages/authors/[...page].astro +105 -0
- package/src/pages/authors/[id].astro +165 -0
- package/src/pages/blog/[...page].astro +59 -0
- package/src/pages/blog/[id].astro +175 -0
- package/src/pages/index.astro +90 -0
- package/src/pages/products/[...page].astro +50 -0
- package/src/pages/products/[id].astro +221 -0
- package/src/pages/projects/[...page].astro +74 -0
- package/src/pages/projects/[id].astro +165 -0
- package/src/pages/projects/tags/[id]/[...page].astro +58 -0
- package/src/pages/rss.xml.js +5 -0
- package/src/pages/tags/[id]/[...page].astro +110 -0
- package/src/pages/tags/index.astro +124 -0
- package/src/scripts/infoCardFadeIn.js +22 -0
- package/src/styles/global.css +272 -0
- package/src/utils/common-utils.ts +0 -0
- package/src/utils/content-loader.ts +14 -0
- package/src/utils/data-utils.ts +49 -0
- package/src/utils/featuredManager.ts +118 -0
- package/src/utils/posts.ts +43 -0
- package/src/utils/reading-time.ts +28 -0
- package/src/utils/remark-slugify.js +8 -0
- package/src/utils/rss.ts +23 -0
- package/typograf-batch.js +49 -0
package/src/utils/rss.ts
ADDED
@@ -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
|
+
}
|