Skip to content

redgreat/me

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

134 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

个人博客

很多方便好用的开源md解析博客应用,但是想学习下elixir,fork了这个仓,利用vercel免费部署静态网页,希望后期能坚持更新文章。

结构

  • pages/posts 发布文章
  • pages/routes 轨迹网页
  • migrations 数据库迁移脚本
  • api Vercel Functions 接口
  • assets/ 图片等多媒体资源
  • lib/ 生成html代码
  • output/ 静态网页

运行

  • mix deps.get 安装依赖
  • mix compile 编译
  • iex -S mix 本地运行

轨迹页面

  • 入口:/routes/
  • 地图:OpenStreetMap
  • 数据来源:默认请求 /api/locations?date=YYYY-MM-DD

数据库迁移

  • 迁移脚本位于 migrations/
  • 在生产环境通过 GitHub Actions 执行,仅 main 分支生效
  • 需要配置 GitHub Secrets:NEON_DATABASE_URL

部署

  • 使用 Vercel 部署
  • 构建由 vercel.json 驱动,产物输出到 output/

环境变量

  • NEON_DATABASE_URL:生产数据库连接串,用于 GitHub Actions 迁移

Acknowledgement

Thanks to fly.io's post on SSG using Elixir for helping me getting started.

Implements By Jorin's personal blog.

License

Creative Commons Attribution-ShareAlike 3.0 Unported License

The content is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. The code is licensed under the MIT license.

About

个人博客

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors