Ejemplo n.º 1
0
 public Html Generate(Site site, Page page)
 {
     var t = new TemplateInstance(this);
     t.LastModified = page.LastModified;
     t["title"] = page.Title;
     t["contents"] = Html.Raw(Generator.Markdown.Transform(page.Content));
     return t.ToHtml();
 }
Ejemplo n.º 2
0
 public TemplateInstance Create(Site site)
 {
     var t = new TemplateInstance(this);
     t.LastModified = site.LastModified;
     t["site:path"] = site.UrlPath;
     t["site:title"] = site.Title;
     return t;
 }
Ejemplo n.º 3
0
        public Html Generate(Site site, Page page)
        {
            var t = new TemplateInstance(this);

            t.LastModified = page.LastModified;
            t["title"]     = page.Title;
            t["contents"]  = Html.Raw(Markdown.ToHtml(page.Content, Context.Pipeline));
            return(t.ToHtml());
        }
Ejemplo n.º 4
0
        public Html Generate(Site site, Page page)
        {
            var t = new TemplateInstance(this);

            t.LastModified = page.LastModified;
            t["title"]     = page.Title;
            t["contents"]  = Html.Raw(Generator.Markdown.Transform(page.Content));
            return(t.ToHtml());
        }
Ejemplo n.º 5
0
        public TemplateInstance Create(Site site)
        {
            var t = new TemplateInstance(this);

            t.LastModified  = site.LastModified;
            t["site:path"]  = site.UrlPath;
            t["site:title"] = site.Title;
            return(t);
        }
Ejemplo n.º 6
0
 public void Generate(Html entries, string path)
 {
     var t = new TemplateInstance(this);
     t.LastModified = site.LastModified;
     t["title"] = site.Title;
     t["url"] = site.URL;
     t["updated"] = t.LastModified.ToUniversalTime().ToString(@"yyyy-MM-dd\THH:mm:ss\Z");
     t["entries"] = entries;
     t.Write(path);
 }
Ejemplo n.º 7
0
        public void Generate(Html entries, string path)
        {
            var t = new TemplateInstance(this);

            t.LastModified = Context.Site.LastModified;
            t["title"]     = Context.Site.Title;
            t["url"]       = Context.Site.URL;
            t["updated"]   = t.LastModified.ToUniversalTime().ToString(@"yyyy-MM-dd\THH:mm:ss\Z");
            t["entries"]   = entries;
            t.Write(path);
        }
Ejemplo n.º 8
0
 public Html Generate(Site site, Post post)
 {
     var t = new TemplateInstance(this);
     t.LastModified = post.LastModified;
     t["title"] = post.Title;
     t["author"] = post.Author;
     t["url"] = site.URL + post.Path;
     t["updated"] = post.LastModified.ToUniversalTime().ToString("yyyy-MM-dd\\THH:mm:ss\\Z");
     t["excerpt"] = Generator.Markdown.Transform(post.ExcerptMarkdown).Trim();
     t["content"] = Generator.Markdown.Transform(post.Content).Trim();
     return t.ToHtml();
 }
Ejemplo n.º 9
0
        public Html Generate(Site site, Post post)
        {
            var t = new TemplateInstance(this);

            t.LastModified = post.LastModified;
            t["title"]     = post.Title;
            t["author"]    = post.Author;
            t["url"]       = site.URL + post.Path;
            t["updated"]   = post.LastModified.ToUniversalTime().ToString("yyyy-MM-dd\\THH:mm:ss\\Z");
            t["excerpt"]   = Generator.Markdown.Transform(post.ExcerptMarkdown).Trim();
            t["content"]   = Generator.Markdown.Transform(post.Content).Trim();
            return(t.ToHtml());
        }
Ejemplo n.º 10
0
 public Html Generate(Site site, Post post)
 {
     var t = new TemplateInstance(this);
     t.LastModified = post.LastModified;
     t["title"] = post.Title;
     t["gmdate"] = post.Date.ToUniversalTime().ToString("yyyy-MM-dd\\THH:mm:ss\\Z");
     t["longdate"] = post.Date.ToString("ddd dd MMM yyyy");
     t["monthyear"] = post.Date.ToString("MMM yyyy");
     t["updated"] = post.LastModified.ToString("ddd dd MMM yyyy");
     t["url"] = site.UrlPath + post.Path;
     t["excerpt"] = Html.Raw(Generator.Markdown.Transform(post.ExcerptMarkdown));
     t["title"] = post.Title;
     return t.ToHtml();
 }
Ejemplo n.º 11
0
        public Html Generate(Site site, Post post)
        {
            var t = new TemplateInstance(this);

            t.LastModified = post.LastModified;
            t["title"]     = post.Title;
            t["gmdate"]    = post.Date.ToUniversalTime().ToString("yyyy-MM-dd\\THH:mm:ss\\Z");
            t["longdate"]  = post.Date.ToString("ddd dd MMM yyyy");
            t["monthyear"] = post.Date.ToString("MMM yyyy");
            t["updated"]   = post.LastModified.ToString("ddd dd MMM yyyy");
            t["url"]       = site.UrlPath + post.Path;
            t["excerpt"]   = Html.Raw(Markdown.ToHtml(post.ExcerptMarkdown, Context.Pipeline));
            t["title"]     = post.Title;
            return(t.ToHtml());
        }
Ejemplo n.º 12
0
        public Html Generate(Site site, Post post)
        {
            var t = new TemplateInstance(this);

            t.LastModified = post.LastModified;
            t["title"]     = post.Title;
            t["author"]    = post.Author;
            t["gmdate"]    = post.Date.ToUniversalTime().ToString("yyyy-MM-dd\\THH:mm:ss\\Z");
            t["longdate"]  = post.Date.ToString("ddd dd MMM yyyy");
            t["monthyear"] = post.Date.ToString("MMM yyyy");
            t["updated"]   = post.LastModified.ToString("ddd dd MMM yyyy");
            t["url"]       = site.UrlPath + post.Path;
            t["site:path"] = site.UrlPath;
            t["contents"]  = Html.Raw(Generator.Markdown.Transform(post.Content));
            return(t.ToHtml());
        }