Render this page and return the rendition.

        Converts the markdown content to html, and then renders the
        (mako) template specified in the config, using that html.

        The task of writing of the rendition to a real file is
        responsibility of the generate method.

def render(self):
        """Render this page and return the rendition.

        Converts the markdown content to html, and then renders the
        (mako) template specified in the config, using that html.

        The task of writing of the rendition to a real file is
        responsibility of the generate method.

        """
        (pthemedir, ptemplatefname) = self._theme_and_template_fp()

        mylookup = TemplateLookup(directories=[self.site.dirs['s2'], pthemedir], input_encoding='utf-8', output_encoding='utf-8')


        makotemplate = Template(filename=ptemplatefname, lookup=mylookup,
                                module_directory=self.site._makodir)

        # I don't really need to use the meta extension here, because I render self._content (has no metadata)
        #page_html = markdown.markdown(self._content)

        md = markdown.Markdown(extensions=['meta','fenced_code', 'codehilite'],output_format="html5")
        page_html = md.convert(self._content)   # need to trigger the conversion to obtain md.Meta

        # We assume that the page is always in a dir one level below www
        themepath = "../themes/" + os.path.split(pthemedir)[1] + '/'
        commonpath = "../common/"

        # HERE I'll pass the config variable to the mako template, so I can use the title etc.
        #buf = StringIO()
        #ctx = Context(buf, dict(pageContent=page_html, isFrontPage=False, themePath=themepath, pageTitle='pedo',
        #                        commonPath=commonpath))
        #makotemplate.render_context(ctx)
        #rendition = buf.getvalue()

        # IS THERE `PIWIK CODE?
        # IS THERE DISQUS CODE?
        # READ from s2 if there's disqus_code.html.tpl and piwik_code.html.tpl
        # if there's piwik, just define the variable piwik_code with its contents
        # if there's disqus... nested render?
        # HERE I NEED TO DIRECTLY INCLUDE A TEMPLATE IN ANOTHER TEMPLATE!!! MAKO!
        #d_sn = self.site.site_config['disqus_shortname']
        #if d_sn:   # the site uses disqus
        piwik_code = None
        disqus_code, disqus_shortname, disqus_identifier, disqus_title, disqus_url= None, None, None, None, None

        piwik_code_tpl = os.path.join(self.site.dirs['s2'],'piwik_code.html.tpl')
        if os.path.isfile(piwik_code_tpl):
            piwik_code = '/piwik_code.html.tpl'

        disqus_code_tpl = os.path.join(self.site.dirs['s2'],'disqus_code.html.tpl')
        if os.path.isfile(disqus_code_tpl):
            disqus_code = '/disqus_code.html.tpl'
            disqus_shortname = self.site.site_config['disqus_shortname']
            disqus_identifier = self._config['page_id'][0]
            disqus_title = self.title
            disqus_url = os.path.join(self.site.site_config['site_url'],self._slug)

        rendition = makotemplate.render(pageContent=page_html,isFrontPage=False,
                                        themePath=themepath,
                                        commonPath=commonpath,
                                        pageTitle=self.title,
                                        piwik_code=piwik_code,
                                        disqus_code=disqus_code,
                                        disqus_shortname = disqus_shortname,
                                        disqus_identifier = disqus_identifier,
                                        disqus_url = disqus_url,
                                        disqus_title= disqus_title)
        return rendition