Total Pageviews

Sunday 27 October 2024

搭建基于nuxtjs的静态网站程序:content-wind

 npx nuxi init -t themes/content-wind content-wind-demosite
显示:
...
 Nuxt project has been created with the content-wind template. Next steps:
 › cd content-wind-demosite                                           
 › Start development server with npm run dev   
    
cd content-wind-demosite
npm audit fix --force
npm run generate
显示:
....
√ Generated public .output/public                               
Nuxt now supports pinning the behavior of provider and deployment presets with a compatibility date. We recommend you specify a compatibilityDate in your nuxt.config file, or set an environment variable, such as COMPATIBILITY_DATE=2024-10-27.
√ You can preview this build using npx serve .output/public     
√ You can now deploy .output/public to any static hosting!   

ls
看到了,在当前目录下,生成了dist目录。

cd content
nano 3.happy-festival.md
cat 3.happy-festival.md
显示:
---
navigation:
  title: 快乐的节日
layout: full-width
head:
  description: 这是一首歌
---

此处写正文或html codes


cd ..
npm run generate

项目地址:https://github.com/atinux/content-wind
https://content-wind.nuxt.space/
我的演示网站:https://elaborate-hamster-1e87be.netlify.app/

我改了本地的源帖~/content-wind-demosite/content/4.yangzhou.md文件,并运行更新网站的根目录命令,然后上传~/content-wind-demosite/dist目录的内容到https://app.netlify.com/drop,然后得到的链接是新链接:

https://spontaneous-caramel-2462f0.netlify.app/,这其实是另一个网站,因为它的内容跟

https://elaborate-hamster-1e87be.netlify.app/的内容有所不同,可见之前“手工上传”的网站

https://elaborate-hamster-1e87be.netlify.app/是无法更新的。我现在才注意到这一点。

-----------------------------------------------------

(npx nuxi init -t themes/content-wind content-wind-demosite)

npx nuxi init -t themes/docus docus-site
cd docus-site
npm run build
显示:
...
You can preview this build using node .output/server/index.mjs

https://docus.dev/
https://github.com/nuxt-themes/docus
https://github.com/atinux/docus-demo

------------------------

nuxtlabs repositories








No comments:

Post a Comment