layout | title | publishedTime | tags | author | |
---|---|---|---|---|---|
./src/layouts/Post.astro |
README of this template |
2023-10-05 |
|
Byron |
This is a template for Astro blog. You can find source code in here.
This template is still in progress,you can see Demo in here
- use astro to build static site
- pnpm as package manager
- seo friendly by astro-seo
- sitemap by astro-sitemap
- robots.txt by astro-robots-txt
- light & dark mode by astro-color-scheme
- responsive design, mobile first, 768px | 1024px | 1280px breakpoints
- unocss for css, also icon convenient
- i18n support by astro-i18next, you can switch language in footer after you add more language
- local search by astro-pagefind
- toc friendly when ever you device is mobile or desktop
- series support, you can add series in frontmatter of post with
string[]
orstring
-
generate repo from this template
-
change to your information in 'src/setting'
-
put your post in 'src/content/blog'
git remote add origin-template git@github.com:byronogis/astro-blog-template.git
git fetch origin-template
git switch --orphan template
git pull origin-template main
git branch -u origin-template/main template
git switch main
git merge template --allow-unrelated-histories --squash
# maybe you need to fix conflict
git add .
git commit -m "merge template"
git switch template
git pull
git switch main
git merge template --allow-unrelated-histories --squash
# maybe you need to fix conflict
git add .
git commit -m "merge template"
In general, you just need to fix the conflict in 'src/setting'. And other files, you can just use the template version.