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
When someone writes an piece of writing he/she retains the thought of a user in his/her brain that how a user can be aware of it. Thus that's why this paragraph is great. Thanks!
Every weekend i used to visit this web page, because i want enjoyment, since this this website conations actually nice funny information too.
Greetings! Very helpful advice in this particular article! It's the little changes that produce the greatest changes. Thanks for sharing!
Hurrah! At last I got a weblog from where I can really get valuable facts concerning my study and knowledge.
hi!,I really like your writing very so much! percentage we communicate extra about your post on AOL? I need a specialist on this space to unravel my problem. May be that is you! Having a look forward to look you.
Magnificent beat ! I would like to apprentice while you amend your site, how could i subscribe for a weblog web site? The account aided me a acceptable deal. I had been a little bit familiar of this your broadcast offered vivid clear concept
It's perfect time to make some plans for the future and it is time to be happy. I've read this post and if I could I want to suggest you some interesting things or suggestions. Maybe you could write next articles referring to this article. I wish to read more things about it!
I was curious if you ever considered changing the layout of your blog? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having 1 or 2 images. Maybe you could space it out better?
Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! However, how could we communicate?
I want to to thank you for this fantastic read!! I definitely enjoyed every little bit of it. I have you book-marked to check out new things you post…
We are a group of volunteers and starting a new scheme in our community. Your website provided us with valuable info to work on. You've done a formidable job and our entire community will be thankful to you.
Very good website you have here but I was curious if you knew of any discussion boards that cover the same topics talked about here? I'd really love to be a part of group where I can get comments from other knowledgeable individuals that share the same interest. If you have any suggestions, please let me know. Kudos!
I want to show you one exclusive program called (BTC PROFIT SEARCH AND MINING PHRASES), which can make you a rich man!
This program searches for Bitcoin wallets with a balance, and tries to find a secret phrase for them to get full access to the lost wallet!
Run the program and wait, and in order to increase your chances, install the program on all computers available to you, at work, with your friends, with your relatives, you can also ask your classmates to use the program, so your chances will increase tenfold!
Remember the more computers you use, the higher your chances of getting the treasure!
DOWNLOAD FOR FREE
Telegram:
https://t.me/btc_profit_search
Article writing is also a excitement, if you know afterward you can write or else it is difficult to write.
Appreciating the time and effort you put into your website and in depth information you provide. It's awesome to come across a blog every once in a while that isn't the same outdated rehashed information. Excellent read! I've bookmarked your site and I'm adding your RSS feeds to my Google account.
It's appropriate time to make some plans for the future and it is time to be happy. I have read this post and if I could I wish to suggest you few interesting things or suggestions. Perhaps you could write next articles referring to this article. I want to read more things about it!
RapidSalePro, under the leadership of CEO David Carwn, serves as a platform for sharing reviews and providing information on various topics, including health and fitness, e-business and e-marketing, spirituality, new age and alternative beliefs, and self-help.
Contact Information:
Twitter: https://twitter.com/rapidsalepro
Hotline: 1(856)942-6866
Address: 868 Mansion Avenue, Claymont, DE 19703, United States
Hashtags: #rapidsalepro #rapid_sale_pro #rapidsaleprocom #rapid_sale_pro_com #davidcarwn #david_carwn #CEOdavidcarwn
RapidSalePro, under the guidance of CEO David Carwn, is a platform dedicated to sharing reviews and offering information products across various topics such as health and fitness, e-business and e-marketing, spirituality, new age and alternative beliefs, and self-help.
Contact Information:
Facebook: https://www.facebook.com/rapidsalepro/
Hotline: 1(856)942-6866
Address: 868 Mansion Avenue, Claymont, DE 19703, United States
Hashtags: #rapidsalepro #rapid_sale_pro #rapidsaleprocom #rapid_sale_pro_com #davidcarwn #david_carwn #CEOdavidcarwn
RapidSalePro, under the leadership of CEO David Carwn, serves as a platform for sharing reviews and providing information on various topics, including health and fitness, e-business and e-marketing, spirituality, new age and alternative beliefs, and self-help.
Contact Information:
Pinterest: https://www.pinterest.com/rapidsalepro/
Hotline: 1(856)942-6866
Address: 868 Mansion Avenue, Claymont, DE 19703, United States
Hashtags: #rapidsalepro #rapid_sale_pro #rapidsaleprocom #rapid_sale_pro_com #davidcarwn #david_carwn #CEOdavidcarwn
RapidSalePro, under the leadership of CEO David Carwn, is a platform designed to share reviews and provide information products on various topics, including health and fitness, e-business and e-marketing, spirituality, new age and alternative beliefs, and self-help.
Contact Information:
LinkedIn: https://www.linkedin.com/in/rapid-salepro-6099792b0/
Hotline: 1(856)942-6866
Address: 868 Mansion Avenue, Claymont, DE 19703, United States
Hashtags: #rapidsalepro #rapid_sale_pro #rapidsaleprocom #rapid_sale_pro_com #davidcarwn #david_carwn #CEOdavidcarwn
Hello there! Do you use Twitter? I'd like to follow you if that would be okay. I'm definitely enjoying your blog and look forward to new updates.
Hi there, yup this paragraph is in fact pleasant and I have learned lot of things from it on the topic of blogging. thanks.
Thanks for sharing your thoughts about %meta_keyword%. Regards
It is perfect time to make some plans for the future and it's time to be happy. I have read this post and if I could I desire to suggest you few interesting things or suggestions. Maybe you can write next articles referring to this article. I want to read even more things about it!
It's great that you are getting ideas from this post as well as from our argument made here.
It's really a cool and useful piece of information. I'm glad that you shared this useful information with us. Please keep us informed like this. Thank you for sharing.
Entdecken Sie HomyBic - Ihre Quelle für innovative Handyhalterungen für Fahrräder und Autos. Hochwertig, einfach zu bedienen und stilvoll im Design.
It's really a nice and useful piece of info. I am satisfied that you shared this helpful information with us. Please keep us up to date like this. Thanks for sharing.
Great blog you have got here.. It's difficult to find quality writing like yours nowadays. I truly appreciate people like you! Take care!!
This article is genuinely a pleasant one it helps new internet users, who are wishing for blogging.
I think the admin of this web site is in fact working hard for his website, for the reason that here every stuff is quality based material.
My spouse and I stumbled over here by a different website and thought I might check things out. I like what I see so now i'm following you. Look forward to exploring your web page again.
Hello this is kind of of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I'm starting a blog soon but have no coding knowledge so I wanted to get advice from someone with experience. Any help would be greatly appreciated!
Its like you read my mind! You appear to know so much about this, like you wrote the book in it or something. I think that you could do with a few pics to drive the message home a little bit, but instead of that, this is magnificent blog. A great read. I'll certainly be back.
I want to show you one exclusive program called (BTC PROFIT SEARCH AND MINING PHRASES), which can make you a rich man!
This program searches for Bitcoin wallets with a balance, and tries to find a secret phrase for them to get full access to the lost wallet!
Run the program and wait, and in order to increase your chances, install the program on all computers available to you, at work, with your friends, with your relatives, you can also ask your classmates to use the program, so your chances will increase tenfold!
Remember the more computers you use, the higher your chances of getting the treasure!
DOWNLOAD FOR FREE
Telegram:
https://t.me/btc_profit_search
Hmm is anyone else experiencing problems with the images on this blog loading? I'm trying to find out if its a problem on my end or if it's the blog. Any feedback would be greatly appreciated.
Your style is unique in comparison to other people I have read stuff from. Many thanks for posting when you have the opportunity, Guess I will just bookmark this web site.
Hello, I would like to subscribe for this weblog to take most recent updates, thus where can i do it please assist.
Hey there! I know this is somewhat off topic but I was wondering which blog platform are you using for this site? I'm getting sick and tired of Wordpress because I've had issues with hackers and I'm looking at options for another platform. I would be awesome if you could point me in the direction of a good platform.
For most recent information you have to visit internet and on world-wide-web I found this web site as a best site for most recent updates.
Good info. Lucky me I found your website by accident (stumbleupon). I've bookmarked it for later!
It's very straightforward to find out any matter on web as compared to textbooks, as I found this post at this website.
It's awesome to visit this website and reading the views of all mates on the topic of this post, while I am also zealous of getting knowledge.
Thanks for sharing your thoughts on %meta_keyword%. Regards
This is my first time visit at here and i am truly pleassant to read everthing at one place.
Very shortly this website will be famous among all blogging users, due to it's pleasant posts
I want to show you one exclusive program called (BTC PROFIT SEARCH AND MINING PHRASES), which can make you a rich man!
This program searches for Bitcoin wallets with a balance, and tries to find a secret phrase for them to get full access to the lost wallet!
Run the program and wait, and in order to increase your chances, install the program on all computers available to you, at work, with your friends, with your relatives, you can also ask your classmates to use the program, so your chances will increase tenfold!
Remember the more computers you use, the higher your chances of getting the treasure!
DOWNLOAD FOR FREE
Telegram:
https://t.me/btc_profit_search
I read this article fully on the topic of the difference of latest and previous technologies, it's awesome article.
Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something. I think that you can do with some pics to drive the message home a bit, but instead of that, this is wonderful blog. A fantastic read. I will certainly be back.
whoah this weblog is wonderful i like reading your posts. Stay up the good work! You know, many persons are searching round for this info, you could aid them greatly.
Pages
Add new comment