From 7830e51a3b59be7b7e2e2420b318ee89e022a619 Mon Sep 17 00:00:00 2001 From: gniriki Date: Mon, 26 Jun 2017 20:02:14 +0200 Subject: [PATCH] Updated Wyam; switched to Wyam's Blog recipe --- Input/posts/Publishing-site-on-Amazon-S3.md | 4 + Input/posts/Setting-up-the-blog.md | 3 + README.md | 11 + config.wyam | 43 +--- input/404.cshtml | 13 - input/404.md | 4 + input/_Footer.cshtml | 39 +++ input/_Layout.cshtml | 233 ------------------ input/_PageLayout.cshtml | 0 input/_PostFooter.cshtml | 26 ++ input/_Scripts.cshtml | 17 ++ input/about.md | 3 + input/archive.cshtml | 38 --- input/blog.cshtml | 55 ----- input/games/_Layout.cshtml | 161 ++++++++++++ input/{ => games}/_ViewStart.cshtml | 0 input/games/rowchampion.cshtml | 20 +- input/index.cshtml | 52 ---- input/news-archive.cshtml | 33 --- input/news/Finished-creating-publish-blog.md | 7 - input/news/Row-Champion-Page-Created.md | 7 - input/news/Row-Champion-is-ready.md | 10 - input/news/_PostLayout.cshtml | 32 --- input/news/_ViewStart.cshtml | 3 - ...olving-artificial-networks-part-1.md.temp} | 0 ...olving-artificial-networks-part-2.md.temp} | 0 input/posts/Getting-More-Time.md | 2 + input/posts/Row-Champion-Retrospective.md | 2 + input/posts/_PostLayout.cshtml | 59 ----- input/posts/_ViewStart.cshtml | 3 - packages.xml | 138 +++++++++++ wyam.bat | 1 - 32 files changed, 420 insertions(+), 599 deletions(-) delete mode 100644 input/404.cshtml create mode 100644 input/404.md create mode 100644 input/_Footer.cshtml delete mode 100644 input/_Layout.cshtml create mode 100644 input/_PageLayout.cshtml create mode 100644 input/_PostFooter.cshtml create mode 100644 input/_Scripts.cshtml create mode 100644 input/about.md delete mode 100644 input/archive.cshtml delete mode 100644 input/blog.cshtml create mode 100644 input/games/_Layout.cshtml rename input/{ => games}/_ViewStart.cshtml (100%) delete mode 100644 input/index.cshtml delete mode 100644 input/news-archive.cshtml delete mode 100644 input/news/Finished-creating-publish-blog.md delete mode 100644 input/news/Row-Champion-Page-Created.md delete mode 100644 input/news/Row-Champion-is-ready.md delete mode 100644 input/news/_PostLayout.cshtml delete mode 100644 input/news/_ViewStart.cshtml rename input/posts/{Evolving-artificial-networks-part-1.md => Evolving-artificial-networks-part-1.md.temp} (100%) rename input/posts/{Evolving-artificial-networks-part-2.md => Evolving-artificial-networks-part-2.md.temp} (100%) delete mode 100644 input/posts/_PostLayout.cshtml delete mode 100644 input/posts/_ViewStart.cshtml create mode 100644 packages.xml delete mode 100644 wyam.bat diff --git a/Input/posts/Publishing-site-on-Amazon-S3.md b/Input/posts/Publishing-site-on-Amazon-S3.md index f1e6660..feec6ea 100644 --- a/Input/posts/Publishing-site-on-Amazon-S3.md +++ b/Input/posts/Publishing-site-on-Amazon-S3.md @@ -2,6 +2,10 @@ Published: 2016-02-11 Title: Publishing your static site on Amazon S3 Lead: So you've spent a lot of time to create a site or a blog. Now we need to publish it, so everybody can see it! Author: Bartosz +Tags: + - Amazon + - S3 + - Blog --- In my [last post](/posts/Setting-up-the-blog) I've covered creating a simple blog with [Wyam](http://wyam.io) static generator. For a site generated like diff --git a/Input/posts/Setting-up-the-blog.md b/Input/posts/Setting-up-the-blog.md index 13121ea..5469cc6 100644 --- a/Input/posts/Setting-up-the-blog.md +++ b/Input/posts/Setting-up-the-blog.md @@ -2,6 +2,9 @@ Published: 2016-02-06 Title: Setting up a blog with static page generator Lead: I've decided to start a blog so I can share with the dev community. What could be better for the first post subject then setting up the blog itself? Author: Bartosz +Tags: + - Wyam + - Blog --- As I started thinking about creating my own blog, the first question that popped up in my mind: where to host it? I've looked into diff --git a/README.md b/README.md index a102cd9..257f470 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,13 @@ # gniriki.com Gniriki.com website code + +Build site: +Clone the Wyam submodule: +git submodule init +git submodule update + +Build wyam +.\wyam\build + +Run wyam +.\wyam.bat diff --git a/config.wyam b/config.wyam index 6e89536..7f939e8 100644 --- a/config.wyam +++ b/config.wyam @@ -1,38 +1,7 @@ -Pipelines.Add("Posts", - ReadFiles(@"posts\*.md"), // Read all markdown files in the "posts" directory - FrontMatter(Yaml()), // Load any frontmatter and parse it as YAML markup - Markdown(), // Render the markdown content - Meta("Post", @doc.Content), // Move the markdown content to metadata - Concat( - ReadFiles(@"posts\*.cshtml").Where(x => Path.GetFileName(x)[0] != '_' && Path.GetFileName(x) != "index.cshtml"), - FrontMatter(Yaml()) - ), - Razor(), // Compile and render the page template - Excerpt(), - WriteFiles("") // Write the post file -); +#recipe Blog +#theme CleanBlog -Pipelines.Add("News", - ReadFiles(@"news\*.md"), // Read all markdown files in the "posts" directory - FrontMatter(Yaml()), // Load any frontmatter and parse it as YAML markup - Markdown(), // Render the markdown content - Meta("NewsContent", @doc.Content), - Razor(), - Excerpt() -); - -Pipelines.Add("Games", - ReadFiles(@"games\*.cshtml").Where(x => System.IO.Path.GetFileName(x)[0] != '_'), - Razor(), - WriteFiles("") -); - -Pipelines.Add("Home", - ReadFiles(@"*.cshtml").FromTopDirectoryOnly().Where(x => System.IO.Path.GetFileName(x)[0] != '_'), - Razor(), - WriteFiles("") -); - -Pipelines.Add("Resources", - CopyFiles("*").WithoutExtensions(".cshtml", ".md", ".less") -); \ No newline at end of file +Settings[Keys.Host] = "gniriki.com"; +Settings[BlogKeys.Title] = "Gniriki Games"; +Settings[BlogKeys.Description] = "Gniriki Games"; +Settings[BlogKeys.Intro] = "My name is Bartosz Borowiecki and I'm game and .NET developer. I created this blog to write about the things I'm creating and the things I learned, so others can benefit from it."; diff --git a/input/404.cshtml b/input/404.cshtml deleted file mode 100644 index 66c5405..0000000 --- a/input/404.cshtml +++ /dev/null @@ -1,13 +0,0 @@ -
-
-
-
-
-

