diff --git a/_data/bestof_articles.json b/_data/bestof_articles.json index 7e148faa..71e20653 100644 --- a/_data/bestof_articles.json +++ b/_data/bestof_articles.json @@ -1,8 +1,35 @@ { "title": "Best Articles I've Written", + "description": "The articles I prefer the most for the ones I've written on my blog.", "content": [{ - "title": "Still Empty", - "description": "", - "id": "StillEmpty" - }] + "title": "Unity Rotate Around", + "description": "", + "url": "/unity-rotate-around", + "id": "unity-rotate-around" + }, + { + "title": "Free My Desktop", + "description": "", + "url": "/Free-my-desktop-mac-app", + "id": "Free-my-desktop-mac-app" + }, + { + "title": "Unity Tilemap Procedural Generation", + "description": "", + "url": "/unity-tilemaps-and-procedural-generation", + "id": "unity-tilemaps-and-procedural-generation" + }, + { + "title": "Android Kiosk App", + "description": "", + "url": "/Android-Kiosk-App", + "id": "Android-Kiosk-App" + }, + { + "title": "Reactive Data Streams Using SwiftUI And Combine", + "description": "", + "url": "/Reactive-Data-Streams-Using-Swift-UI-And-Combine", + "id": "Reactive-Data-Streams-Using-Swift-UI-And-Combine" + } + ] } \ No newline at end of file diff --git a/_data/bestof_blogs.json b/_data/bestof_blogs.json index a6d17d5e..30768e83 100644 --- a/_data/bestof_blogs.json +++ b/_data/bestof_blogs.json @@ -1,8 +1,10 @@ { "title": "Best Blogs", + "description": "", "content": [{ - "title": "Still Empty", + "title": "Swift By Sundell", "description": "", - "id": "StillEmpty" - }] -} \ No newline at end of file + "id": "SwiftBySundell" + } + ] +} diff --git a/_data/bestof_books.json b/_data/bestof_books.json index 3073f49b..f8441e09 100644 --- a/_data/bestof_books.json +++ b/_data/bestof_books.json @@ -1,8 +1,35 @@ { "title": "Best Books", + "description": "", "content": [{ - "title": "Still Empty", + "title": "Oathbringer by Brandon Sanderson", "description": "", - "id": "StillEmpty" - }] -} \ No newline at end of file + "id": "Oathbringer" + }, + { + "title": "Mistborn by Brandon Sanderson", + "description": "", + "id": "Mistborn" + }, + { + "title": "A Dance With Dragons by George R R Martin", + "description": "", + "id": "ADanceWithDragons" + }, + { + "title": "Lord Of The Rings by J R R Tolkien", + "description": "", + "id": "LordOfTheRings" + }, + { + "title": "Mass Effect by Drew Karpyshyn", + "description": "", + "id": "MassEffect" + }, + { + "title": "Shannara by Terry Brooks", + "description": "", + "id": "Shannara" + } + ] +} diff --git a/_data/bestof_courses.json b/_data/bestof_courses.json index c3821b29..94df50f2 100644 --- a/_data/bestof_courses.json +++ b/_data/bestof_courses.json @@ -1,5 +1,6 @@ { "title": "Best Courses", + "description": "", "content": [{ "title": "Still Empty", "description": "", diff --git a/_data/bestof_movies.json b/_data/bestof_movies.json index 466eacf5..a6dfd5ff 100644 --- a/_data/bestof_movies.json +++ b/_data/bestof_movies.json @@ -1,8 +1,25 @@ { "title": "Best Movies", + "description": "", "content": [{ - "title": "Still Empty", + "title": "Lord Of The Rings 1-2-3", "description": "", "id": "StillEmpty" - }] -} \ No newline at end of file + }, + { + "title": "Star Wars 1-6", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Jurassic Park", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Terminator 1-2", + "description": "", + "id": "StillEmpty" + } + ] +} diff --git a/_data/bestof_music.json b/_data/bestof_music.json index 1c39fadd..bd2c35bf 100644 --- a/_data/bestof_music.json +++ b/_data/bestof_music.json @@ -1,5 +1,6 @@ { "title": "Best Music", + "description": "For now this is limited to Rock music since it's the kind of music I know most.", "content": [{ "title": "The Black Parade", "description": "My Chemical Romance", diff --git a/_data/bestof_podcasts.json b/_data/bestof_podcasts.json index e3aaf94f..ebe42840 100644 --- a/_data/bestof_podcasts.json +++ b/_data/bestof_podcasts.json @@ -1,8 +1,40 @@ { "title": "Best Podcasts", + "description": "", "content": [{ - "title": "Still Empty", - "description": "", + "title": "Rework", + "description": "by Basecamp", + "id": "Rework" + }, + { + "title": "Build And Analyze [RETIRED]", + "description": "with Marco Arment", + "id": "BuildAndAnalyze" + }, + { + "title": "Hypercritical [RETIRED]", + "description": "with John Siracusa", + "id": "Hypercritical" + }, + { + "title": "??", + "description": "About Health", "id": "StillEmpty" - }] -} \ No newline at end of file + }, + { + "title": "Under The Radar", + "description": "with David Smith and Marco Arment", + "id": "UnderTheRadar" + }, + { + "title": "Developing Perspective [RETIRED]", + "description": "with David Smith", + "id": "DevelopingPerspective" + }, + { + "title": "Accidental Tech Podcast", + "description": "with Marco Arment, Casey Liss and John Siracusa", + "id": "ATP" + } +] +} diff --git a/_data/bestof_subreddits.json b/_data/bestof_subreddits.json index 5f9e99ad..0b7bfa04 100644 --- a/_data/bestof_subreddits.json +++ b/_data/bestof_subreddits.json @@ -1,8 +1,30 @@ { "title": "Best Subreddits", + "description": "", "content": [{ - "title": "Still Empty", + "title": "AskReddit", "description": "", "id": "StillEmpty" - }] -} \ No newline at end of file + },{ + "title": "europe", + "description": "", + "id": "StillEmpty" + },{ + "title": "programming", + "description": "", + "id": "StillEmpty" + },{ + "title": "personalfinance", + "description": "", + "id": "StillEmpty" + },{ + "title": "todayilearned", + "description": "", + "id": "StillEmpty" + },{ + "title": "WritingPrompts", + "description": "", + "id": "StillEmpty" + } +] +} diff --git a/_data/bestof_tvseries.json b/_data/bestof_tvseries.json index f7c6df92..07c7f86d 100644 --- a/_data/bestof_tvseries.json +++ b/_data/bestof_tvseries.json @@ -1,8 +1,45 @@ { "title": "Best TV Series", + "description": "", "content": [{ - "title": "Still Empty", + "title": "Expanse", "description": "", "id": "StillEmpty" - }] -} \ No newline at end of file + }, + { + "title": "Game Of Thrones Season 1-5", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Westworld", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Breaking Bad", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Better Call Saul", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Grand Tour", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Black Mirror Season 1-2", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Chernobyl", + "description": "You should also listen to the companion podcast", + "id": "StillEmpty" + } +] +} diff --git a/_data/bestof_videoGames.json b/_data/bestof_videoGames.json index 175103b6..185f9c59 100644 --- a/_data/bestof_videoGames.json +++ b/_data/bestof_videoGames.json @@ -1,8 +1,50 @@ { "title": "Best Video Games", + "description": "", "content": [{ - "title": "Still Empty", + "title": "Star Wars KOTOR 1-2", "description": "", "id": "StillEmpty" - }] -} \ No newline at end of file + }, + { + "title": "Command And Conquer 3 Tiberium Wars", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Age Of Empires 2", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Lord Of The Rings Battle For Middle Earth 2", + "description": "", + "id": "StillEmpty" + }, + { + "title": "The Elder Scroll IV Oblivion", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Star Wars The Old Republic", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Guild Wars 2", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Star Wars Empire At War", + "description": "", + "id": "StillEmpty" + }, + { + "title": "Mafia", + "description": "", + "id": "StillEmpty" + } +] +} diff --git a/_data/bestof_youtube.json b/_data/bestof_youtube.json index 9ba7bc07..832116a7 100644 --- a/_data/bestof_youtube.json +++ b/_data/bestof_youtube.json @@ -1,8 +1,30 @@ { "title": "Best Youtube Channels", + "description": "", "content": [{ - "title": "Still Empty", + "title": "Handmade Hero by Casey Muratori", + "description": "RPG made from scratch (including the engine) with every step clearly explained", + "url": "https://www.youtube.com/channel/UCbGQAz4nL_P2Em5p8KPDFIA", + "id": "StillEmpty" + },{ + "title": "Game Maker's Toolkit", "description": "", + "url": "https://www.youtube.com/channel/UCqJ-Xo29CKyLTjn6z2XwYAw", + "id": "StillEmpty" + },{ + "title": "Kurzgesagt – In a Nutshell", + "description": "Perfectly animated science videos (mostly about space, but not necessarely)", + "url": "https://www.youtube.com/channel/UCsXVk37bltHxD1rDPwtNM8Q", + "id": "StillEmpty" + },{ + "title": "Sebastian Lague", + "description": "Unity game development and algorithms", + "url": "https://www.youtube.com/channel/UCmtyQOKKmrMVaKuRXz02jbQ", + "id": "StillEmpty" + },{ + "title": "Veritasium", + "description": "Science videos", + "url": "https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA", "id": "StillEmpty" }] -} \ No newline at end of file +} diff --git a/_posts/2019-09-27-Reactive-Data-Streams-Using-Swift UI And Combine.md b/_posts/2019-09-27-Reactive-Data-Streams-Using-Swift UI And Combine.md index 3a50ef46..3baaa7ff 100644 --- a/_posts/2019-09-27-Reactive-Data-Streams-Using-Swift UI And Combine.md +++ b/_posts/2019-09-27-Reactive-Data-Streams-Using-Swift UI And Combine.md @@ -27,7 +27,7 @@ struct PriceViewModel { Next we create our container object (manager) to handle persistance/networking and to load out model and make it available to the view. Remember to import Combine and to have your container implement the ObservableObject protocol to be able to use combine automatically: -''' +``` import Foundation import Combine @@ -50,13 +50,13 @@ class PricePresenter: ObservableObject { } } -''' +``` You also need to annotate the model with the @Published keyboard. This will tell Combine to automatically setup the stream for us. Finally it is time to hook up the view. Since our model is optional we need to handle the initial empty state. I haven't found a great way to do it yet, there are a few methods, but all of them are not great. Hopefully Apple is going to introduce support for `if let` statements inside the body of a `View` soon enough. For now we have to use map that filters out the optionals, this way you can also set a default value. -''' +``` import SwiftUI struct PriceView: View { @@ -68,7 +68,7 @@ struct PriceView: View { } } -''' +``` Note: In this case we are returning the same view from both cases (a Text), if we would have returned different kind of views we would have needed to cast them to AnyView before returning them, otherwise the return type would not match. diff --git a/_posts/2019-10-07-Best-Of.md b/_posts/2019-10-07-Best-Of.md index 910dc8f4..778bd710 100644 --- a/_posts/2019-10-07-Best-Of.md +++ b/_posts/2019-10-07-Best-Of.md @@ -27,14 +27,18 @@ I've also tried going the collection route with no success. Collections in Jekyl After a lot more digging it seems that the solution would be to combine both methods. Having a collection for the best of while using a plugin to generate the necessary files from the json. There is still a big unaddressed problem with this approach though, all plugins that I found cannot dynamically access the filesystem so you need to tell them for each json file to use as source their specific filename to be able to access it. I would much rather have a folder instead and everything dropped there would be generated. +Edit: [In the end I've done something similar to what I've described in this article][5] with the only difference being that Best Of generates multiple pages while the book generates one page. + [1]: /bestof [2]: {% post_url 2019-01-06-site-and-wiki %} [3]: /bestof/books [4]: http://www.jekyll-plugins.com/plugins/jekyll-datapage_gen -[1]: http://www.valentinourbano.com/bestof + + +[5]: {% post_url 2019-12-22-Using-Jekyll-Collections-To-Setup-A-Book-Page %} [^1]: As a tribute to the series I've included a section about reddit as well. diff --git a/_posts/2019-12-22-Using-Jekyll-Collections-To-Setup-A-Book-Page.md b/_posts/2019-12-22-Using-Jekyll-Collections-To-Setup-A-Book-Page.md new file mode 100644 index 00000000..1a375770 --- /dev/null +++ b/_posts/2019-12-22-Using-Jekyll-Collections-To-Setup-A-Book-Page.md @@ -0,0 +1,181 @@ +--- +layout: post +title: Using Jekyll Collections To Setup a Book Page For Your Blog +date: 2019-12-22 20:28:05.000000000 +01:00 +type: post +published: true +status: publish +categories: [Writing] +image: +image2: +author: Valentino Urbano +--- + +[For more context read "The Road To Publish My Short ebook" before reading this article][1] + +I wanted to use a clean design for the book page. When you're reading anything long form the main focus should be the text without anything that distracts from reading itself. On top of that the design needed to look like a book and not just a simple long blog post. I went through a look of themes designed for books using different engines before deciding on one. Make sure you actually try the theme with your own content before deciding what to use. + +*The theme for the book page is taken from the [Book Hamilton][2] template on Github.* + +The theme has been slightly edited, but it is mostly as is. It will create a neat book layout from your markdown files, taking care of chapters automatically. You only need to provide an .md file for each chapter. + +To start setting up the theme copy the css and js files from the Book Hamilton Github repository and import them in your project or existing website. You can look how it is done by going to the [js and css directories][3] of the website. + +To set up the content for it you need to add a new collection to the Jekyll configuration (by editing your config.yaml file). Add: + +``` +collections: + book-wordpress-to-jekyll: + output: true +``` + +Change `book-wordpress-to-jekyll` to the name of the folder that includes all the markdown files necessary to generate the book. + +Next go to the the `_layouts` directory add the layout for the book. The following layout is taken from the hamilton repository and slightly edited: + +``` + + + +
+ +