Skip to content

fyodorio-closet/scully-blog

Repository files navigation

ScullyBlog

Draft steps to build the blog from scratch with Scully (Angular-based static site generator) using dynamic data from dev.to API. Based on this article and official docs.

  • npx -p @angular/cli@^9.0.0-rc ng new scully-blog --routing
  • cd scully-blog
  • ng add @scullyio/init
  • ng g @scullyio/init:blog
  • ng g m home --route=home --module=app-routing
  • configure routes, update home component (read more)
  • app.component.html should contain <router-outlet></router-outlet> (remove unnecessary code)
  • add dev.to API config properties to routes of scully.config.js (read more)
  • add HttpClientModule to imports of app.module.ts
  • add service to fetch post data for each post page
  • for development run npm start
  • for static site building
    • npm run build
    • npm run scully
    • npm run scully:serve or cd dist/static && npx http-server
  • probably, routing will not work with child routing modules - provide all the modules/components for app routes inside the parent one