function getSource($name)
    {
        if (isset($this->site->pages[$name])) {
            $content = $this->site->pages[$name];
        }
        else {
            throw new \Exception("Cannot find content \"$name\".");
        }

        if (!$content->template) {
            throw new \Exception("Content does not have a template");
        }

        if ($content->template !== 'none') {
            $block = 'content';

            // Custom Block?
            if (strpos($content->template, '::') !== false) {
                list($content->template, $block) = explode('::', $content->template);
            }

            // Create template content
            $template = "{% extends \"$content->template\" %}";
            $template .= "{% block $block %}";
            $template .= $content->content;
            $template .= "{% endblock %}";
        }
        else {
            $template = $content->content;
        }

        return $template;
    }