AcyOrt process data step after step, you can hook and modify data after some steps.

Here are steps you can hook.

Support list

after_init

Executed after AcyOrt initialize

acyort.filter.register('after_init', function() {
  // ...
})

after_fetch

Executed after getting issues data form GitHub

acyort.filter.register('after_fetch', function(data) {
  // data is array of github issues data
  // ...
})

after_process

Executed after processing the posts data

acyort.filter.register('after_process', function(data) {
/*
{
  posts: [...],
  pages: [...],
  categories: [...],
  tags: [...],
  index: [...],
  category: {
    ...: [...]
  },
  tag: {
    ...: [...]
  }
}
*/
})

after_build

Executed after generating the static files

acyort.filter.register('after_build', function(data) {
/*
{
  posts: [...],
  pages: [...],
  categories: [...],
  tags: [...],
  index: [...],
  category: {
    ...: [...]
  },
  tag: {
    ...: [...]
  }
}
*/
})

Promise use

Filters support Promise

acyort.filter.register('after_init', function() {
  return new Promise((resolve) => {
    // ...
    setTimeout(resolve, 1000)
  })
})