```ruby
class Links::PagesController < PagesController
  def index
    pages  = Comfy::Cms::Page.includes(:site).published.filter(params.slice(:category))
    pages  = Comfy::Cms::Search.new(pages, params[:search]).results if params[:search].present?

    @pages = PageMirror.collect(pages)
  end
end
```

Return anything but unpublished articles through the article link search api
user
```ruby
class Links::PagesController < PagesController
  def index
    pages  = Comfy::Cms::Page.includes(:site).where('state != ?', 'unpublished').filter(params.slice(:category))
    pages  = Comfy::Cms::Search.new(pages, params[:search]).results if params[:search].present?

    @pages = PageMirror.collect(pages)
  end
end
```
assistant