Skip to content

winebarrel/esaop

Repository files navigation

esaop

A web application that redirects human-readable URLs to esa.io posts.

Getting Started

  1. Register your aplication. see the documentation
    • Redirect URL: http://[team].esa.io/auth/callback
  2. Write esaop.toml
    cp esaop.toml.sample esaop.toml
    vi esaop.toml
  3. Run esaop
  4. Open http://localhost:8080/foo/bar/zoo

Redirect Rules

  • http://your-esaop.example.com/foo/bar/zoo
    • Post exists:
    • -> https://[team].esa.io/posts/[post num]
    • Post does not exist:
    • -> https://[team].esa.io/posts/posts/new?category_path=%2Ffoo%2Fbar%2Fzoo
  • http://your-esaop.example.com/foo/
    • -> https://[team].esa.io/#path=%2Ffoo

Use Date/CRON expression

Access date: 2022/03/21

  • http://your-esaop.example.com/Diary/${yyyy/MM/dd}
    • -> Path: Diary/2022/03/21
  • http://your-esaop.example.com/WeeklyMTG/${*,*,*,*,5|yyyy/MM/dd}
    • -> Path: WeeklyMTG/2022/03/25
  • http://your-esaop.example.com/MonthlyMTG/${*,*,1,*,*|yyyy/MM/dd}
    • -> Path: MonthlyMTG/2022/04/01