~jpgleeson/piaine

ccce79d0621ae8d744cb9c4bb44cbd66bc4349e0 — jpgleeson 1 year, 4 months ago d651393
Static page creation.

Creation of non blog post pages, essentially just pages that don't get indexed by the blog index and live in the home directory. Currently no support for automatically adding those to an index so the links should be hard marked up in the index template or similar. This approach could also essentially work for a generic tag system for the posts with a little more work.
1 files changed, 13 insertions(+), 2 deletions(-)

M Program.cs
M Program.cs => Program.cs +13 -2
@@ 53,6 53,7 @@ namespace piaine
                    scanner.refreshSource(inputString);
                    parser.refreshTokens(scanner.scanTokens());
                    post.typeOfPage = pageType.staticpage;
                    Console.WriteLine("not a post");
                }
                else
                {


@@ 66,8 67,18 @@ namespace piaine

                outputStrings = parser.writeVariablesInSource(inputString, pageConsumer.variablesInPage);

                var outputFile = File.Create("output/posts/" + Path.GetFileNameWithoutExtension(s).Replace(' ', '_') + ".html");
                files[i] = new StreamWriter(outputFile);
                if (post.typeOfPage == pageType.post)
                {
                    var outputFile = File.Create("output/posts/" + Path.GetFileNameWithoutExtension(s).Replace(' ', '_') + ".html");
                    files[i] = new StreamWriter(outputFile);
                }
                else
                {
                    var outputFile = File.Create("output/" + Path.GetFileNameWithoutExtension(s).Replace(' ', '_') + ".html");
                    files[i] = new StreamWriter(outputFile);
                }
                
                

                foreach (string st in outputStrings)
                {