Ejemplo n.º 1
0
 def run(self):
     """run the plugin"""
     for current in self.generate:
         co = ContentObject()
         title = self.generate[current][0]
         menu = self.generate[current][1]
         co.add_meta(title, current, menu)
         prepare(co, self.site)
         self.site.content.append(co)
Ejemplo n.º 2
0
    def run(self):
        """run the plugin"""
        for current in self.site.content:
            if "tags" in current.meta:
                for tag in current.meta['tags']:
                    if not tag in self.tags:
                        self.tags[tag] = []
                    self.tags[tag].append(current)

        for name in self.tags:
            cobj = ContentObject()
            title = name
            menu = False
            cobj.add_meta(title, 'tags', menu)
            cobj.tags = self.tags[name]
            prepare(cobj, self.site)
            self.site.content.append(cobj)
            self.site.tags[name] = cobj.url