core-maugli 1.1.4 → 1.1.5

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 CHANGED
@@ -1,16 +1,4 @@
1
- # Maugli Blog - Astro & Tailwind CSS2. **Interface Language** - Choose from:
2
-
3
- - 🇺🇸 English (default)
4
- - 🇷🇺 Русский
5
- - 🇪🇸 Español
6
- - 🇩🇪 Deutsch
7
- - 🇵🇹 Português
8
- - 🇫🇷 Français
9
- - 🇨🇳 中文
10
- - 🇯🇵 日本語
11
-
12
- 3. **Main Domain** - Do you have a main domain to link this blog to? (e.g., mybrand.com - leave empty if none)
13
- 4. **Multilingual Support** - Enable/disable multiple languages (disabled by default)maugli.cfd
1
+ # Maugli Blog - Astro & Tailwind CSS Theme by maugli.cfd
14
2
 
15
3
  Hi-perfomance, SEO&AI-SEO optimised
16
4
 
@@ -33,7 +21,7 @@ netlify deploy --prod
33
21
 
34
22
  ## Getting started
35
23
 
36
- To start a new project, run the interactive setup:
24
+ To start a new project in an empty folder run:
37
25
 
38
26
  ```bash
39
27
  npx core-maugli init my-blog
@@ -41,28 +29,8 @@ cd my-blog
41
29
  npm run dev
42
30
  ```
43
31
 
44
- ### Interactive Setup
45
-
46
- The setup wizard will ask you to configure:
47
-
48
- 1. **Blog Name** - The display name for your blog (can be changed later in config)
49
- 2. **Interface Language** - Choose from:
50
- - 🇺🇸 English (default)
51
- - 🇸 Español
52
- - 🇩🇪 Deutsch
53
- - �� Português
54
- - �� Français
55
- - 🇨🇳 中文
56
- - 🇯🇵 日本語
57
- 3. **Main Domain** - Your main website URL (leave empty for local blog)
58
- 4. **Multilingual Support** - Enable/disable multiple languages (disabled by default)
59
-
60
32
  Your blog will be available at `http://localhost:4321/`
61
33
 
62
- ### Manual Installation
63
-
64
- If you prefer to install without the interactive setup:
65
-
66
34
  1. **Install dependencies**
67
35
 
68
36
  If you created your project using the provided `init` script, the
@@ -102,29 +70,9 @@ npm test
102
70
 
103
71
  All tests should complete without errors.
104
72
 
105
- ## Configuration
106
-
107
- ### Initial Setup
108
-
109
- The interactive setup automatically configures your blog based on your choices. All settings can be changed later in `src/config/maugli.config.ts`.
110
-
111
- ### Customization Options
112
-
113
- - **Blog Name & Description** - Change `brand.name` and `brand.description`
114
- - **Language Settings** - Modify `defaultLang` and `features.enableMultiLang`
115
- - **Domain Configuration** - Update `brand.logoHref` for your main site link
116
- - **Example Content** - Set `showExamples: false` to hide demo content
117
- - **Theme & Features** - Enable/disable various blog features
118
-
119
- Example files are marked with `isExample: true` in their frontmatter.
120
-
121
- ### CLI Commands
122
-
123
- | Command | Description |
124
- | ----------------------------- | ---------------------------------------- |
125
- | `npx core-maugli init <name>` | Create a new blog with interactive setup |
126
- | `npx core-maugli version` | Show package version |
127
- | `npx core-maugli update` | Update config to latest version |
73
+ If you want to hide the example content included with this theme, set
74
+ `showExamples: false` in `src/config/maugli.config.ts`. Example files are
75
+ marked with `isExample: true` in their frontmatter.
128
76
 
129
77
  ### Useful npm scripts
130
78
 
package/bin/index.js CHANGED
@@ -1,23 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  const [, , cmd, target] = process.argv;
3
3
 
