core-maugli 1.2.2 → 1.2.4
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/README.md +29 -15
- package/package.json +6 -13
- package/public/img/examples/blog/previews/post-1-avtomatizaciya-marketinga-kak-ii-osvobozhdaet-predprinimatelei-ot-cifrovogo-rabstva.webp +0 -0
- package/public/img/examples/blog/previews/post-2-avtomatizaciya-kontenta-kak-neiroseti-ubivayut-perfekcionizm-v-biznese.webp +0 -0
- package/public/img/examples/blog/previews/post-3-laik-ne-valyuta-kak-avtomatizaciya-marketinga-spasaet-ot-lozhnyh-metrik.webp +0 -0
- package/public/img/examples/blog/previews/post-5-5-fatalnyh-oshibok-marketinga-kotorye-ubivayut-startapy-na-starte.webp +0 -0
- package/public/img/examples/blog/previews/post-6-5-strategii-kontent-marketinga-dlya-startapov-avtomatizaciya-i-revolyuciya.webp +0 -0
- package/public/img/examples/blog/previews/post-7-viralnyi-kontent-ne-udacha-a-strategiya-avtomatizaciya-marketinga.webp +0 -0
- package/public/img/examples/blog/previews/post-agent-experience-mcp-biznes-v-epohu-ii-agentov.webp +0 -0
- package/public/img/examples/blog/previews/post_11.webp +0 -0
- package/public/img/examples/blog/previews/post_12.webp +0 -0
- package/public/img/examples/blog/previews/post_1_jsonld_guide.webp +0 -0
- package/public/img/examples/blog/previews/test-post.webp +0 -0
- package/public/img/examples/blog/previews/tr-post-1.webp +0 -0
- package/public/img/examples/products/previews/product_1.webp +0 -0
- package/public/img/examples/products/previews/product_2.webp +0 -0
- package/public/img/examples/projects/previews/project_1.webp +0 -0
- package/public/img/examples/projects/previews/project_2.webp +0 -0
- package/scripts/generate-previews.js +175 -0
- package/scripts/update-components.js +166 -0
- package/scripts/upgrade-config.js +23 -3
- package/src/components/LanguageSwitcher.astro +2 -16
- package/astro.config.mjs +0 -92
- package/bin/init.js +0 -201
- package/public/img/default/autor_default.webp +0 -0
- package/public/img/default/blog_default.webp +0 -0
- package/public/img/default/default.webp +0 -0
- package/public/img/default/product_default.webp +0 -0
- package/public/img/default/project_default.webp +0 -0
- package/public/img/default/rubric_default.webp +0 -0
- package/public/img/default/test.webp +0 -0
- package/public/img/default/test2.webp +0 -0
- package/resize-all.cjs +0 -29
- package/src/i18n/de.json +0 -126
- package/src/i18n/en.json +0 -126
- package/src/i18n/es.json +0 -126
- package/src/i18n/fr.json +0 -126
- package/src/i18n/index.ts +0 -10
- package/src/i18n/ja.json +0 -126
- package/src/i18n/languages.ts +0 -23
- package/src/i18n/pt.json +0 -126
- package/src/i18n/ru.json +0 -123
- package/src/i18n/zh.json +0 -126
- package/src/icons/ArrowLeft.astro +0 -13
- package/src/icons/ArrowRight.astro +0 -13
- package/src/icons/flags/brazil.svg +0 -14
- package/src/icons/flags/china.svg +0 -15
- package/src/icons/flags/france.svg +0 -12
- package/src/icons/flags/germany.svg +0 -12
- package/src/icons/flags/japan.svg +0 -11
- package/src/icons/flags/russia.svg +0 -12
- package/src/icons/flags/spain.svg +0 -12
- package/src/icons/flags/united arab emirates.svg +0 -13
- package/src/icons/flags/united states.svg +0 -15
- package/src/icons/socials/BlueskyIcon.astro +0 -9
- package/src/icons/socials/EmailIcon.astro +0 -8
- package/src/icons/socials/LinkedinIcon.astro +0 -9
- package/src/icons/socials/MastodonIcon.astro +0 -9
- package/src/icons/socials/MediumIcon.astro +0 -9
- package/src/icons/socials/RedditIcon.astro +0 -11
- package/src/icons/socials/TelegramIcon.astro +0 -11
- package/src/icons/socials/TwitterIcon.astro +0 -9
- package/src/layouts/BaseLayout.astro +0 -59
- package/src/pages/404.astro +0 -24
- package/src/pages/[...id].astro +0 -50
- package/src/pages/about.astro +0 -0
- package/src/pages/authors/[...page].astro +0 -105
- package/src/pages/authors/[id].astro +0 -175
- package/src/pages/blog/[...page].astro +0 -59
- package/src/pages/blog/[id].astro +0 -175
- package/src/pages/index.astro +0 -90
- package/src/pages/products/[...page].astro +0 -50
- package/src/pages/products/[id].astro +0 -221
- package/src/pages/projects/[...page].astro +0 -74
- package/src/pages/projects/[id].astro +0 -165
- package/src/pages/projects/tags/[id]/[...page].astro +0 -58
- package/src/pages/rss.xml.js +0 -5
- package/src/pages/tags/[id]/[...page].astro +0 -110
- package/src/pages/tags/index.astro +0 -124
- package/src/scripts/infoCardFadeIn.js +0 -22
- package/src/styles/global.css +0 -273
- package/src/utils/common-utils.ts +0 -0
- package/src/utils/content-loader.ts +0 -14
- package/src/utils/data-utils.ts +0 -49
- package/src/utils/featuredManager.ts +0 -118
- package/src/utils/posts.ts +0 -43
- package/src/utils/reading-time.ts +0 -28
- package/src/utils/remark-slugify.js +0 -8
- package/src/utils/rss.ts +0 -23
- package/tsconfig.json +0 -8
- package/typograf-batch.js +0 -49
- package/vite.config.js +0 -11
package/src/utils/rss.ts
DELETED
@@ -1,23 +0,0 @@
|
|
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
|
-
}
|
package/tsconfig.json
DELETED
package/typograf-batch.js
DELETED
@@ -1,49 +0,0 @@
|
|
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
|
-
}
|
package/vite.config.js
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
import { defineConfig } from 'vite';
|
2
|
-
import { imagetools } from 'vite-imagetools';
|
3
|
-
import { VitePWA } from 'vite-plugin-pwa';
|
4
|
-
import { pwaOptions } from './astro.config.mjs';
|
5
|
-
|
6
|
-
export default defineConfig({
|
7
|
-
plugins: [
|
8
|
-
imagetools(),
|
9
|
-
VitePWA(pwaOptions)
|
10
|
-
]
|
11
|
-
});
|