Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added descriptions to all posts and pages.
  • Loading branch information
Silvenga committed Dec 10, 2017
1 parent 423eba0 commit 7f99874
Show file tree
Hide file tree
Showing 26 changed files with 77 additions and 14 deletions.
1 change: 1 addition & 0 deletions input/pages/404.md
@@ -1,4 +1,5 @@
Title: Page not Found
Description: Description not found.
---

^^^
Expand Down
1 change: 1 addition & 0 deletions input/pages/about.md
@@ -1,4 +1,5 @@
Title: About
Description: About myself, Silvenga!
---

## Who am I?
Expand Down
1 change: 1 addition & 0 deletions input/pages/humble-disclaimer.md
@@ -1,4 +1,5 @@
Title: A Humble Disclaimer
Description: Everysite needs a disclaimer, this is, humbly mine.
---

This is my domain. Thusly so, the information and my opinions under this domain ([silvenga.com](https://silvenga.com)) are provided as is with no warranties.
Expand Down
1 change: 1 addition & 0 deletions input/pages/keybase.md
@@ -1,4 +1,5 @@
Title: Keybase
Description: A keybase verification.
---

I hereby claim:
Expand Down
1 change: 1 addition & 0 deletions input/pages/projects.md
@@ -1,4 +1,5 @@
Title: Projects
Description: A list of projects of mine.
---

I write code because I find it fun - I love experimenting with new and emerging technologies. Below are projects of mine that I've used as use cases for exploring some of the new technologies that I'm interested in.
Expand Down
1 change: 1 addition & 0 deletions input/posts/ceph-feature-mismatch.md
@@ -1,4 +1,5 @@
Title: Ceph Feature Missmatch with Kubernetes
Description: Getting Ceph to place nice with Kubernetes.
---

^^^
Expand Down
1 change: 1 addition & 0 deletions input/posts/configure-postfix-to-work-with-mailgun.md
@@ -1,5 +1,6 @@
Title: Configure Postfix to Work with MailGun
Published: 06 May 14
Description: Using MailGun and a script to get there faster.
---

![Mail Gun Logo](/content/images/2014/May/mailgun_logo.png)
Expand Down
1 change: 1 addition & 0 deletions input/posts/convert-to-retail-windows-server.md
@@ -1,4 +1,5 @@
Title: Convert Windows 2016 Eval to Retail
Description: How to convert a Windows Server 2016 trial installation to full retail.
---

![](/content/images/2017/dism.png)
Expand Down
1 change: 1 addition & 0 deletions input/posts/deploy-a-tinc-mesh-vpn-running-tap.md
@@ -1,5 +1,6 @@
Title: Deploy a Tinc Mesh VPN Running TAP
Published: 25 Jul 14
Description: Yet another how-to on setting up a mesh network using Tinc (in TAP mode).
---

![Mesh Network](/content/images/2014/Jul/generalMesh.gif)
Expand Down
1 change: 1 addition & 0 deletions input/posts/just-another-putty-color-scheme.md
@@ -1,5 +1,6 @@
Title: Just Another Putty Color Scheme
Published: 23 Aug 14
Description: Just another color scheme for Putty, designed based on my personal preferences.
---

![Screenshot of the new colors](/content/images/2014/Aug/2014-08-23_19-51-12.png)
Expand Down
3 changes: 2 additions & 1 deletion input/posts/lazy-view-a-jquery-plugin.md
@@ -1,5 +1,6 @@
Title: Lazy View - A jQuery Plugin
Published: 22 Jun 14
Published: 22 Jun 14
Description: Let content flow in via another jQuery plugin.
---

I hate slow websites. A month or so ago I had to log onto Delta.com. I was largely unimpressed with the speed in which it loaded. I could wait for seconds until text would appear. I would wait even longer for the site to become responsive.
Expand Down
3 changes: 2 additions & 1 deletion input/posts/openvpn-obfuscating.md
@@ -1,5 +1,6 @@
Title: "[WIP] OpenVPN Obfuscating"
Title: Notes on OpenVPN Obfuscating
Published: 24 Jan 15
Description: Some notes on how to setup OpenVPN obfuscation using Obfproxy.
---

> This is a work in progress. I would very much like to make a GUI for the windows version of obfsproxy, and a better wrapper for Ubuntu.
Expand Down
1 change: 1 addition & 0 deletions input/posts/openvpn-sheathing.md
@@ -1,5 +1,6 @@
Title: OpenVPN Sheathing
Published: 18 Apr 14
Description: Sheathing OpenVPN traffic through a SSL tunnel using STunnel.
---

![OpenVPN Logo](/content/images/2016/10/openvpntech_logo1.png)
Expand Down
1 change: 1 addition & 0 deletions input/posts/package-console-powershell-cheat-sheet.md
@@ -1,5 +1,6 @@
Title: Package Console Powershell Cheat Sheet
Published: 19 Aug 16
Description: A personal cheat sheet on using PowerShell commands via the Package Console.
---

A cheat sheet of all the cool things that knowing PowerShell can help with when dealing with Visual Studio's Package Console.
Expand Down
1 change: 1 addition & 0 deletions input/posts/pen-lighter.md
@@ -1,5 +1,6 @@
Title: Silvenga's Penlighter
Published: 14 Mar 14
Description: I present a solution to disappearing mice, a PenLighter!
---

![](/content/images/2014/Mar/tablet_use_bamboo.jpg)
Expand Down
1 change: 1 addition & 0 deletions input/posts/pos-editor.md
@@ -1,5 +1,6 @@
Title: POS Editor
Published: 02 Jan 15
Description: Another random project - manipulate POS displays!
---

Not so common anymore, but POS displays could be seen in every store. I made a small C# program that could interact with one of these displays through the COM port and show preconfigured text to the user. I know nothing about compatiblity with other vender models, but it work with my model and it was useful. Hopefully someone else could find this project useful as well.
Expand Down
1 change: 1 addition & 0 deletions input/posts/power-ghost-with-upstart.md
@@ -1,5 +1,6 @@
Title: Power Ghost with Upstart
Published: 27 Mar 14
Description: Using Upstart to manage a Ghost instance.
---

![Upstart Logo](/content/images/2014/Mar/upstart80.png)
Expand Down
1 change: 1 addition & 0 deletions input/posts/raid1-windows-server-2016.md
@@ -1,4 +1,5 @@
Title: Install Windows Server 2016 using Software RAID1
Description: How to set-up Windows Server 2016 using software RAID1 - on the system volume.
---

## Setup
Expand Down
1 change: 1 addition & 0 deletions input/posts/setup-apache-to-serve-ghost-blog.md
@@ -1,5 +1,6 @@
Title: Setup Apache to Serve Ghost Blogs
Published: 11 Jul 14
Description: Using Apache as a reverse proxy to service a Ghost instance.
---

I recently got a request to write a tutorial on how to set up a pre-existing Ghost blog to be served by Apache (the master web server) under the root domain. To add a twist, I will also show how to use Apache as a caching server for the static content of Ghost.
Expand Down
1 change: 1 addition & 0 deletions input/posts/slight-ghost.md
@@ -1,5 +1,6 @@
Title: Ghost Scaffolding
Published: 16 Dec 14
Description: A different take on how to host a Ghost instance, while using NPM as an upgrade manager.
---

![](/content/images/2014/12/ghost_logo-2.jpg)
Expand Down
1 change: 1 addition & 0 deletions input/posts/slight-theme.md
@@ -1,5 +1,6 @@
Title: Slight Theme
Published: 21 Mar 14
Description: A Ghost blog theme.
---

## Introduction
Expand Down
@@ -1,5 +1,6 @@
Title: The Perfect Singleton Implementation in Java
Published: 01 May 14
Description: Randomly, a Java singleton implmentation.
---

For the longest time I've read books describing ways to implement the Singleton pattern. Many of these used some type of thread synchronization and was generally hacky. I've found the perfect solution and alternative.
Expand Down
1 change: 1 addition & 0 deletions input/posts/virtual-disk-service-stalled.md
@@ -1,4 +1,5 @@
Title: Virtual Disk Service Stalled
Description: My journey in troubleshooting Virtual Disk Service issues.
---

I had this really odd problem that's been plaguing me for months on a newly installed Windows 2016 dedicated machine. Random services and tools either stopped functioning or froze/stalled for minutes at a time. I really thought that I either had a corrupted installation (`sfc` couldn't detect anything) or I configured something horribly wrong. So, as a last ditch effort before completely re-installing the machine, I finally took some time one night to perform a root cause analysis and to hopefully find a solution. What precedes is that night.
Expand Down
14 changes: 8 additions & 6 deletions input/theme/_Layout.cshtml
@@ -1,19 +1,21 @@
@{
string Title = Model.String(MetaKeys.Title);
if (Title == "My Blog"){
Title = "Silvenga";
}
string Title = Model.String(MetaKeys.Title);
string Description = Model.String("Description");
}

<!DOCTYPE html>
<html>
<head>
<title>@Title</title>
<meta http-equiv="content-language" content="en-us">
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8" />

<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="generator" content="Wyam" />
<meta name="generator" content="Wyam + Webpack" />

<title>@Title</title>
<meta name="description" content="@Description">

<link rel="stylesheet" href='@Context.GetLink("/main.css")'>
</head>
<body>
Expand Down
3 changes: 3 additions & 0 deletions input/theme/index.cshtml
@@ -1,3 +1,6 @@
Title: Silvenga's Blog
Description: Yet another weblog for the masses.
---
@{
Layout = "/theme/_Layout.cshtml";
}
Expand Down
47 changes: 41 additions & 6 deletions recipe/SlightBlog.cs
Expand Up @@ -22,10 +22,12 @@ namespace Wyam.SlightBlog
{
public class SlightBlog : IRecipe
{
public static Action<string> Warn = (string message) => Common.Tracing.Trace.Warning(message);

public void Apply(IEngine engine)
{
// Global metadata defaults
engine.Settings[MetaKeys.Title] = "My Blog";
engine.Settings[MetaKeys.Title] = "Silvenga.com";
engine.Settings[MetaKeys.MarkdownExtensions] = "advanced+bootstrap";
engine.Settings[MetaKeys.PostsPath] = new DirectoryPath("posts");
engine.Settings[MetaKeys.PagesPath] = new DirectoryPath("pages");
Expand All @@ -41,17 +43,18 @@ public void Apply(IEngine engine)
{
if (!doc.ContainsKey(DocumentKeys.Published) || doc.Get(DocumentKeys.Published) == null)
{
Common.Tracing.Trace.Warning($"Skipping {doc.Source} due to not having {DocumentKeys.Published} metadata");
Warn($"Skipping {doc.Source} due to not having {DocumentKeys.Published} metadata");
return false;
}
if (doc.Get<DateTime>(DocumentKeys.Published) > DateTime.Now)
{
Common.Tracing.Trace.Warning(
Warn(
$"Skipping {doc.Source} due to having {DocumentKeys.Published} metadata of {doc.Get<DateTime>(DocumentKeys.Published)} in the future (current date and time is {DateTime.Now})");
return false;
}
return true;
})
}),
ValidateMetadata()
);

engine.Pipelines.Add(PipelineKeys.Pages,
Expand All @@ -63,7 +66,8 @@ public void Apply(IEngine engine)
new ReadFiles(ctx => $"{ctx.DirectoryPath(MetaKeys.PagesPath).FullPath}/*.cshtml"),
new FrontMatter(new Yaml.Yaml())
),
OrderByPublishDate()
OrderByPublishDate(),
ValidateMetadata()
);

