mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-11 18:56:06 +09:00
@@ -24,3 +24,6 @@ package-lock.json
|
|||||||
|
|
||||||
# ignore .astro directory
|
# ignore .astro directory
|
||||||
.astro
|
.astro
|
||||||
|
|
||||||
|
# ide
|
||||||
|
.idea/
|
||||||
|
|||||||
+6
-6
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "astroplate",
|
"name": "astroplate",
|
||||||
"version": "5.2.0",
|
"version": "5.3.0",
|
||||||
"description": "Astro and Tailwindcss boilerplate",
|
"description": "Astro and Tailwindcss boilerplate",
|
||||||
"author": "zeon.studio",
|
"author": "zeon.studio",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
"packageManager": "yarn@1.22.22",
|
"packageManager": "yarn@1.22.22",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "yarn generate-json && astro dev",
|
"dev": "yarn generate-json && astro dev",
|
||||||
@@ -16,11 +17,11 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/check": "0.9.4",
|
"@astrojs/check": "0.9.4",
|
||||||
"@astrojs/mdx": "4.0.8",
|
"@astrojs/mdx": "4.2.1",
|
||||||
"@astrojs/react": "4.2.0",
|
"@astrojs/react": "4.2.1",
|
||||||
"@astrojs/rss": "4.0.11",
|
"@astrojs/rss": "4.0.11",
|
||||||
"@astrojs/sitemap": "3.2.1",
|
"@astrojs/sitemap": "3.3.0",
|
||||||
"astro": "5.3.0",
|
"astro": "5.5.4",
|
||||||
"astro-auto-import": "^0.4.4",
|
"astro-auto-import": "^0.4.4",
|
||||||
"astro-font": "^1.0.0",
|
"astro-font": "^1.0.0",
|
||||||
"date-fns": "^4.1.0",
|
"date-fns": "^4.1.0",
|
||||||
@@ -41,7 +42,6 @@
|
|||||||
"@tailwindcss/forms": "^0.5.10",
|
"@tailwindcss/forms": "^0.5.10",
|
||||||
"@tailwindcss/typography": "^0.5.16",
|
"@tailwindcss/typography": "^0.5.16",
|
||||||
"@tailwindcss/vite": "^4.0.6",
|
"@tailwindcss/vite": "^4.0.6",
|
||||||
"@types/marked": "^6.0.0",
|
|
||||||
"@types/node": "22.13.4",
|
"@types/node": "22.13.4",
|
||||||
"@types/react": "19.0.9",
|
"@types/react": "19.0.9",
|
||||||
"@types/react-dom": "19.0.3",
|
"@types/react-dom": "19.0.3",
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<p align=center>
|
<p align=center>
|
||||||
<a href="https://github.com/withastro/astro/releases/tag/astro%404.3.2" alt="Contributors">
|
<a href="https://github.com/withastro/astro/releases/tag/astro%405.5.4">
|
||||||
<img src="https://img.shields.io/static/v1?label=ASTRO&message=4.3&color=000&logo=astro" />
|
<img src="https://img.shields.io/static/v1?label=ASTRO&message=5.5&color=000&logo=astro" alt="Astro Version 5.5"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="https://github.com/zeon-studio/astroplate/blob/main/LICENSE">
|
<a href="https://github.com/zeon-studio/astroplate/blob/main/LICENSE">
|
||||||
@@ -66,27 +66,27 @@
|
|||||||
|
|
||||||
### 📦 Dependencies
|
### 📦 Dependencies
|
||||||
|
|
||||||
- astro v5.1+
|
- astro v5.5+
|
||||||
- node v20.10+
|
- node v20.10+
|
||||||
- npm v10.2+
|
- yarn v1.22+
|
||||||
- tailwind v3.4+
|
- tailwind v4+
|
||||||
|
|
||||||
### 👉 Install Dependencies
|
### 👉 Install Dependencies
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install
|
yarn install
|
||||||
```
|
```
|
||||||
|
|
||||||
### 👉 Development Command
|
### 👉 Development Command
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run dev
|
yarn run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
### 👉 Build Command
|
### 👉 Build Command
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run build
|
yarn run build
|
||||||
```
|
```
|
||||||
|
|
||||||
### 👉 Build and Run With Docker
|
### 👉 Build and Run With Docker
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const fs = require("fs");
|
import fs from "node:fs";
|
||||||
const path = require("path");
|
import path from "node:path";
|
||||||
const matter = require("gray-matter");
|
import matter from "gray-matter";
|
||||||
|
|
||||||
const CONTENT_DEPTH = 2;
|
const CONTENT_DEPTH = 2;
|
||||||
const JSON_FOLDER = "./.json";
|
const JSON_FOLDER = "./.json";
|
||||||
@@ -41,10 +41,7 @@ const getData = (folder, groupDepth) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const publishedPages = getPaths.filter(
|
return getPaths.filter((page) => !page.frontmatter?.draft && page);
|
||||||
(page) => !page.frontmatter?.draft && page,
|
|
||||||
);
|
|
||||||
return publishedPages;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -60,7 +57,8 @@ try {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// merger json files for search
|
// merger json files for search
|
||||||
const posts = require(`../${JSON_FOLDER}/posts.json`);
|
const postsPath = new URL(`../${JSON_FOLDER}/posts.json`, import.meta.url);
|
||||||
|
const posts = JSON.parse(fs.readFileSync(postsPath, "utf8"));
|
||||||
const search = [...posts];
|
const search = [...posts];
|
||||||
fs.writeFileSync(`${JSON_FOLDER}/search.json`, JSON.stringify(search));
|
fs.writeFileSync(`${JSON_FOLDER}/search.json`, JSON.stringify(search));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user