404

-
- This is not the page you're looking for, move along -
-
-
-
-
\ No newline at end of file diff --git a/input/404.md b/input/404.md new file mode 100644 index 0000000..b35e492 --- /dev/null +++ b/input/404.md @@ -0,0 +1,4 @@ +Title: Page Not Found +ShowInNavbar: false +--- +# This is not the page you're looking for, move along \ No newline at end of file diff --git a/input/_Footer.cshtml b/input/_Footer.cshtml new file mode 100644 index 0000000..6232355 --- /dev/null +++ b/input/_Footer.cshtml @@ -0,0 +1,39 @@ +
+
+
+ + + +
+
+
\ No newline at end of file diff --git a/input/_Layout.cshtml b/input/_Layout.cshtml deleted file mode 100644 index 0aebfd3..0000000 --- a/input/_Layout.cshtml +++ /dev/null @@ -1,233 +0,0 @@ -@{ - var Title = Model.Get("Title", null); - var HasTitle = !string.IsNullOrEmpty(Title); -} - - - - - - - - - - - - - Gniriki@(HasTitle ? " - " + Title : "") - - - - - - - - - - - - - - - - - - - - - @RenderSection("Head",required:false) - - - - - - - - - - - - - - - - - - - - - - - - - - - @if(IsSectionDefined("Header")) - { - @RenderSection("Header") - } - else - { -
-

@Title

-
- } - - - @RenderBody() - -
- - - - - - - - - - - diff --git a/input/_PageLayout.cshtml b/input/_PageLayout.cshtml new file mode 100644 index 0000000..e69de29 diff --git a/input/_PostFooter.cshtml b/input/_PostFooter.cshtml new file mode 100644 index 0000000..0785d99 --- /dev/null +++ b/input/_PostFooter.cshtml @@ -0,0 +1,26 @@ +
+ + \ No newline at end of file diff --git a/input/_Scripts.cshtml b/input/_Scripts.cshtml new file mode 100644 index 0000000..5c8b9d3 --- /dev/null +++ b/input/_Scripts.cshtml @@ -0,0 +1,17 @@ + + \ No newline at end of file diff --git a/input/about.md b/input/about.md new file mode 100644 index 0000000..f5c9c9d --- /dev/null +++ b/input/about.md @@ -0,0 +1,3 @@ +Title: About Me +--- +I'm awesome! \ No newline at end of file diff --git a/input/archive.cshtml b/input/archive.cshtml deleted file mode 100644 index 66b1c45..0000000 --- a/input/archive.cshtml +++ /dev/null @@ -1,38 +0,0 @@ - - -
-
-
-
-
-