engine.Pipelines.Add(PipelineKeys.Foundation,
Expand Down Expand Up @@ -190,6 +194,37 @@ private object AppendSlash(IDocument doc, IExecutionContext ctx)
return $"{baseDirectory}/{slashed}/index.html";
}

private IModule ValidateMetadata()
{
return new Execute((doc, ctx) =>
{
var source = doc.Source;
var title = doc.String("Title");
var description = doc.String("Description");
if (title == null)
{
Warn($"The title should exist for {source}.");
}
else if (title.Length > 55)
{
Warn($"The title should be no longer then 55 charactors for {source}.");
}
if (description == null)
{
Warn($"The description should exist for {source}.");
}
else if (description.Length > 150)
{
Warn($"The description should be no longer then 150 charactors for {source}.");
}
return null;
});
}

private IModule OrderByPublishDate()
{
return new OrderBy((doc, ctx) => doc.Get<DateTime>(DocumentKeys.Published))
Expand Down Expand Up @@ -231,7 +266,7 @@ public IEnumerable<IDocument> Execute(IReadOnlyList<IDocument> inputs, IExecutio
Date = c.Get<DateTimeOffset>("AuthorWhen"),
Author = c.String("AuthorName"),
Email = c.String("AuthorEmail"),
Sha = c.String("Sha")?.Substring(0, 8)
Sha = c.String("Sha")?.Substring(0, 8),
})
.ToList();
Expand Down

0 comments on commit 7f99874

Please sign in to comment.