Extract data folder to root
This commit is contained in:
@ -56,6 +56,10 @@ Inside AstroWind template, you'll see the following folders and files:
|
|||||||
|
|
||||||
```
|
```
|
||||||
/
|
/
|
||||||
|
├── data/
|
||||||
|
| └── blog/
|
||||||
|
| ├── post-slug-1.md
|
||||||
|
| └── ...
|
||||||
├── public/
|
├── public/
|
||||||
│ ├── robots.txt
|
│ ├── robots.txt
|
||||||
│ └── favicon.ico
|
│ └── favicon.ico
|
||||||
@ -64,10 +68,6 @@ Inside AstroWind template, you'll see the following folders and files:
|
|||||||
│ │ ├── images/
|
│ │ ├── images/
|
||||||
| | └── styles/
|
| | └── styles/
|
||||||
| | └── base.css
|
| | └── base.css
|
||||||
│ ├── data/
|
|
||||||
| | └── posts/
|
|
||||||
| | ├── post-slug-1.md
|
|
||||||
| | └── ...
|
|
||||||
│ ├── components/
|
│ ├── components/
|
||||||
│ │ ├── atoms/
|
│ │ ├── atoms/
|
||||||
│ │ ├── blog/
|
│ │ ├── blog/
|
||||||
|
@ -27,7 +27,7 @@ const getNormalizedPost = async (post) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const load = async function () {
|
const load = async function () {
|
||||||
const posts = import.meta.glob('~/data/posts/**/*.md', {
|
const posts = import.meta.glob('~/../data/blog/**/*.md', {
|
||||||
eager: true,
|
eager: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user