Archive

-
-
-
-
-
- -
-
-
- @foreach (var doc in Documents["Posts"] - .Where(x => x.ContainsKey("Published")) - .OrderByDescending(x => x.Get("Published"))) - { - -
- -

- @doc["Title"] -

-

- @doc["Lead"] -

-
- -
-
- } -
-
-
\ No newline at end of file diff --git a/input/blog.cshtml b/input/blog.cshtml deleted file mode 100644 index e254359..0000000 --- a/input/blog.cshtml +++ /dev/null @@ -1,55 +0,0 @@ - - -
-
-
-
-
-

Hello

-
- My name is Bartosz Borowiecki and I'm game and .NET developer. - I created this blog to write about the things I'm creating and the things I learned, so others can benefit from it. -
-
-
-
-
- -
-
-
- @foreach (var doc in Documents["Posts"] - .Where(x => x.ContainsKey("Published")) - .OrderByDescending(x => x.Get("Published")) - .Take(5)) - { - -
- -

- @doc["Title"] -

-

- @doc["Lead"] -

-
-

- @Html.Raw(doc.String("Excerpt")) -

- -
- } - @if(Documents["Posts"].Count() > 5) - { -
- - - } - -
-
-
\ No newline at end of file diff --git a/input/games/_Layout.cshtml b/input/games/_Layout.cshtml new file mode 100644 index 0000000..f6dcd59 --- /dev/null +++ b/input/games/_Layout.cshtml @@ -0,0 +1,161 @@ +@{ + string Title = Model.WithoutSettings.String(BlogKeys.Title); + string PageTitle = Context.String(BlogKeys.Title) + (string.IsNullOrWhiteSpace(Title) ? string.Empty : " - " + Title); +} + + + + + + + + @PageTitle + + + + @if (Context.String(BlogKeys.RssPath) != null) { + + } + @if (Context.String(BlogKeys.AtomPath) != null) { + + } + + + + + + + + + + + + + + + + + + + @* *@ + + + + + + + + + + + + + + + + + + + @Html.Partial("_Head") + + + + + + + + +
+
+
+ @RenderBody() +
+
+
+ +
+ + +
+ @Html.Partial("_Footer") +
+ + @Html.Partial("_Scripts") + + + + + + + diff --git a/input/_ViewStart.cshtml b/input/games/_ViewStart.cshtml similarity index 100% rename from input/_ViewStart.cshtml rename to input/games/_ViewStart.cshtml diff --git a/input/games/rowchampion.cshtml b/input/games/rowchampion.cshtml index 6448e27..da406df 100644 --- a/input/games/rowchampion.cshtml +++ b/input/games/rowchampion.cshtml @@ -1,7 +1,6 @@ -@section Head -{ - -} + + +
@@ -142,15 +141,4 @@ } -
- -@section Footer -{ -
-
-
- -
-
-
-} + \ No newline at end of file diff --git a/input/index.cshtml b/input/index.cshtml deleted file mode 100644 index 6d71938..0000000 --- a/input/index.cshtml +++ /dev/null @@ -1,52 +0,0 @@ -@{ - -} - - - -
-
-
-
-
-

