def METHOD_NAME(self):
    self.site.scan_posts()
    kw = {
        "translations": self.site.config['TRANSLATIONS'],
        "output_folder": self.site.config['OUTPUT_FOLDER'],
        "filters": self.site.config['FILTERS'],
        "timeline": self.site.timeline,
    }
    posts = self.site.timeline[:]
    dst_path = os.path.join(kw["output_folder"], "assets", "js",
                            "tipuesearch_content.js")
    def save_data():
        pages = []
        for lang in kw["translations"]:
            for post in posts:
                # Don't index drafts (Issue #387)
                if post.is_draft or post.is_private or post.publish_later:
                    continue
                text = post.text(lang, strip_html=True)
                text = text.replace('^', '')
                data = {}
                data["title"] = post.title(lang)
                data["text"] = text
                data["tags"] = ",".join(post.tags)
                data["url"] = post.permalink(lang, absolute=True)
                pages.append(data)
        output = json.dumps({"pages": pages}, indent=2)
        output = 'var tipuesearch = ' + output + ';'
        makedirs(os.path.dirname(dst_path))
        with codecs.open(dst_path, "wb+", "utf8") as fd:
            fd.write(output)
    task = {
        "basename": str(self.name),
        "name": dst_path,
        "targets": [dst_path],
        "actions": [(save_data, [])],
        'uptodate': [config_changed(kw)],
        'calc_dep': ['_scan_locs:sitemap']
    }
    yield apply_filters(task, kw['filters'])
    # Copy all the assets to the right places
    asset_folder = os.path.join(os.path.dirname(__file__), "files")
    for task in copy_tree(asset_folder, kw["output_folder"]):
        task["basename"] = str(self.name)
        yield apply_filters(task, kw['filters'])