This is almost pointless to mention but the standard templates give you a very specific copyright with respect to atom feeds (Copyright (c) x-y)
. The file source\_includes\custom\footer.html
includes a way of gathering the system time in the form:
Copyright © {{ site.time | date: "%Y" }}
I simply replaced the current hard-coded year with the ruby code above so that when the site is generated, it always gives the current year.
In case any of you are wondering how to insert code blocks with liquid syntax, see this post.
This is more involved but luckily gist makes it stupid simple to include here. Everything is pretty much a rip off of the category_generator plugin and includes with just minor tweaks to use the tag object.
_config.yml
plugins/tag_generator.rb (an almost complete copy of category_generator.rb)
source/_includes/archive_post_tags.html
source/_includes/custom/tag_feed.xml
source/_includes/post/tags.html
source/_layouts/tag_index.html
The following goes on line 23 in my atom.xml file, or right before the content tag. A better alternative would be to detect an excerpt and only display that or the content, not both.
{% if post.has_excerpt %}<summary type="html">{{ post.excerpt | xml_escape }}</summary>{% endif %}
Install RailsInstaller from here. I use the version with Rails 3.2.
curl.exe
, libcurl.dll
and libidn-11.dll
to C:\RailsInstaller\bin
.libidn-11.dll
was necessary to include.C:\RailsInstaller
as cacert.pem
. SSL_CERT_FILE=C:\RailsInstaller\cacert.pem
. My plan is for this post to serve as an index to the upcoming posts. Unlike the ASP.NET MVC posts that fizzled (sorry), I need to chronicle these changes in the event I need to dissect them again.
Here's the collection in no particular order:
[start year]-[current year]
and this post simply explains the what and why.One thing in the FAQ that particularly bit me during the WordPress conversion was Using Non-ASCII Characters In Your Blog. Most conversion posts cover this but I'm in the habit of always having this as part of my environment just in case.
The primary reason for my approach so far was to be a close representation as possible of the WordPress site to combat 301 redirect woes. Tags will eventually disappear I think but I like the exercise of making sure they're around in full. The platform seems to support "something" so it's fun to see how far I can go with it.
In case anyone was watching, I switched the blog from a generic WordPress with a slightly customized theme to octopress. I'm using the excellent Octoflat theme with a few notable tweaks. I reintroduced the search and feed buttons as well as expanded the navigation to allow nested menus. The theme allows for nested menu elements and while 2 levels deep is highly acceptable, I happen to use 3.
I'm writing this post using the excellent MarkPad which serves all of my needs perfectly. You don't need a markdown editor, but having one with live-preview that reinforces the markdown syntax is killer. That I can insert a URL and it automatically format the document accordingly is a small but useful touch.
I plan on posting the various tweaks that make up this blog. While there aren't a ton, I think a few of the concepts are worth expanding on. I don't claim these tweaks are original by any means but I found a lot of ideas needed to be fleshed out a little more to be acceptable for my tastes. Yes, I'm anal.
I expect nothing but great things from this migration though it took roughly a month of quite a few tinker sessions to get things where I wanted it. I blame using Ruby on Windows to be a big culprit but also my n00bness got in the way in some areas. It also took me quite a bit to grok how deployments functioned but now that everything gels, I don't expect any issues.
The site will continue to be a slight work in progress as I button up some of the loose ends. I have a few design tweaks in mind and I'm looking to expand my portfolio with more current projects. Not everything I've done in the past 2 years can be seen unfortunately but there's quite a body of work piling up, waiting to be shown.
Technically this isn't specific to ASP.NET MVC at all, that just happens to be how I use Elmah. I started work on an ASP.NET MVC project with certain erroneous preconceived notions. I originally started the database with SQL 2008 in mind because I run Windows 7. An easily accessible staging server used SQL 2005 and it was here that I ran into my first compatibility snag. A database project may be set for an earlier revision but you can't transplant those .bak files and expect them to restore. This is generally 101 level stuff but something I tend to keep in the back of my mind at the worst times.
This staging issue foreshadowed production: the shared hosting company I use is running SQL 2000. Argh! Luckily this process was less painful: I used SQL Publishing Wizard and SQL 2000 in a virtual machine to get the database on the lowest common demoninator. Once in SQL 2000, the backup files will easily restore in any future version of SQL. Because the push to production is so infrequent and changes can be diff'd easier than rebuilt I've settled on a structure of Development: 2005, Staging: 2005, and Production: 2000.
I chose an Elmah version (1.1.11517.2009) that dealt specifically with SQL 2005 but was hopefully new enough to be relative to ASP.NET MVC. Switching to SQL 2000 produced a very minor snag: the database script needed to be downgraded.
Fortunately, and with the help of Google code, I could go back to other revisions of the same file in the Elmah codebase and find a version suited for SQL 2000 dated earlier this year. Here's the diff link to show what changes were made: http://code.google.com/p/elmah/source/diff?spec=svn705&r=643&format=side&path=/trunk/src/Elmah/SQLServer.sql&old_path=/trunk/src/Elmah/SQLServer.sql&old=568. When downgrading to SQL 2000, use the left hand side or you could just download the file.
Update (2019): Since Google Code has long been out of service, Elmah can now be found at https://elmah.github.io/. To get an appropriate SQL 2000 file, you may have to look at v1.0 and v1.1 sources. I would think in 2019 you would likely choose a more recent SQL Server version.
While you are there, you might as well follow the examples given by Scott Mitchell Keeping ELMAH's Error Log Size In Check and Deleting All Records In a Table EXCEPT For the N Most Recently Added Records. Why both? The first prunes any records beyond a date range to keep errors relevant. The second makes sure your database stays small in case of anything that can trigger a large number of records within your date window.