Gniriki Games

-
- Welcome to my site! I hope you'll find something useful here. -
-
-
-
-
- -
-
-
-

News

- @foreach (var doc in Documents["News"] - .Where(x => x.ContainsKey("Published")) - .OrderByDescending(x => x.Get("Published")) - .Take(5)) - { -
- -

- @doc["Title"] -

-

- @Html.Raw(doc.String("Excerpt")) -

- } - @if(Documents["News"].Count() > 5) - { -
- - - } - -
-
-
\ No newline at end of file diff --git a/input/news-archive.cshtml b/input/news-archive.cshtml deleted file mode 100644 index f5497ee..0000000 --- a/input/news-archive.cshtml +++ /dev/null @@ -1,33 +0,0 @@ - - -
-
-
-
-
-

Archive

-
-
-
-
-
- -
-
-
- @foreach (var doc in Documents["News"] - .Where(x => x.ContainsKey("Published")) - .OrderByDescending(x => x.Get("Published"))) - { -
- -

- @doc["Title"] -

-

- @Html.Raw(doc.String("Excerpt")) -

- } -
-
-
\ No newline at end of file diff --git a/input/news/Finished-creating-publish-blog.md b/input/news/Finished-creating-publish-blog.md deleted file mode 100644 index 9c78fbf..0000000 --- a/input/news/Finished-creating-publish-blog.md +++ /dev/null @@ -1,7 +0,0 @@ -Published: 2016-02-11 -Title: Hello world! -Author: Bartosz ---- - -After deciding that it would be nice to have a site and a blog I needed an idea for the first post. What could be better than a post -about creating the blog? [Here is the first post](/posts/Setting-up-the-blog) in my two-part "series" on creating your ow blog with Wyam. \ No newline at end of file diff --git a/input/news/Row-Champion-Page-Created.md b/input/news/Row-Champion-Page-Created.md deleted file mode 100644 index f84c468..0000000 --- a/input/news/Row-Champion-Page-Created.md +++ /dev/null @@ -1,7 +0,0 @@ -Published: 2016-03-20 -Title: Row Champion finally has its own page! -Author: Bartosz ---- - -I've been developing Row Champion for Android for some time already and I've finally created -a page for it. It's a bit rough around the edges, but [check it out](/games/rowchampion) anyway! \ No newline at end of file diff --git a/input/news/Row-Champion-is-ready.md b/input/news/Row-Champion-is-ready.md deleted file mode 100644 index 542c8d5..0000000 --- a/input/news/Row-Champion-is-ready.md +++ /dev/null @@ -1,10 +0,0 @@ -Published: 2017-03-17 -Title: Row Champion is ready! -Author: Bartosz ---- - -Finally! After a lot of sweat and tears, my a-bit-too-long project is done! -Check out [the RC's site](/games/rowchampion) and my [blog post](/posts/Row-Champion-Retrospective) about working on it. -But first and foremost, - -[get it from google play](https://play.google.com/store/apps/details?id=com.Gniriki.RowChampion&referrer=utm_source%3DRowChampionWebSite%26utm_medium%3DNews)! diff --git a/input/news/_PostLayout.cshtml b/input/news/_PostLayout.cshtml deleted file mode 100644 index 314e794..0000000 --- a/input/news/_PostLayout.cshtml +++ /dev/null @@ -1,32 +0,0 @@ -@{ - Layout = "_Layout.cshtml"; -} - -@section Header -{ - - -
-
-
-
-
-

@Metadata["Title"]

- - Posted on @Metadata["Published"] -
-
-
-
-
-} - -
-
-
-
- @RenderBody() -
-
-
-
\ No newline at end of file diff --git a/input/news/_ViewStart.cshtml b/input/news/_ViewStart.cshtml deleted file mode 100644 index 40092d3..0000000 --- a/input/news/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_PostLayout.cshtml"; -} \ No newline at end of file diff --git a/input/posts/Evolving-artificial-networks-part-1.md b/input/posts/Evolving-artificial-networks-part-1.md.temp similarity index 100% rename from input/posts/Evolving-artificial-networks-part-1.md rename to input/posts/Evolving-artificial-networks-part-1.md.temp diff --git a/input/posts/Evolving-artificial-networks-part-2.md b/input/posts/Evolving-artificial-networks-part-2.md.temp similarity index 100% rename from input/posts/Evolving-artificial-networks-part-2.md rename to input/posts/Evolving-artificial-networks-part-2.md.temp diff --git a/input/posts/Getting-More-Time.md b/input/posts/Getting-More-Time.md index f3cd805..52d807a 100644 --- a/input/posts/Getting-More-Time.md +++ b/input/posts/Getting-More-Time.md @@ -2,6 +2,8 @@ Published: 2016-10-04 Title: Getting more time for my projects Lead: One of the biggest obstacles when creating a game is having too little resources. If you work a 9-5 job, you'll have little time left for your projects. If you don't, your savings will deplete really fast. Author: Bartosz +Tags: + - Freelancing --- [Row Champion](/games/rowchampion) was supposed to be a quick, 3 months long project. It's been almost 2 years now in the making. The thing is, according to my notes, I've worked on it only for about 300 hours, so around 2 months... had I worked on it 9-5. I would like to support myself with game dev someday so I need to get more games out and create a name for myself. These numbers don't predict that happening anytime soon. Between my 9-5 job, family and life, there is just too little time to do something meaningful. diff --git a/input/posts/Row-Champion-Retrospective.md b/input/posts/Row-Champion-Retrospective.md index 60cadbd..d92d248 100644 --- a/input/posts/Row-Champion-Retrospective.md +++ b/input/posts/Row-Champion-Retrospective.md @@ -2,6 +2,8 @@ Published: 2017-03-17 Title: Row Champion Retrospective Lead: Row Champion is finally complete, so it's time to do some self-examination Author: Bartosz +Tags: + - Games --- It supposed to be a short, simple project. That was what I've planned, especially after my previous this-takes-so-long-that-I-already-hate-it diff --git a/input/posts/_PostLayout.cshtml b/input/posts/_PostLayout.cshtml deleted file mode 100644 index df86d36..0000000 --- a/input/posts/_PostLayout.cshtml +++ /dev/null @@ -1,59 +0,0 @@ -@{ - Layout = "_Layout.cshtml"; - var Title = Model.String("Title"); - var Page = System.IO.Path.GetFileNameWithoutExtension(Model.String("RelativeFilePath")); -} - -@section Header -{ - - -
-
-
-
-
-

@Metadata["Title"]

-

@Metadata["Lead"]

- - Posted on @Metadata["Published"] -
-
-
-
-
-} - -
-
-
-
- @RenderBody() -
-
-
-
-
-
- - - \ No newline at end of file diff --git a/input/posts/_ViewStart.cshtml b/input/posts/_ViewStart.cshtml deleted file mode 100644 index 40092d3..0000000 --- a/input/posts/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_PostLayout.cshtml"; -} \ No newline at end of file diff --git a/packages.xml b/packages.xml new file mode 100644 index 0000000..a538a1a --- /dev/null +++ b/packages.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wyam.bat b/wyam.bat deleted file mode 100644 index ebda54d..0000000 --- a/wyam.bat +++ /dev/null @@ -1 +0,0 @@ -.\Wyam\build\0.11.2-beta\bin\wyam.exe --preview --watch \ No newline at end of file