-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
132 changed files
with
6,763 additions
and
321 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
.vscode/ | ||
# build output | ||
dist/ | ||
.output/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Expose Astro dependencies for `pnpm` users | ||
shamefully-hoist=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"recommendations": ["astro-build.astro-vscode"], | ||
"unwantedRecommendations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "./node_modules/.bin/astro dev", | ||
"name": "Development server", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,49 @@ | ||
# 潮流前端周刊 | ||
* [#99-自驾回家](https://github.com/tw93/weekly/tree/main/md/%2399-%E8%87%AA%E9%A9%BE%E5%9B%9E%E5%AE%B6.md) | ||
* [#98-潮流建筑](https://github.com/tw93/weekly/tree/main/md/%2398-%E6%BD%AE%E6%B5%81%E5%BB%BA%E7%AD%91.md) | ||
* [#97-水上森林](https://github.com/tw93/weekly/tree/main/md/%2397-%E6%B0%B4%E4%B8%8A%E6%A3%AE%E6%9E%97.md) | ||
* [#96-杭州乐园](https://github.com/tw93/weekly/tree/main/md/%2396-%E6%9D%AD%E5%B7%9E%E4%B9%90%E5%9B%AD.md) | ||
* [#95-由在茶溪](https://github.com/tw93/weekly/tree/main/md/%2395-%E7%94%B1%E5%9C%A8%E8%8C%B6%E6%BA%AA.md) | ||
* [#94-汤屋](https://github.com/tw93/weekly/tree/main/md/%2394-%E6%B1%A4%E5%B1%8B.md) | ||
* [#93-保护姑娘](https://github.com/tw93/weekly/tree/main/md/%2393-%E4%BF%9D%E6%8A%A4%E5%A7%91%E5%A8%98.md) | ||
* [#92-木星一号](https://github.com/tw93/weekly/tree/main/md/%2392-%E6%9C%A8%E6%98%9F%E4%B8%80%E5%8F%B7.md) | ||
* [#91-天目里](https://github.com/tw93/weekly/tree/main/md/%2391-%E5%A4%A9%E7%9B%AE%E9%87%8C.md) | ||
* [#90-山仓子](https://github.com/tw93/weekly/tree/main/md/%2390-%E5%B1%B1%E4%BB%93%E5%AD%90.md) | ||
* [#89-去避暑吧](https://github.com/tw93/weekly/tree/main/md/%2389-%E5%8E%BB%E9%81%BF%E6%9A%91%E5%90%A7.md) | ||
* [#88-大水枪](https://github.com/tw93/weekly/tree/main/md/%2388-%E5%A4%A7%E6%B0%B4%E6%9E%AA.md) | ||
* [#87-太湖湾音乐节](https://github.com/tw93/weekly/tree/main/md/%2387-%E5%A4%AA%E6%B9%96%E6%B9%BE%E9%9F%B3%E4%B9%90%E8%8A%82.md) | ||
* [#86-炒饭配烤串](https://github.com/tw93/weekly/tree/main/md/%2386-%E7%82%92%E9%A5%AD%E9%85%8D%E7%83%A4%E4%B8%B2.md) | ||
* [#85-烟雨任平生](https://github.com/tw93/weekly/tree/main/md/%2385-%E7%83%9F%E9%9B%A8%E4%BB%BB%E5%B9%B3%E7%94%9F.md) | ||
* [#84-落日风帆](https://github.com/tw93/weekly/tree/main/md/%2384-%E8%90%BD%E6%97%A5%E9%A3%8E%E5%B8%86.md) | ||
* [#83-莫吉托](https://github.com/tw93/weekly/tree/main/md/%2383-%E8%8E%AB%E5%90%89%E6%89%98.md) | ||
* [#82-湖州](https://github.com/tw93/weekly/tree/main/md/%2382-%E6%B9%96%E5%B7%9E.md) | ||
* [#81-良渚的🦌](https://github.com/tw93/weekly/tree/main/md/%2381-%E8%89%AF%E6%B8%9A%E7%9A%84%F0%9F%A6%8C.md) | ||
* [#80-多久没有看大象了](https://github.com/tw93/weekly/tree/main/md/%2380-%E5%A4%9A%E4%B9%85%E6%B2%A1%E6%9C%89%E7%9C%8B%E5%A4%A7%E8%B1%A1%E4%BA%86.md) | ||
* [#79-笼子里的鸟](https://github.com/tw93/weekly/tree/main/md/%2379-%E7%AC%BC%E5%AD%90%E9%87%8C%E7%9A%84%E9%B8%9F.md) | ||
* [#78-佛头](https://github.com/tw93/weekly/tree/main/md/%2378-%E4%BD%9B%E5%A4%B4.md) | ||
* [#77-缙云烧饼](https://github.com/tw93/weekly/tree/main/md/%2377-%E7%BC%99%E4%BA%91%E7%83%A7%E9%A5%BC.md) | ||
* [#76-咖啡标语](https://github.com/tw93/weekly/tree/main/md/%2376-%E5%92%96%E5%95%A1%E6%A0%87%E8%AF%AD.md) | ||
* [#75-湖边小号声](https://github.com/tw93/weekly/tree/main/md/%2375-%E6%B9%96%E8%BE%B9%E5%B0%8F%E5%8F%B7%E5%A3%B0.md) | ||
* [#74-发光的树](https://github.com/tw93/weekly/tree/main/md/%2374-%E5%8F%91%E5%85%89%E7%9A%84%E6%A0%91.md) | ||
* [#73-哈哈科二过了](https://github.com/tw93/weekly/tree/main/md/%2373-%E5%93%88%E5%93%88%E7%A7%91%E4%BA%8C%E8%BF%87%E4%BA%86.md) | ||
* [#72-教室](https://github.com/tw93/weekly/tree/main/md/%2372-%E6%95%99%E5%AE%A4.md) | ||
* [#71-开始断舍离](https://github.com/tw93/weekly/tree/main/md/%2371-%E5%BC%80%E5%A7%8B%E6%96%AD%E8%88%8D%E7%A6%BB.md) | ||
* [#70-悲伤的涂鸦](https://github.com/tw93/weekly/tree/main/md/%2370-%E6%82%B2%E4%BC%A4%E7%9A%84%E6%B6%82%E9%B8%A6.md) | ||
* [#69-桂语家面](https://github.com/tw93/weekly/tree/main/md/%2369-%E6%A1%82%E8%AF%AD%E5%AE%B6%E9%9D%A2.md) | ||
* [#68-河道工作者](https://github.com/tw93/weekly/tree/main/md/%2368-%E6%B2%B3%E9%81%93%E5%B7%A5%E4%BD%9C%E8%80%85.md) | ||
* [#67-科目二跑圈](https://github.com/tw93/weekly/tree/main/md/%2367-%E7%A7%91%E7%9B%AE%E4%BA%8C%E8%B7%91%E5%9C%88.md) | ||
* [#66-烤肉配薯条](https://github.com/tw93/weekly/tree/main/md/%2366-%E7%83%A4%E8%82%89%E9%85%8D%E8%96%AF%E6%9D%A1.md) | ||
* [#65-新春快乐](https://github.com/tw93/weekly/tree/main/md/%2365-%E6%96%B0%E6%98%A5%E5%BF%AB%E4%B9%90.md) | ||
* [#64-路边的乐队](https://github.com/tw93/weekly/tree/main/md/%2364-%E8%B7%AF%E8%BE%B9%E7%9A%84%E4%B9%90%E9%98%9F.md) | ||
* [#63-漂亮的树](https://github.com/tw93/weekly/tree/main/md/%2363-%E6%BC%82%E4%BA%AE%E7%9A%84%E6%A0%91.md) | ||
* [#62-2022蜡梅](https://github.com/tw93/weekly/tree/main/md/%2362-2022%E8%9C%A1%E6%A2%85.md) | ||
* [#61-西湖的小胖鸭](https://github.com/tw93/weekly/tree/main/md/%2361-%E8%A5%BF%E6%B9%96%E7%9A%84%E5%B0%8F%E8%83%96%E9%B8%AD.md) | ||
* [#60-区块链头像](https://github.com/tw93/weekly/tree/main/md/%2360-%E5%8C%BA%E5%9D%97%E9%93%BE%E5%A4%B4%E5%83%8F.md) | ||
* [#59-反邪教公园](https://github.com/tw93/weekly/tree/main/md/%2359-%E5%8F%8D%E9%82%AA%E6%95%99%E5%85%AC%E5%9B%AD.md) | ||
* [#58-治咖啡](https://github.com/tw93/weekly/tree/main/md/%2358-%E6%B2%BB%E5%92%96%E5%95%A1.md) | ||
* [#57-西安](https://github.com/tw93/weekly/tree/main/md/%2357-%E8%A5%BF%E5%AE%89.md) | ||
* [#56-祝一下子瘦20斤](https://github.com/tw93/weekly/tree/main/md/%2356-%E7%A5%9D%E4%B8%80%E4%B8%8B%E5%AD%90%E7%98%A620%E6%96%A4.md) | ||
* [#55-发条咖啡](https://github.com/tw93/weekly/tree/main/md/%2355-%E5%8F%91%E6%9D%A1%E5%92%96%E5%95%A1.md) | ||
* [#54-石头长草](https://github.com/tw93/weekly/tree/main/md/%2354-%E7%9F%B3%E5%A4%B4%E9%95%BF%E8%8D%89.md) | ||
* [#53-小鹏飞行汽车](https://github.com/tw93/weekly/tree/main/md/%2353-%E5%B0%8F%E9%B9%8F%E9%A3%9E%E8%A1%8C%E6%B1%BD%E8%BD%A6.md) | ||
* [#52-达闻西乐队](https://github.com/tw93/weekly/tree/main/md/%2352-%E8%BE%BE%E9%97%BB%E8%A5%BF%E4%B9%90%E9%98%9F.md) | ||
* [#51-长者的树](https://github.com/tw93/weekly/tree/main/md/%2351-%E9%95%BF%E8%80%85%E7%9A%84%E6%A0%91.md) | ||
* [#50-婉泰咖啡](https://github.com/tw93/weekly/tree/main/md/%2350-%E5%A9%89%E6%B3%B0%E5%92%96%E5%95%A1.md) | ||
* [#49-堂客](https://github.com/tw93/weekly/tree/main/md/%2349-%E5%A0%82%E5%AE%A2.md) | ||
* [#48-镜子房](https://github.com/tw93/weekly/tree/main/md/%2348-%E9%95%9C%E5%AD%90%E6%88%BF.md) | ||
* [#47-彩云](https://github.com/tw93/weekly/tree/main/md/%2347-%E5%BD%A9%E4%BA%91.md) | ||
* [#46-大阪夜景](https://github.com/tw93/weekly/tree/main/md/%2346-%E5%A4%A7%E9%98%AA%E5%A4%9C%E6%99%AF.md) | ||
* [#45-耶稣爱你](https://github.com/tw93/weekly/tree/main/md/%2345-%E8%80%B6%E7%A8%A3%E7%88%B1%E4%BD%A0.md) | ||
* [#44-下腰女孩](https://github.com/tw93/weekly/tree/main/md/%2344-%E4%B8%8B%E8%85%B0%E5%A5%B3%E5%AD%A9.md) | ||
* [#43-好吃的螺蛳粉](https://github.com/tw93/weekly/tree/main/md/%2343-%E5%A5%BD%E5%90%83%E7%9A%84%E8%9E%BA%E8%9B%B3%E7%B2%89.md) | ||
* [#42-无争的灵隐寺](https://github.com/tw93/weekly/tree/main/md/%2342-%E6%97%A0%E4%BA%89%E7%9A%84%E7%81%B5%E9%9A%90%E5%AF%BA.md) | ||
* [#41-一群笔直的树](https://github.com/tw93/weekly/tree/main/md/%2341-%E4%B8%80%E7%BE%A4%E7%AC%94%E7%9B%B4%E7%9A%84%E6%A0%91.md) | ||
* [#40-天马牛肉饼](https://github.com/tw93/weekly/tree/main/md/%2340-%E5%A4%A9%E9%A9%AC%E7%89%9B%E8%82%89%E9%A5%BC.md) | ||
* [#39-红色标语](https://github.com/tw93/weekly/tree/main/md/%2339-%E7%BA%A2%E8%89%B2%E6%A0%87%E8%AF%AD.md) | ||
* [#38-好久不见的知了壳](https://github.com/tw93/weekly/tree/main/md/%2338-%E5%A5%BD%E4%B9%85%E4%B8%8D%E8%A7%81%E7%9A%84%E7%9F%A5%E4%BA%86%E5%A3%B3.md) | ||
* [#37-想学的猫](https://github.com/tw93/weekly/tree/main/md/%2337-%E6%83%B3%E5%AD%A6%E7%9A%84%E7%8C%AB.md) | ||
* [#36-蜜桃的薄饼](https://github.com/tw93/weekly/tree/main/md/%2336-%E8%9C%9C%E6%A1%83%E7%9A%84%E8%96%84%E9%A5%BC.md) | ||
* [#35-高铁窗外](https://github.com/tw93/weekly/tree/main/md/%2335-%E9%AB%98%E9%93%81%E7%AA%97%E5%A4%96.md) | ||
* [#34-沙巴小女孩](https://github.com/tw93/weekly/tree/main/md/%2334-%E6%B2%99%E5%B7%B4%E5%B0%8F%E5%A5%B3%E5%AD%A9.md) | ||
* [#33-自动化养猫](https://github.com/tw93/weekly/tree/main/md/%2333-%E8%87%AA%E5%8A%A8%E5%8C%96%E5%85%BB%E7%8C%AB.md) | ||
* [#32-南京](https://github.com/tw93/weekly/tree/main/md/%2332-%E5%8D%97%E4%BA%AC.md) | ||
* [#31-mamala西餐](https://github.com/tw93/weekly/tree/main/md/%2331-mamala%E8%A5%BF%E9%A4%90.md) | ||
* [#30-不天黑的乌鲁木齐](https://github.com/tw93/weekly/tree/main/md/%2330-%E4%B8%8D%E5%A4%A9%E9%BB%91%E7%9A%84%E4%B9%8C%E9%B2%81%E6%9C%A8%E9%BD%90.md) | ||
* [#29-巴依老爷](https://github.com/tw93/weekly/tree/main/md/%2329-%E5%B7%B4%E4%BE%9D%E8%80%81%E7%88%B7.md) | ||
* [#28-橘子洲头](https://github.com/tw93/weekly/tree/main/md/%2328-%E6%A9%98%E5%AD%90%E6%B4%B2%E5%A4%B4.md) | ||
* [#27-热河路](https://github.com/tw93/weekly/tree/main/md/%2327-%E7%83%AD%E6%B2%B3%E8%B7%AF.md) | ||
* [#26-良渚看人](https://github.com/tw93/weekly/tree/main/md/%2326-%E8%89%AF%E6%B8%9A%E7%9C%8B%E4%BA%BA.md) | ||
* [#25-飞檐走壁的人](https://github.com/tw93/weekly/tree/main/md/%2325-%E9%A3%9E%E6%AA%90%E8%B5%B0%E5%A3%81%E7%9A%84%E4%BA%BA.md) | ||
* [#24-小酒吧听歌](https://github.com/tw93/weekly/tree/main/md/%2324-%E5%B0%8F%E9%85%92%E5%90%A7%E5%90%AC%E6%AD%8C.md) | ||
* [#23-小炒黄牛肉](https://github.com/tw93/weekly/tree/main/md/%2323-%E5%B0%8F%E7%82%92%E9%BB%84%E7%89%9B%E8%82%89.md) | ||
* [#22-冬天三亚](https://github.com/tw93/weekly/tree/main/md/%2322-%E5%86%AC%E5%A4%A9%E4%B8%89%E4%BA%9A.md) | ||
* [#21-汤圆](https://github.com/tw93/weekly/tree/main/md/%2321-%E6%B1%A4%E5%9C%86.md) | ||
* [#20-草海](https://github.com/tw93/weekly/tree/main/md/%2320-%E8%8D%89%E6%B5%B7.md) | ||
* [#19-落日西湖](https://github.com/tw93/weekly/tree/main/md/%2319-%E8%90%BD%E6%97%A5%E8%A5%BF%E6%B9%96.md) | ||
* [#18-心灵奇旅](https://github.com/tw93/weekly/tree/main/md/%2318-%E5%BF%83%E7%81%B5%E5%A5%87%E6%97%85.md) | ||
* [#17-火锅店担担面](https://github.com/tw93/weekly/tree/main/md/%2317-%E7%81%AB%E9%94%85%E5%BA%97%E6%8B%85%E6%8B%85%E9%9D%A2.md) | ||
* [#16-大江大河2](https://github.com/tw93/weekly/tree/main/md/%2316-%E5%A4%A7%E6%B1%9F%E5%A4%A7%E6%B2%B32.md) | ||
* [#15-养猫](https://github.com/tw93/weekly/tree/main/md/%2315-%E5%85%BB%E7%8C%AB.md) | ||
* [#14-2020跨年](https://github.com/tw93/weekly/tree/main/md/%2314-2020%E8%B7%A8%E5%B9%B4.md) | ||
* [#13-茶颜悦色](https://github.com/tw93/weekly/tree/main/md/%2313-%E8%8C%B6%E9%A2%9C%E6%82%A6%E8%89%B2.md) | ||
* [#12-大理稻田](https://github.com/tw93/weekly/tree/main/md/%2312-%E5%A4%A7%E7%90%86%E7%A8%BB%E7%94%B0.md) | ||
* [#11-御牛道](https://github.com/tw93/weekly/tree/main/md/%2311-%E5%BE%A1%E7%89%9B%E9%81%93.md) | ||
* [#10-新疆的雪山](https://github.com/tw93/weekly/tree/main/md/%2310-%E6%96%B0%E7%96%86%E7%9A%84%E9%9B%AA%E5%B1%B1.md) | ||
* [#09-华山](https://github.com/tw93/weekly/tree/main/md/%2309-%E5%8D%8E%E5%B1%B1.md) | ||
* [#08-日本大阪海游馆](https://github.com/tw93/weekly/tree/main/md/%2308-%E6%97%A5%E6%9C%AC%E5%A4%A7%E9%98%AA%E6%B5%B7%E6%B8%B8%E9%A6%86.md) | ||
* [#07-重庆洪崖洞](https://github.com/tw93/weekly/tree/main/md/%2307-%E9%87%8D%E5%BA%86%E6%B4%AA%E5%B4%96%E6%B4%9E.md) | ||
* [#06-白云滑雪场](https://github.com/tw93/weekly/tree/main/md/%2306-%E7%99%BD%E4%BA%91%E6%BB%91%E9%9B%AA%E5%9C%BA.md) | ||
* [#05-泸沽湖](https://github.com/tw93/weekly/tree/main/md/%2305-%E6%B3%B8%E6%B2%BD%E6%B9%96.md) | ||
* [#04-东海音乐节](https://github.com/tw93/weekly/tree/main/md/%2304-%E4%B8%9C%E6%B5%B7%E9%9F%B3%E4%B9%90%E8%8A%82.md) | ||
* [#03-万石植物园](https://github.com/tw93/weekly/tree/main/md/%2303-%E4%B8%87%E7%9F%B3%E6%A4%8D%E7%89%A9%E5%9B%AD.md) | ||
* [#02-太子湾](https://github.com/tw93/weekly/tree/main/md/%2302-%E5%A4%AA%E5%AD%90%E6%B9%BE.md) | ||
* [#01-安吉黄昏](https://github.com/tw93/weekly/tree/main/md/%2301-%E5%AE%89%E5%90%89%E9%BB%84%E6%98%8F.md) | ||
# Welcome to [Astro](https://astro.build) | ||
|
||
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics) | ||
|
||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun! | ||
![basics](https://user-images.githubusercontent.com/4677417/186188965-73453154-fdec-4d6b-9c34-cb35c248ae5b.png) | ||
|
||
|
||
## 🚀 Project Structure | ||
|
||
Inside of your Astro project, you'll see the following folders and files: | ||
|
||
``` | ||
/ | ||
├── public/ | ||
│ └── favicon.svg | ||
├── src/ | ||
│ ├── components/ | ||
│ │ └── Card.astro | ||
│ ├── layouts/ | ||
│ │ └── Layout.astro | ||
│ └── pages/ | ||
│ └── index.astro | ||
└── package.json | ||
``` | ||
|
||
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. | ||
|
||
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. | ||
|
||
Any static assets, like images, can be placed in the `public/` directory. | ||
|
||
## 🧞 Commands | ||
|
||
All commands are run from the root of the project, from a terminal: | ||
|
||
| Command | Action | | ||
| :--------------------- | :------------------------------------------------- | | ||
| `npm install` | Installs dependencies | | ||
| `npm run dev` | Starts local dev server at `localhost:3000` | | ||
| `npm run build` | Build your production site to `./dist/` | | ||
| `npm run preview` | Preview your build locally, before deploying | | ||
| `npm run astro ...` | Run CLI commands like `astro add`, `astro preview` | | ||
| `npm run astro --help` | Get help using the Astro CLI | | ||
|
||
## 👀 Want to learn more? | ||
|
||
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { defineConfig } from 'astro/config'; | ||
import tailwind from '@astrojs/tailwind'; | ||
import react from '@astrojs/react'; | ||
import { parse } from 'node-html-parser'; | ||
import dayjs from 'dayjs'; | ||
|
||
function defaultLayoutPlugin() { | ||
return function (tree, file) { | ||
const headHtml = tree.children[0].value; | ||
let image; | ||
if (headHtml) { | ||
image = parse(headHtml).querySelector('img').getAttribute('src'); | ||
} | ||
file.data.astro.frontmatter.layout = '@layouts/post.astro'; | ||
file.data.astro.frontmatter.pic = image; | ||
file.data.astro.frontmatter.desc = tree.children[1].children[1].value; | ||
|
||
const num = file.history[0].split('/posts/')[1].split('-')[0]; | ||
if (num < 99) { | ||
file.data.astro.frontmatter.date = dayjs('2022-10-10') | ||
.subtract(100 - num, 'week') | ||
.format('YYYY/MM/DD'); | ||
} else if (num == 99) { | ||
file.data.astro.frontmatter.date = '2022-10-10'; | ||
} else { | ||
file.data.astro.frontmatter.date = dayjs().format('YYYY/MM/DD'); | ||
} | ||
}; | ||
} | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
integrations: [react(), tailwind()], | ||
markdown: { | ||
remarkPlugins: [defaultLayoutPlugin], | ||
extendDefaultPlugins: true, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "@example/basics", | ||
"type": "module", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "astro dev", | ||
"start": "astro dev", | ||
"build": "astro build", | ||
"preview": "astro preview", | ||
"astro": "astro" | ||
}, | ||
"dependencies": { | ||
"@algolia/client-search": "^4.13.0", | ||
"@astrojs/rss": "^1.0.2", | ||
"@docsearch/css": "^3.0.0", | ||
"@docsearch/react": "^3.0.0", | ||
"@tailwindcss/line-clamp": "^0.4.0", | ||
"astro": "^1.3.0", | ||
"node-html-parser": "^6.1.1", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0", | ||
"tailwindcss": "^3.1.8" | ||
}, | ||
"devDependencies": { | ||
"@astrojs/react": "^1.1.4", | ||
"@astrojs/tailwind": "^2.0.1", | ||
"@tailwindcss/typography": "^0.5.2", | ||
"dayjs": "^1.11.5" | ||
} | ||
} |
Oops, something went wrong.