UPDATE: In August 2015 I moved this site back to Drupal 7. Drupal 8 is still in beta, and though it's going to be fun, it's obviously not ready for prime time yet.
A few weeks ago I decided to rebuild this blog from scratch. It had been literally years since I'd posted, so I figured I'd include just a few of the last entries. Also, Drupal 8 was in beta and I'm impatient. Why not build a brand new site in 8.0.0-beta9?, I thought. How hard could it be?
So, okay. It was a little bit hard. But surprisingly, the experience wasn’t as hairy as you might expect. Here’s a summary of my adventurous, experimental walk on the wild beta side.
Installing Drupal 8
Before I go further, I should mention that I installed Drupal 8 on a previously set up local environment. (If you don’t know what that means, you can find out more here. For fellow Mac users, I’d recommend these instructions.)
Honestly, installation was a breeze. The whole process took less than 5 minutes and was similar enough to Drupal 7 that I felt on solid ground. I just downloaded and untarred core, added a new database in Mamp, went to the site in my browser and followed the instructions. Easy peasy.
Playing with core was equally as uneventful and fun. I added a new user, enabled and disabled core modules, added a new content type and a taxonomy vocabulary, tweaked permissions, etc. All without a hitch. The admin interface looks and acts almost the same as D7's. For someone who builds a lot of sites for non-technical admins, this is a big relief.
I decided this was easy. Drupal 8 was a lot more stable than I’d expected. I was feeling confident, so I decided to try creating a custom theme.
Custom Theming: Take One
Considering D8’s not even released yet, the documentation on drupal.org on Theming Drupal 8 is pretty extensive. In fact it’s so extensive, it’s a bit overwhelming at first.
If you're familiar with D7 theming and just wanted to get up and running quickly, you might prefer 27 Questions (and Answers) from My First Drupal 8 Site Build by Matt Korostoff. His article was extremely helpful, although I was glad to be have the d.o documentation to refer to when I got stuck or wanted to delve into something more deeply.
Adding JS, CSS and Font Files and Libraries
I decided to keep a hand on the tow line and created a Classy subtheme, following Matt’s instructions for setting up the x.info.yml and and x.libraries.yml files.
You can see the .info.yml file looks a lot like the .info in Drupal 7. The main difference is the way CSS and JS are added. Instead of adding them directly to the .info.yml file, you include a reference to a .libaries.yml file, and that is where you add your scripts, stylesheets and dependencies. That was probably the biggest gotcha for me--figuring out how to include JS scripts, libraries and dependencies and font libraries. There was conflicting information on the webs, but this is what worked for me:
Because I had a number of CSS and JS files, I followed the advice (from d.o. maybe?) to break them into two groups—global-styling and global-scripts,. These will now be available to every page.
My scripts.js is actually just a teeny few lines to handle the navigation bar, but surprisingly, Drupal 8 doesn’t load JQuery on every page automatically like D7 did. You have to add it as a dependency, as well as any other js you want to run on every page.
One thing I never figured out was how to add my custom fonts. I use Google's PT Serif and Inconsolata in this theme, and the only way I could get the fonts to load was by adding an @import to my main CSS file:
@import url(http://fonts.googleapis.com/css?family=Inconsolata|PT+Serif:400,400italic,700,700italic);
It works, and that'll have to do for now.
Twig Templates
I find Twig to be easier and more intuitive than the PHP of previous .tpl.php files. If you don't agree, some of the documentation on d.o might be helpful, especially Twig Coding Standards.
The Classy theme was a godsend for me when it came to creating custom templates. Whether you create a subtheme of Classy or not, you can look at the slew of templates it includes to get an idea of how to create your own.
For this theme, I needed a custom block--search-form-block.html.twig and changes to page.html.twig and node.html.twig. For instance, like Matt Korostoff, I don't much like the default "submitted by" line. To tweak it, I copied the node.html.twig from Classy, plopped it in my theme's template folder, and changed the line:
I still haven't figured out how to get my custom date/time format to print, but I'll keep working on it. :)
Custom Modules and More
I enabled a few contrib modules (Prepopulate, Youtube Field, Captcha and Recaptcha) that were absolutely required before going live. All worked beautifully out-of-the-box. However, the other contrib modules I tried gave me either a WSOD or that ghastly pink error message.
At this time I'd recommend enabling contrib modules cautiously, if at all. Most are still in dev for a reason. Maybe try them on a test install first and see what blows up.
Luckily this is a simple site that can run without many contrib modules. If you have a complex site that requires a number of them, you may have to wait a bit before they're all ported to 8. Bluespark publishes a helpful live list of the current status of the top 100 Drupal modules. Check it out to see if your modules are listed.
I'm know you're waiting on tenterhooks for your favorite modules, but remember that most of the people who create and maintain contrib modules do so on their own time and without pay. That's pretty darn generous of them, and I'm grateful for all the vacation time and off hours they spend creating modules that make my life easier. Unless I'm able to jump in alongside and start slinging code, I'm happy to wait patiently for contrib modules to be ported.
(Note to self: Patience you must have, my young padawan.)
Conclusion
The (sort of) bad news: Not everyone is crazy enough to spend two days and nights building a D8 site. It still isn't easy. You may get discouraged. You will lose sleep. I still can't get drush 7 (required for D8) to rebuild caches. Importing and exporting a database between dev and live without at least a few WSODs is nigh on impossible. I encountered a number of alien requirements and strange error messages that took time to track down and debug.
The good news: Smarter people than me are working on those problems. Yay!
More good news: I'm no longer afraid of WSODs or error screens that fill three screens. Also, I busted my local dev site and had to rebuild it so many times, I now know a great deal about installing, enabling and configuring Drupal 8.
Was it worth it? You betcha! I'm no programmer, so I was nervous about Drupal 8 coming down the pike. I'm not nervous anymore. In fact, I'm looking forward eagerly to a release candidate.
Thanks to all the people who put so much time and effort into Drupal 8. It's really spectacular, and we thank you for generously sharing your code with us.
Comments
Good web site you have got here.. It's difficult to find excellent writing like yours nowadays. I seriously appreciate people like you! Take care!!
Thanks , I've just been looking for information about this topic for a long time and yours is the greatest I've found out so far. But, what about the bottom line? Are you positive in regards to the source?
Good day! Do you know if they make any plugins to safeguard against hackers? I'm kinda paranoid about losing everything I've worked hard on. Any recommendations?
For latest news you have to pay a quick visit internet and on the web I found this website as a best site for newest updates.
You have made some decent points there. I looked on the internet for more info about the issue and found most individuals will go along with your views on this website.
Have you ever thought about including a little bit more than just your articles? I mean, what you say is fundamental and everything. Nevertheless think about if you added some great photos or videos to give your posts more, "pop"! Your content is excellent but with pics and videos, this site could certainly be one of the best in its field. Wonderful blog!
Simply wish to say your article is as surprising. The clarity for your publish is simply spectacular and i could assume you are a professional in this subject. Fine with your permission let me to snatch your feed to keep up to date with imminent post. Thanks a million and please continue the gratifying work.
Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! However, how could we communicate?
Hi there to all, how is the whole thing, I think every one is getting more from this web page, and your views are good for new viewers.
Hi to all, since I am really keen of reading this web site's post to be updated daily. It consists of pleasant material.
I’m not that much of a online reader to be honest but your sites really nice, keep it up! I'll go ahead and bookmark your site to come back in the future. Many thanks
I'm not sure why but this site is loading incredibly slow for me. Is anyone else having this issue or is it a issue on my end? I'll check back later on and see if the problem still exists.
This is really interesting, You are a very professional blogger. I've joined your feed and look forward to looking for more of your wonderful post. Also, I have shared your web site in my social networks
Hello there! This post couldn't be written any better! Reading through this post reminds me of my good old room mate! He always kept talking about this. I will forward this page to him. Pretty sure he will have a good read. Thanks for sharing!
I know this if off topic but I'm looking into starting my own blog and was wondering what all is required to get setup? I'm assuming having a blog like yours would cost a pretty penny? I'm not very web smart so I'm not 100% positive. Any tips or advice would be greatly appreciated. Cheers
I was able to find good advice from your articles.
Discover excellence in financial advisory services with Syon Associates. As a trusted partner, we specialize in providing tailored solutions to meet your unique financial goals. Our team of seasoned experts offers strategic insights, personalized planning, and a commitment to your financial success. Whether you're navigating investments, retirement planning, or wealth management, <a href="https://syonassociates.com/">Syon Associates</a> is dedicated to guiding you toward a secure and prosperous future. Elevate your financial journey with Syon Associates – where expertise meets personalized care."
I was able to find good info from your blog articles.
Thanks for sharing your info. I truly appreciate your efforts and I am waiting for your next write ups thank you once again.
After checking out a number of the blog posts on your blog, I honestly appreciate your technique of writing a blog. I added it to my bookmark webpage list and will be checking back soon. Please visit my website as well and let me know what you think.
Hello! I've been following your blog for some time now and finally got the bravery to go ahead and give you a shout out from Houston Texas! Just wanted to say keep up the excellent job!
Hello, I enjoy reading through your post. I wanted to write a little comment to support you.
Having read this I believed it was extremely enlightening. I appreciate you finding the time and effort to put this information together. I once again find myself personally spending a significant amount of time both reading and leaving comments. But so what, it was still worthwhile!
Hello there I am so thrilled I found your weblog, I really found you by error, while I was browsing on Yahoo for something else, Regardless I am here now and would just like to say cheers for a fantastic post and a all round interesting blog (I also love the theme/design), I don't have time to read it all at the minute but I have book-marked it and also included your RSS feeds, so when I have time I will be back to read much more, Please do keep up the great job.
Heya i'm for the primary time here. I found this board and I to find It really helpful & it helped me out a lot. I am hoping to give something back and aid others like you helped me.
Thank you, I've just been searching for info approximately this subject for ages and yours is the best I've found out so far. However, what in regards to the conclusion? Are you certain about the source?
great issues altogether, you simply received a new reader. What may you recommend about your put up that you just made a few days in the past? Any positive?
Hey would you mind stating which blog platform you're working with? I'm looking to start my own blog in the near future but I'm having a difficult time deciding between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I'm looking for something completely unique. P.S Sorry for being off-topic but I had to ask!
Spot on with this write-up, I absolutely believe this site needs a great deal more attention. I'll probably be returning to read more, thanks for the information!
My developer is trying to persuade me to move to .net from PHP. I have always disliked the idea because of the costs. But he's tryiong none the less. I've been using Movable-type on several websites for about a year and am worried about switching to another platform. I have heard very good things about blogengine.net. Is there a way I can transfer all my wordpress posts into it? Any kind of help would be really appreciated!
I loved as much as you will receive carried out right here. The sketch is tasteful, your authored material stylish. nonetheless, you command get got an nervousness over that you wish be delivering the following. unwell unquestionably come more formerly again since exactly the same nearly a lot often inside case you shield this hike.
Wow, amazing blog layout! How lengthy have you ever been running a blog for? you made blogging look easy. The total glance of your website is excellent, as neatly as the content material!
Hey there, I think your blog might be having browser compatibility issues. When I look at your blog in Ie, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, great blog!
I am now not sure where you are getting your information, however great topic. I must spend a while learning much more or understanding more. Thank you for excellent info I used to be in search of this information for my mission.
I do not even understand how I stopped up right here, but I believed this submit was once good. I do not understand who you're but certainly you are going to a famous blogger for those who aren't already. Cheers!
of course like your web-site however you need to check the spelling on quite a few of your posts. Many of them are rife with spelling problems and I to find it very troublesome to tell the reality nevertheless I will certainly come back again.
I have to thank you for the efforts you've put in writing this site. I am hoping to see the same high-grade blog posts by you later on as well. In truth, your creative writing abilities has motivated me to get my own, personal blog now ;)
Please let me know if you're looking for a author for your site. You have some really good articles and I think I would be a good asset. If you ever want to take some of the load off, I'd absolutely love to write some content for your blog in exchange for a link back to mine. Please send me an e-mail if interested. Many thanks!
I'm excited to find this website. I need to to thank you for your time just for this wonderful read!! I definitely really liked every part of it and I have you saved as a favorite to check out new information on your blog.
If you are going for best contents like I do, simply pay a quick visit this web page all the time because it presents quality contents, thanks
Hello friends, its fantastic article concerning cultureand entirely explained, keep it up all the time.
I don't even understand how I ended up here, but I thought this put up used to be great. I don't realize who you are however definitely you're going to a famous blogger when you are not already. Cheers!
Generally I do not learn article on blogs, however I wish to say that this write-up very pressured me to try and do so! Your writing style has been surprised me. Thank you, quite nice article.
Fantastic site. A lot of helpful info here. I am sending it to several friends ans also sharing in delicious. And certainly, thanks in your effort!
Your method of telling all in this piece of writing is actually pleasant, all be able to effortlessly understand it, Thanks a lot.
When someone writes an article he/she keeps the idea of a user in his/her brain that how a user can understand it. Thus that's why this paragraph is outstdanding. Thanks!
Hi to every body, it's my first visit of this weblog; this website carries awesome and actually excellent information for readers.
What's up to all, how is the whole thing, I think every one is getting more from this web page, and your views are good for new people.
Heya i am for the primary time here. I came across this board and I in finding It really useful & it helped me out a lot. I'm hoping to present something again and help others such as you helped me.
Quality articles is the main to interest the viewers to pay a visit the web page, that's what this web site is providing.
Pages
Add new comment