4
- async function main() {
5
- if (cmd === 'init') {
6
- const mod = await import('./init.js');
7
- await mod.default(target);
8
- } else if (cmd === '--version' || cmd === '-v' || cmd === 'version') {
9
- await import('./version.js');
10
- } else if (cmd === 'update' || cmd === 'upgrade') {
11
- await import('../scripts/upgrade-config.js');
12
- } else {
13
- console.log('Usage:');
14
- console.log(' core-maugli init <project-name> Create a new blog');
15
- console.log(' core-maugli version Show version');
16
- console.log(' core-maugli update Update config to latest');
17
- console.log('');
18
- console.log('Example:');
19
- console.log(' npx core-maugli init my-blog');
20
- }
4
+ if (cmd === 'init') {
5
+ const mod = await import('./init.js');
6
+ await mod.default(target);
7
+ } else {
8
+ await import('../scripts/upgrade-config.js');
21
9
  }
22
-
23
- main().catch(console.error);
package/bin/init.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { execSync } from 'child_process';
4
- import { cpSync, existsSync, writeFileSync, readFileSync } from 'fs';
4
+ import { cpSync, existsSync, writeFileSync } from 'fs';
5
5
  import path from 'path';
6
6
  import { fileURLToPath } from 'url';
7
7
 
@@ -9,99 +9,22 @@ const __filename = fileURLToPath(import.meta.url);
9
9
  const __dirname = path.dirname(__filename);
10
10
  const templateRoot = path.join(__dirname, '..');
11
11
 
12
- // Доступные языки интерфейса
13
- const availableLanguages = [
14
- { title: 'English', value: 'en' },
15
- { title: 'Русский', value: 'ru' },
16
- { title: 'Español', value: 'es' },
17
- { title: 'Deutsch', value: 'de' },
18
- { title: 'Português', value: 'pt' },
19
- { title: 'Français', value: 'fr' },
20
- { title: '中文', value: 'zh' },
21
- { title: '日本語', value: 'ja' }
22
- ];
23
-
24
- export default async function init(targetName) {
25
- console.log('🐯 Welcome to Maugli Blog Setup!\n');
26
-
27
- // Настройки по умолчанию
28
- let settings = {
29
- blogName: 'My Maugli Blog',
30
- language: 'en',
31
- mainDomain: '',
32
- enableMultiLang: false
33
- };
34
-
35
- // Попытка загрузить prompts для интерактивного режима
36
- try {
37
- const prompts = await import('prompts').then(m => m.default);
38
-
39
- // Интерактивные настройки
40
- const response = await prompts([
41
- {
42
- type: 'text',
43
- name: 'blogName',
44
- message: 'What would you like to name your blog?',
45
- initial: settings.blogName
46
- },
47
- {
48
- type: 'select',
49
- name: 'language',
50
- message: 'Choose interface language:',
51
- choices: availableLanguages,
52
- initial: 0 // English по умолчанию
53
- },
54
- {
55
- type: 'text',
56
- name: 'mainDomain',
57
- message: 'Do you have a main domain to link this blog to? (e.g., mybrand.com - leave empty if none):',
58
- initial: settings.mainDomain
59
- },
60
- {
61
- type: 'confirm',
62
- name: 'enableMultiLang',
63
- message: 'Enable multilingual support?',
64
- initial: settings.enableMultiLang
65
- }
66
- ]);
67
-
68
- // Если пользователь отменил настройку
69
- if (!response.blogName && response.blogName !== '') {
70
- console.log('Setup cancelled.');
71
- return;
72
- }
73
-
74
- settings = { ...settings, ...response };
75
- } catch (error) {
76
- console.log('⚠️ Interactive mode unavailable, using default settings...\n');
77
- }
78
-
79
- createBlog(targetName, settings);
80
- }
81
-
82
- function createBlog(targetName, settings) {
12
+ export default function init(targetName) {
83
13
  const targetDir = targetName ? path.resolve(targetName) : process.cwd();
84
-
85
- // Проверяем, создана ли папка
86
- if (targetName && !existsSync(targetDir)) {
87
- console.log(`\n📁 Creating folder: ${targetName}`);
88
- }
89
14
 
90
15
  function copyItem(item) {
91
16
  const src = path.join(templateRoot, item);
92
17
  const dest = path.join(targetDir, item);
93
18
 
94
19
  if (!existsSync(src)) {
95
- console.log(`⚠️ Skipped ${item} (not found)`);
20
+ console.log(`Skipped ${item} (not found)`);
96
21
  return;
97
22
  }
98
23
 
99
24
  cpSync(src, dest, { recursive: true });
100
- console.log(`✅ Copied ${item}`);
25
+ console.log(`Copied ${item}`);
101
26
  }
102
27
 
103
- console.log('\n🔧 Copying files...\n');
104
-
105
28
  // Copy package files first so npm install works correctly
106
29
  ['package.json', 'package-lock.json'].forEach(file => {
107
30
  if (existsSync(path.join(templateRoot, file))) {
@@ -123,9 +46,6 @@ function createBlog(targetName, settings) {
123
46
  ];
124
47
  items.forEach(copyItem);
125
48
 
126
- // Создание конфигурационных файлов
127
- console.log('\n⚙️ Creating configuration files...\n');
128
-
129
49
  // Create essential config files
130
50
  const gitignoreContent = `
131
51
  # Dependencies
@@ -160,75 +80,12 @@ dist/
160
80
  `;
161
81
 
162
82
  writeFileSync(path.join(targetDir, '.gitignore'), gitignoreContent.trim());
163
- console.log('Created .gitignore');
83
+ console.log('Created .gitignore');
164
84
 
165
85
  writeFileSync(path.join(targetDir, '.prettierrc'), prettierrcContent);
166
- console.log('Created .prettierrc');
167
-
168
- // Обновление maugli.config.ts с пользовательскими настройками
169
- console.log('\n🎨 Configuring blog settings...\n');
170
-
171
- const configPath = path.join(targetDir, 'src/config/maugli.config.ts');
172
- if (existsSync(configPath)) {
173
- let configContent = readFileSync(configPath, 'utf8');
174
-
175
- // Обновляем название блога
176
- configContent = configContent.replace(
177
- /name: 'Maugli'/,
178
- `name: '${settings.blogName}'`
179
- );
180
-
181
- // Обновляем язык по умолчанию
182
- configContent = configContent.replace(
183
- /defaultLang: 'en'/,
184
- `defaultLang: '${settings.language}'`
185
- );
186
-
187
- // Обновляем мультиязычность
188
- configContent = configContent.replace(
189
- /enableMultiLang: false/,
190
- `enableMultiLang: ${settings.enableMultiLang}`
191
- );
192
-
193
- // Обновляем домен (если указан)
194
- if (settings.mainDomain) {
195
- configContent = configContent.replace(
196
- /logoHref: 'https:\/\/maugli\.cfd'/,
197
- `logoHref: '${settings.mainDomain}'`
198
- );
199
- } else {
200
- // Если домена нет, ссылка ведет на главную страницу блога
201
- configContent = configContent.replace(
202
- /logoHref: 'https:\/\/maugli\.cfd'/,
203
- `logoHref: '/'`
204
- );
205
- }
206
-
207
- // Отключаем примеры для нового блога
208
- configContent = configContent.replace(
209
- /showExamples: true/,
210
- `showExamples: false`
211
- );
212
-
213
- writeFileSync(configPath, configContent);
214
- console.log('✅ Updated maugli.config.ts');
215
- }
86
+ console.log('Created .prettierrc');
216
87
 
217
- console.log('\n📦 Installing dependencies...\n');
218
88
  execSync('npm install', { cwd: targetDir, stdio: 'inherit' });
219
-
220
- console.log('\n🎉 Blog successfully created!\n');
221
- console.log('Settings:');
222
- console.log(` 📝 Name: ${settings.blogName}`);
223
- console.log(` 🌐 Language: ${availableLanguages.find(l => l.value === settings.language)?.title || settings.language}`);
224
- console.log(` 🔗 Domain: ${settings.mainDomain || 'local blog'}`);
225
- console.log(` 🌍 Multilingual: ${settings.enableMultiLang ? 'enabled' : 'disabled'}`);
226
- console.log('\nTo start:');
227
- if (targetName) {
228
- console.log(` cd ${targetName}`);
229
- }
230
- console.log(' npm run dev\n');
231
- console.log('📚 All settings can be changed in src/config/maugli.config.ts');
232
89
  }
233
90
 
234
91
  // Если скрипт запускается напрямую
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "core-maugli",
3
3
  "description": "Astro & Tailwind CSS blog theme for Maugli.",
4
4
  "type": "module",
5
- "version": "1.1.4",
5
+ "version": "1.1.5",
6
6
  "license": "GPL-3.0-or-later OR Commercial",
7
7
  "repository": {
8
8
  "type": "git",
@@ -22,7 +22,7 @@
22
22
  "dev": "astro dev",
23
23
  "start": "astro dev",
24
24
  "build": "node typograf-batch.js && node scripts/verify-assets.js && astro build",
25
- "test": "node tests/examplesFilter.demo.mjs",
25
+ "test": "node tests/examplesFilter.test.ts",
26
26
  "astro": "astro",
27
27
  "featured:add": "node scripts/featured.js add",
28
28
  "featured:remove": "node scripts/featured.js remove",
@@ -32,25 +32,24 @@
32
32
  "postinstall": "node scripts/upgrade-config.js"
33
33
  },
34
34
  "dependencies": {
35
- "@astrojs/check": "^0.9.3",
36
- "@astrojs/mdx": "^3.1.7",
37
- "@astrojs/rss": "^4.0.7",
38
- "@astrojs/sitemap": "^3.1.6",
39
- "@astrojs/tailwind": "^5.1.0",
40
- "@fontsource-variable/inter": "^5.1.0",
41
- "@fontsource-variable/geologica": "^5.1.0",
42
- "@tailwindcss/typography": "^0.5.15",
43
- "astro": "^4.15.4",
44
- "clsx": "^2.1.1",
45
- "fuse.js": "^7.0.0",
46
- "marked": "^12.0.2",
47
- "prompts": "^2.4.2",
48
- "reading-time": "^1.5.0",
35
+ "@astrojs/mdx": "^4.3.0",
36
+ "@astrojs/rss": "^4.0.11",
37
+ "@astrojs/sitemap": "^3.4.0",
38
+ "@fontsource-variable/geologica": "^5.2.6",
39
+ "@fontsource-variable/inter": "^5.2.5",
40
+ "@fontsource-variable/newsreader": "^5.2.6",
41
+ "@tailwindcss/vite": "^4.0.17",
42
+ "astro": "^5.5.6",
43
+ "i18next": "^25.3.2",
44
+ "js-yaml": "^4.1.0",
45
+ "marked": "^15.0.7",
49
46
  "remark-slug": "^7.0.1",
50
- "slugify": "^1.6.6",
51
- "tailwindcss": "^3.4.10",
52
- "typograf": "^7.4.4",
53
- "typescript": "^5.5.4"
47
+ "sharp": "^0.34.2",
48
+ "tailwindcss": "^4.0.17",
49
+ "ts-node": "^10.9.2",
50
+ "tsx": "^4.20.3",
51
+ "typescript": "^5.9.2",
52
+ "typograf": "^7.4.4"
54
53
  },
55
54
  "devDependencies": {
56
55
  "@tailwindcss/typography": "^0.5.16",
package/bin/version.js DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { readFileSync } from 'fs';
4
- import path from 'path';
5
- import { fileURLToPath } from 'url';
6
-
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = path.dirname(__filename);
9
-
10
- const packagePath = path.join(__dirname, '../package.json');
11
- const packageJson = JSON.parse(readFileSync(packagePath, 'utf8'));
12
-
13
- console.log(`core-maugli v${packageJson.version}`);
14
- console.log(`Astro & Tailwind CSS blog theme for Maugli`);
15
- console.log(`Repository: ${packageJson.repository.url}`);
@@ -1,12 +0,0 @@
1
- ---
2
- title: Что такое контент-фермы
3
- seo:
4
- title: Как автоматически создавать контент для блогов и телеграм-канаалов?
5
- description: Полная автоматизация блогов уже возможна без потери качества.
6
- ---
7
-
8
- **Раздел в процессе наполнения**
9
-
10
- Больше деталей на maugli.cfd
11
-
12
-