vending-mocha 0.1.1 → 0.1.3
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/bin/cli.js +3 -1
- package/package.json +1 -1
- package/posts/hello-world.md +2 -1
- package/src/entry-client.tsx +2 -1
- package/src/entry-server.tsx +2 -1
- package/src/pages/BlogPost.tsx +8 -1
- package/src/pages/HomePage.tsx +2 -1
package/bin/cli.js
CHANGED
|
@@ -12,6 +12,8 @@ import { Command } from 'commander';
|
|
|
12
12
|
const __filename = fileURLToPath(import.meta.url);
|
|
13
13
|
const __dirname = path.dirname(__filename);
|
|
14
14
|
|
|
15
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'), 'utf8'));
|
|
16
|
+
|
|
15
17
|
const IGNORE_FILES = [
|
|
16
18
|
'node_modules',
|
|
17
19
|
'.git',
|
|
@@ -422,7 +424,7 @@ const program = new Command();
|
|
|
422
424
|
program
|
|
423
425
|
.name('vending-mocha')
|
|
424
426
|
.description('A personal blogging framework for developers')
|
|
425
|
-
.version(
|
|
427
|
+
.version(pkg.version)
|
|
426
428
|
.addHelpText('before', getAsciiArt());
|
|
427
429
|
|
|
428
430
|
program.command('new')
|
package/package.json
CHANGED
package/posts/hello-world.md
CHANGED
|
@@ -16,13 +16,14 @@ Welcome to **Vending Mocha**! This is a sample post. You can edit this file or a
|
|
|
16
16
|
- **SSG**: Static Site Generation for optimal performance.
|
|
17
17
|
- **Theme Support**: Customize your blog with different themes.
|
|
18
18
|
- **Deployment**: Ready for GitHub Pages deployment.
|
|
19
|
+
- **AI ready**: Fully compatible with Antigravity for setup, deployment and content generation.
|
|
19
20
|
|
|
20
21
|
### Getting Started
|
|
21
22
|
|
|
22
23
|
To create a new Vending Mocha blog, run the following command in your terminal:
|
|
23
24
|
|
|
24
25
|
```bash
|
|
25
|
-
npx vending-mocha new <my-blog>
|
|
26
|
+
npx vending-mocha@latest new <my-blog>
|
|
26
27
|
```
|
|
27
28
|
|
|
28
29
|
Follow the interactive prompts to set up your blog's configuration.
|
package/src/entry-client.tsx
CHANGED
|
@@ -4,7 +4,8 @@ import { BrowserRouter } from 'react-router-dom'
|
|
|
4
4
|
import * as ReactHelmetAsync from 'react-helmet-async'
|
|
5
5
|
import App from './App'
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const helmetAsync = ReactHelmetAsync as any;
|
|
8
|
+
const { HelmetProvider } = helmetAsync.default || helmetAsync;
|
|
8
9
|
|
|
9
10
|
const container = document.getElementById('root')!
|
|
10
11
|
|
package/src/entry-server.tsx
CHANGED
|
@@ -6,7 +6,8 @@ import App from './App'
|
|
|
6
6
|
import { siteConfig } from './site.config'
|
|
7
7
|
export { siteConfig }
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const helmetAsync = ReactHelmetAsync as any;
|
|
10
|
+
const { HelmetProvider } = helmetAsync.default || helmetAsync;
|
|
10
11
|
|
|
11
12
|
import { getBasePath } from './utils/basePath';
|
|
12
13
|
|
package/src/pages/BlogPost.tsx
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { useParams } from 'react-router-dom';
|
|
2
|
+
import * as ReactHelmetAsync from 'react-helmet-async';
|
|
3
|
+
const helmetAsync = ReactHelmetAsync as any;
|
|
4
|
+
const { Helmet } = helmetAsync.default || helmetAsync;
|
|
2
5
|
import { siteConfig } from '../site.config';
|
|
3
6
|
import SiteHeader from '../components/SiteHeader';
|
|
4
7
|
import Markdown from 'react-markdown';
|
|
@@ -54,7 +57,11 @@ export default function BlogPost() {
|
|
|
54
57
|
return (
|
|
55
58
|
<div className="blog-container">
|
|
56
59
|
<SiteHeader />
|
|
57
|
-
<
|
|
60
|
+
<Helmet>
|
|
61
|
+
<script type='application/ld+json'>
|
|
62
|
+
{JSON.stringify(jsonLd)}
|
|
63
|
+
</script>
|
|
64
|
+
</Helmet>
|
|
58
65
|
<header>
|
|
59
66
|
<h1>{postMeta.title}</h1>
|
|
60
67
|
<div className="meta">
|
package/src/pages/HomePage.tsx
CHANGED
|
@@ -5,7 +5,8 @@ import * as ReactHelmetAsync from 'react-helmet-async';
|
|
|
5
5
|
import { siteConfig } from '../site.config';
|
|
6
6
|
import { formatDate } from '../utils/date';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const helmetAsync = ReactHelmetAsync as any;
|
|
9
|
+
const { Helmet } = helmetAsync.default || helmetAsync;
|
|
9
10
|
|
|
10
11
|
const POSTS_PER_PAGE = 50;
|
|
11
12
|
|