An MVC 3 Razor HTML5 site template with patterns and practices from the HTML5 Boilerplate project. Now with integrated CSS and JS Minification from SquishIt
Thanks for the review. I'm not sure whether visual studio is correct in this case. If you're going for strictly XHTML, then the closing is required, but from what I can tell in the HTML spec, the closing tag is not required, and "self-closing" may also not be a good choice.
I have some problems with the web.config - most specifically make sure you check the static types, I had a problem with text/css vs text/css UTF-8 with IE9 which was resulting in the server sending back a 406 Not acceptable
I just tried to load the template through VS2010 and got past the first issue with installing MVC3. However, now I'm getting "Downloaded extension doesn't contain any templates" and of course, the template doesn't download. Any ideas on what is going on here? Thanks! I'm anxious to look at this template!
That's interesting. Has there been an update to VS2010? I don't have a copy of VS2010 readily available to test on. Can you try removing the extension and giving it another try? Can you intall other project templates?
Sorry to give you a bunch of chores, but this should help us figure out what the issues are.
I removed the extension and I got the error from earlier: "The project type is not supported by this installation". I also tried the jquery mobile template and got the same error. It did download and created the project folder but there's nothing in the folders.
Ok, in further tests.... I added the extension through the extension manager, exited VS2010 and then added the template to a new project in my app and it worked! Thanks for the suggestions!
I'm sure it's a simple fix and that I'm not searching with the right critera, but I have an issue. When I'm edding a view and hit debug, it trys to load the template that I'm working on instead of the root site
example:
if I'm working on changepassword.cshtml it tries to load
http://localhost:65059/Views/Account/ChangePassword.cshtml instead of http://localhost:65059
This only happens when I install the template.
Any ideas?
Thanks!
That is frustrating, but I don't think there is anything I can do to fix it in the template. It seems to be something to do with the start page:
http://stackoverflow.com/questions/501059/debug-with-visual-studio-wrong-url-on-asp-net-mvc
I'll see what I can do in the next release
Used all defaults and just punched GO.
Looks like it's trying to update the web.config files to modify for debugging, then I get a prompt to apply to all files. When I attempt it, it tosses a message box and says operation not supported. If I ignore it, I get a page not found. I am sure I could debug it if I took long enough, but I'll probably make it worse anyway. Thanks for the effort.
I think you may have hit F5 while the _Layout.cshtml or Index.cshtml was opened in the editor. Visual studio will try to open the file in the editor directly in the browser sometimes. If your URL looks like localhost:12345/Views/Shared/Index.cshtml, remove everything past localhost:12345 and navigate there.
Any one got a clue why I get this message trying to use the MotherEffin template ?
Using VS2010 Premium 4.0.30319 RTMrel, Server 2008 R2 (64) as Administrator
The html5 Boilerplate includes ant scripts to help compress css and javascript. Is this supported yet? We should be able to use MSBuild inplace of ant.
You're right, it would be nice to have the minification built in. There isn't a built in MSBuild Task for that, but I've been working on one and hope to get it into a new version of the template. I'll update the discussion here when I do.
Here's my HTML5BuildTasks project on GitHub:
https://github.com/jgable/HTML5BuildTasks
Jacob
Ok, so I incorporated the AjaxMin build tasks (http://ajaxmin.codeplex.com) into the project. Basically, all javascript is now in the js/combine directory and is automagically combined and minified via a build task into js/script.js and js/script.min.js.
The _Layout.cshtml file will reference only the combined script if running in debug and will reference the minified version if running in release mode (there's also an option to override for testing).
For anyone who may find the title offensive, it's inspired by Paul Irish's (One of the original HTML5 Boilerplate creators) mothereffinghsl.com. I have no way of changing the title without having to re-package the template and re-submit; which I fear would change my link urls in all the places that link here.
Also, I have a hard time thinking anyone finds this offensive (and if you do, you are definitely free to not use it). If anyone legitimately emails me directly at jacob.gable[at]gmail, I will repackage and resubmit with a different name.
If you notice that your master layout isn't showing up when you deploy to a live site, this is becuase the _ViewStart.cshtml file is not set as a content file. To fix this, highlight the _ViewStart.cshtml file in the Views/Shared folder and set it's Build Action to Content.
Sorry for the bug.