Exemple #1
0
        public void Start()
        {
            var store = Engine.App.Store;

            var pageSize   = Engine.App.Config.Get <int>("site.pagination.pageSize");
            var totalPages = (int)System.Math.Ceiling((double)this.Posts.Count / pageSize);

            PaginationRenderer.Render(Model, Posts, totalPages, outputDir, pageSize);
        }
Exemple #2
0
        public void Start()
        {
            var store = Engine.App.Store;

            var pageSize   = Engine.App.Config.Get <int>("site.pagination.pageSize");
            var totalPages = (int)System.Math.Ceiling((double)store.PostModels.Count / pageSize);


            var rawFilePath = Engine.App.Store.ThemeDir + $"/index.html";
            var indexModel  = Converter.MappingToScriptObject(Parser.ExtractMeta(rawFilePath));

            PaginationRenderer.Render(indexModel, store.PostModels, totalPages, store.OutputDir, pageSize);
        }