Saturday 30 December 2017

What You Build

I tweeted this yesterday and it seemed to resonate with some folks:

What I was feeling when I wrote that was a little tired of endless discussions on tech minutia and yearning for more focus on what we are building and discussion about why.

If you're a reader of this site, you and I live in the same bubble. It's a nice bubble. It's full of smart people who like to chat about web design and development. I live it and love it.

It's easy to get into a heated discussion about frameworks, what type of class names make the most sense, which optimization techniques are most important, or what part of your code base is should be responsible for styling. Those are great discussions that guide our industry.

But what is more important? The naming convention you chose or if your user can actually book a flight? Which state store library you picked or if you actually had the scarf your user was looking for? Which command line tool pulled your dependencies or whether someone was able to find and read the instructions to send in their court appeal?

I was trying to encourage people to build and think about what they are building rather than get too discouraged about the how. You're building things for people and that's such a big responsibility. One that outweighs technical choices, as important as they seem.

I enjoyed the pushback I got on it though.

Most of it centered around the fact that if you make poor tech choices, that limits the quality of what you build and slows your ability to change and adapt to changing user needs. Fair enough.

Good tech just might lead to directly better features and UX for your users. Fair enough. Good tech might be a differentiator between you and your competition. Fair enough.

My favorite was calling out the story of the three little pigs. If you aren't familiar, there is a Big Bad Wolf that is trying to eat the piggies. Each of them built a house to protect themselves. I imagine you can guess which of the pigs did better: the one who built their house out of hay, or the pig who built their house out of bricks.

Fair enough.

Drew McLellan gets into this in All That Glisters, but focuses on the old vs new tech issue:

There are so many new tools, frameworks, techniques, styles and libraries to learn. You know what? You don’t have to use them. You’re not a bad developer if you use Grunt even though others have switched to Gulp or Brunch or Webpack or Banana Sandwich. It’s probably misguided to spend lots of project time messing around with build tool fashions when your so last year build tool is already doing what you need.

And this gem:

Software, much like people, is born with a whole lot of potential and not much utility. Newborns — both digital and meaty — are exciting and cute but they also lead to sleepless nights and pools of vomit.

He goes on to say that what you are building might help dictate your tech choices. Ah yes, the what. Not only is what your things does litearlly the only thing people care about, it also helps guide tech choices.


What You Build is a post from CSS-Tricks



from CSS-Tricks http://ift.tt/2BWBPKI
via IFTTT

Friday 29 December 2017

Auto-Sizing Columns in CSS Grid: `auto-fill` vs `auto-fit`

Making The Transition From After Effects To CSS Transitions And Keyframes

Websites are looking more and more like mobile apps. Users are also increasingly expecting a more app-like experience. From push notifications to offline mode, native web apps are getting there. Once web apps function like native apps, the design interactions would also change to address the use case — namely, the ubiquity of animations. Animations drive interactions in all of our favourite apps, from Uber to Lyft and Snapchat to Instagram.

from Articles on Smashing Magazine — For Web Designers And Developers http://ift.tt/2zLV4EI
via IFTTT

How to Rank in 2018: The SEO Checklist - Whiteboard Friday

Posted by randfish

It's hard enough as it is to explain to non-SEOs how to rank a webpage. In an increasingly complicated field, to do well you've got to have a good handle on a wide variety of detailed subjects. This edition of Whiteboard Friday covers a nine-point checklist of the major items you've got to cross off to rank in the new year — and maybe get some hints on how to explain it to others, too.

How to Rank in 2018: An SEO Checklist

Click on the whiteboard image above to open a high-resolution version in a new tab!

Video Transcription

Howdy, Moz fans, and welcome to a special New Year's edition of Whiteboard Friday. This week we're going to run through how to rank in 2018 in a brief checklist format.

So I know that many of you sometimes wonder, "Gosh, it feels overwhelming to try and explain to someone outside the SEO profession how to get a web page ranked." Well, you know what? Let's explore that a little bit this week on Whiteboard Friday. I sent out a tweet asking folks, "Send me a brief checklist in 280 characters or less," and I got back some amazing responses. I have credited some folks here when they've contributed. There is a ton of detail to ranking in the SEO world, to try and rank in Google's results. But when we pull out, when we go broad, I think that just a few items, in fact just the nine we've got here can basically take you through the majority of what's required to rank in the year ahead. So let's dive into that.

I. Crawlable, accessible URL whose content Google can easily crawl and parse.

So we want Googlebot's spiders to be able to come to this page, to understand the content that's on there in a text readable format, to understand images and visuals or video or embeds or anything else that you've got on the page in a way that they are going to be able to put into their web index. That is crucial. Without it, none of the rest of this stuff even matters.

II. Keyword research

We need to know and to uncover the words and phrases that searchers are actually using to solve or to get answers to the problem that they are having in your world. Those should be problems that your organization, your website is actually working to solve, that your content will help them to solve.

What you want here is a primary keyword and hopefully a set of related secondary keywords that share the searcher's intent. So the intent behind of all of these terms and phrases should be the same so that the same content can serve it. When you do that, we now have a primary and a secondary set of keywords that we can target in our optimization efforts.

III. Investigate the SERP to find what Google believes to be relevant to the keywords's searches

I want you to do some SERP investigation, meaning perform a search query in Google, see what comes back to you, and then figure out from there what Google believes to be relevant to the keywords searches. What does Google think is the content that will answer this searcher's query? You're trying to figure out intent, the type of content that's required, and whatever missing pieces might be there. If you can find holes where, hey, no one is serving this, but I know that people want the answer to it, you might be able to fill that gap and take over that ranking position. Thanks to Gaetano, @gaetano_nyc, for the great suggestion on this one.

IV. Have the most credible, amplifiable person or team available create content that's going to serve the searcher's goal and solve their task better than anyone else on page one.

There are three elements here. First, we want an actually credible, worthy of amplification person or persons to create the content. Why is that? Well, because if we do that, we make amplification, we make link building, we make social sharing way more likely to happen, and our content becomes more credible, both in the eyes of searchers and visitors as well as in Google's eyes too. So to the degree that that is possible, I would certainly urge you to do it.

Next, we're trying to serve the searcher's goal and solve their task, and we want to do that better than anyone else does it on page one, because if we don't, even if we've optimized a lot of these other things, over time Google will realize, you know what? Searchers are frustrated with your result compared to other results, and they're going to rank those other people higher. Huge credit to Dan Kern, @kernmedia on Twitter, for the great suggestion on this one.

V. Craft a compelling title, meta description.

Yes, Google still does use the meta description quite frequently. I know it seems like sometimes they don't. But, in fact, there's a high percent of the time when the actual meta description from the page is used. There's an even higher percentage where the title is used. The URL, while Google sometimes truncates those, also used in the snippet as well as other elements. We'll talk about schema and other kinds of markup later on. But the snippet is something that is crucial to your SEO efforts, because that determines how it displays in the search result. How Google displays your result determines whether people want to click on your listing or someone else's. The snippet is your opportunity to say, "Come click me instead of those other guys." If you can optimize this, both from a keyword perspective using the words and phrases that people want, as well as from a relevancy and a pure drawing the click perspective, you can really win.

VI. Intelligently employ those primary, secondary, and related keywords

Related keywords meaning those that are semantically connected that Google is going to view as critical to proving to them that your content is relevant to the searcher's query — in the page's text content. Why am I saying text content here? Because if you put it purely in visuals or in video or some other embeddable format that Google can't necessarily easily parse out, eeh, they might not count it. They might not treat it as that's actually content on the page, and you need to prove to Google that you have the relevant keywords on the page.

VII. Where relevant and possible, use rich snippets and schema markup to enhance the potential visibility that you're going to get.

This is not possible for everyone. But in some cases, in the case that you're getting into Google news, or in the case that you're in the recipe world and you can get visuals and images, or in the case where you have a featured snippet opportunity and you can get the visual for that featured snippet along with that credit, or in the case where you can get rich snippets around travel or around flights, other verticals that schema is supporting right now, well, that's great. You should take advantage of those opportunities.

VIII. Optimize the page to load fast, as fast as possible and look great.

I mean look great from a visual, UI perspective and look great from a user experience perspective, letting someone go all the way through and accomplish their task in an easy, fulfilling way on every device, at every speed, and make it secure too. Security critically important. HTTPS is not the only thing, but it is a big part of what Google cares about right now, and HTTPS was a big focus in 2016 and 2017. It will certainly continue to be a focus for Google in 2018.

IX. You need to have a great answer to the question: Who will help amplify this and why?

When you have that great answer, I mean a specific list of people and publications who are going to help you amplify it, you've got to execute to earn solid links and mentions and word of mouth across the web and across social media so that your content can be seen by Google's crawlers and by human beings, by people as highly relevant and high quality.

You do all this stuff, you're going to rank very well in 2018. Look forward to your comments, your additions, your contributions, and feel free to look through the tweet thread as well.

Thanks to all of you who contributed via Twitter and to all of you who followed us here at Moz and Whiteboard Friday in 2017. We hope you have a great year ahead. Thanks for watching. Take care.

Video transcription by Speechpad.com


Sign up for The Moz Top 10, a semimonthly mailer updating you on the top ten hottest pieces of SEO news, tips, and rad links uncovered by the Moz team. Think of it as your exclusive digest of stuff you don't have time to hunt down but want to read!



from The Moz Blog http://ift.tt/2Ci0PPT
via IFTTT

Thursday 28 December 2017

The Very Best of the Moz Blog 2017: Our Top 50 Posts

Posted by FeliciaCrawford

Now, I know we technically have a few days left in 2017, but I'm ready to dive head-first into a fond, full-blown retrospective. Each year we look back on what we've published, compiling and sharing the pieces you liked best. Normally we divvy it up via various metrics: traffic, 1Metric score, total thumbs up, total comments, the best of YouMoz, and so on and so forth. This year, however, we're doing things just a little differently.

A lot has changed in the past year...

The way we run the blog has changed in a few significant ways from the days of yesteryear. YouMoz, our user-generated content blog, was retired in the autumn of 2016 (though we hope to resurrect it in another form someday). We reduced our publishing frequency a bit, and refocused our content on core SEO topics after spending 2015 and 2016 branching out into other marketing subjects (like social media and content marketing). We also made some big changes with regards to commenting: we closed comments on posts older than 30 days (they became veritable spam factories), and implemented stricter moderation filters to better catch spammy comments fishing for either a link or easy MozPoints.

And if I'm being completely honest, I don't think the "Best of" posts from years past have offered you, our beloved readers, as much value as they should've. The most excited comments on those posts occur when someone discovers a gem they'd missed, when a post reaches out to you from the masses of online content clamoring for your attention and speaks to you. The way we formerly ranked "the best" resulted in a lot of overlap; the same few posts with lots of thumbs up, a busy comments section, and high traffic overwhelmed the leaderboard.

What criteria now determines "best"?

At the end of 2017, we're starting fresh. First, I've taken our ten most popular blog post categories by traffic — these represent the topics readers are actively seeking information on. Next, I thought about which metric matters most to me when I consider the success of a blog post. Traffic, thumbs, social shares... Nice to see, yes, but they don't paint a very clear picture of a post's impact. I found myself returning to my favorite blog post metric again and again: the comments.

A post with a lively comments section can be many things. Perhaps it sparked questions or debate; perhaps the findings were controversial; perhaps it was simply inspiring. Whatever the reason, a heavily commented-on post represents something that struck a chord, that convinced a person to peek out from behind their keyboard shield and contribute a thought, that coaxed a little extra effort and commitment from our community. As a silent lurker myself, I am consistently blown away by the humility, genius, and generosity you all display in the blog comments section every day.

So there we have it: this year's Best of the Moz Blog 2017 is a list of the top five most-commented posts in the top ten blog categories. That's fifty unique blog posts throughout the year on a variety of topics, some of which you may have missed. Most blog posts fall into several of our categories, but every post will only be listed once; if it's hit the top five in a more popular category, I've taken it out of the running for the rest. It's my sincere hope that this list uncovers something useful for you, something that helps make your job and day just a little easier.

Without further ado, let's get this party started!

(If you're curious, check out the Best of 2016 and the Best of 2015, too.)


The top 5 Whiteboard Fridays

Whiteboard Friday is far and away our most popular blog category, earning three times as much traffic as the rest. Because it always overlaps with at least one other category, you're bound to get a tidy grab bag of SEO takeaways with this list!

10 Things that DO NOT (Directly) Affect Your Google Rankings

Rand Fishkin, September 22nd

Thumbs: 85
Comments: 180

What do the age of your site, your headline H1/H2 preference, bounce rate, and shared hosting all have in common? You might've gotten a hint from the title: not a single one of them directly affects your Google rankings. In this rather comforting Whiteboard Friday, Rand lists out ten factors commonly thought to influence your rankings that Google simply doesn't care about.

What Do Google's New, Longer Snippets Mean for SEO?

Rand Fishkin, December 8th

Thumbs: 100
Comments: 136

Featured snippets and meta descriptions have brand-new character limits, and it's a huge change for Google and SEOs alike. Learn about what's new, when it changed, and what it all means for SEO in this episode of Whiteboard Friday. (And this is cheating, but for good measure, you might follow up with Dr. Pete's official recommendation for meta description lengths in 2018.)

What Links Can You Get that Comply with Google's Guidelines?

Marie Haynes, January 20th

Thumbs: 68
Comments: 112

If you've ever been the victim of a Google penalty, you know how painful it can be to identify the problem and recover from the hit. Even if you've been penalty-free thus far, the threat of getting penalized is a source of worry. But how can you avoid it, when it seems like unnatural links lurk around every corner?

In this Whiteboard Friday, we warmly welcome Google penalty and unnatural link expert Marie Haynes as she shares how to earn links that do comply with Google's guidelines, that will keep your site out of trouble, and that can make a real impact.

7 ‹Title Tag› Hacks for Increased Rankings + Traffic - Whiteboard Friday

Cyrus Shepard, May 5th

Thumbs: 185
Comments: 103

You may find yourself wondering whether the humble title tag still matters in modern SEO. When it comes to your click-through rate, the answer is a resounding yes! In this Whiteboard Friday, we welcome back our good friend Cyrus Shepard to talk about 7 ways you can revamp your title tags to increase your site traffic and rankings.

Comment Marketing: How to Earn Benefits from Community Participation

Rand Fishkin, January 13th

Thumbs: 53
Comments: 97

It's been a few years since we've covered the topic of comment marketing, but that doesn't mean it's out of date. There are clever, intentional ways to market yourself and your brand in the comments sections of sites, and there's less competition now than ever before. In this Whiteboard Friday, Rand details what you can do to get noticed in the comments and the benefits you'll reap from high-quality contributions.


The top 5 posts in On-Page SEO

The results of our recent Moz Blog Reader Survey highlighted on-page SEO as the topic you'd most like to learn about, so it's not surprising to see that this category sits right under Whiteboard Friday for popularity. There's an interesting theme that emerges from these top posts: it seems we're still working on many of the same things, but how we treat them has necessarily changed over time.

How Links in Headers, Footers, Content, and Navigation Can Impact SEO - Whiteboard Friday

Rand Fishkin, October 20th

Thumbs: 68
Comments: 92

Which link is more valuable: the one in your nav, or the one in the content of your page? Now, how about if one of those in-content links is an image, and one is text? Not all links are created equal, and getting familiar with the details will help you build a stronger linking structure. This Whiteboard Friday covers links in headers and footers, in navigation versus content, and how that can affect internal and external links, link equity, and link value between your site and others.

It's Time to Stop Doing On-Page SEO Like It's 2012

Rand Fishkin, February 6th

Thumbs: 84
Comments: 91

On-page SEO has evolved in the past five years. Rand outlines the changes in five succinct tactics: move beyond keyword repetition rules; searcher intent matters more than raw keywords; related topics are essential; links don't always beat on-page; and topical authority is more important than ever.

The Wonderful World of SEO Meta Tags [Refreshed for 2017]

Kate Morris, April 13th

Thumbs: 46
Comments: 67

Which meta tags are absolutely necessary, which are dependent on your situation, and which should you absolutely ignore or remove? Kate Morris refreshes her original 2010 post on the subject of meta tags, sharing a few new tips and reiterating what's remained the same over the past 7 years.

Designing a Page's Content Flow to Maximize SEO Opportunity - Whiteboard Friday

Rand Fishkin, December 1st

Thumbs: 54
Comments: 48

Controlling and improving the flow of your on-site content can actually help your SEO. What's the best way to capitalize on the opportunity present in your page design? Rand covers the questions you need to ask (and answer) and the goals you should strive for in this edition of Whiteboard Friday.

How to Do a Content Audit [Updated for 2017]

Everett Sizemore, March 22nd

Thumbs: 49
Comments: 31

Learn how to do content audits for SEO in this comprehensive, updated guide by Everett Sizemore, including tips for crawling large websites, rendering JavaScript content, and auditing dynamic mobile content.


The top 5 posts in Local SEO

Local SEO overlaps with what we think of as traditional SEO in many ways, so it's not surprising at all to see this category near the top. There's still a lot of doubt and apprehension, it seems, when it comes to local SEO best practices and what really works, and the top posts in this category reflect that.

Local SEO Spam Tactics Are Working: How You Can Fight Back

Casey Meraz, March 28th

Thumbs: 48
Comments: 75

It's very clear that spam tactics in Google's local results are earning higher rankings. In this post, Casey Meraz identifies exactly what spammers are doing to get ahead, what they can get away with, and what you can do to fight back against the problem plaguing local results.

Not-Actually-the-Best Local SEO Practices

Miriam Ellis, December 11th

Thumbs: 47
Comments: 72

Not all common practices in local SEO are the best practices. In fact, some of them can be pretty darn harmful. Check out Miriam's list of what-not-to-dos (and what-you-should-actually-dos) in this comprehensive blog post.

The 2017 Local SEO Forecast: 10 Predictions According to Mozzers

Miriam Ellis, February 14th

Thumbs: 35
Comments: 67

From Google providing intimate details about businesses to Amazon expanding even further into the local scene, local SEO stood to see a lot of change this year. Check out what the SEOs at Moz had to say about what to prepare for in 2017.

Proximity to Searcher is the New #1 Local Search Ranking Factor

Darren Shaw, February 22nd

Thumbs: 58
Comments: 65

Forget everything you thought you knew about the most impactful local ranking factors — searcher proximity just may be the number-one thing influencing where a local business shows on the SERPs.

How to Perform a Basic Local Business Competitive Audit

Miriam Ellis, August 22nd

Thumbs: 32
Comments: 65

Are you outranked in Google's Local Pack? Then it's high time to perform a competitive business audit. Use this example analysis and downloadable spreadsheet to analyze the strengths and weaknesses of multiple businesses and devise a plan to win.


The top 5 posts in Basic SEO

Basic SEO is another category that enjoys a lot of overlap with other topics; perhaps that's one reason why it's so popular. This year's top posts in this category cover a range of subjects, and all are pretty useful for someone learning (or leveling up in) SEO.

Aren't 301s, 302s, and Canonicals All Basically the Same? - Whiteboard Friday

Dr. Pete, March 3rd

Thumbs: 62
Comments: 69

They say history repeats itself. In the case of the great 301 vs 302 vs rel=canonical debate, it repeats itself about every three months. In this Whiteboard Friday, Dr. Pete explains how bots and humans experience pages differently depending on which solution you use, why it matters, and how each choice may be treated by Google.

How to Prioritize SEO Tasks [+Worksheet]

Britney Muller, September 21st

Thumbs: 41
Comments: 64

An absolute essential if you want to keep yourself from getting overwhelmed, Moz's own SEO Britney Muller offers five tips for prioritizing your SEO work: setting specific goals, identifying important pages for conversions, uncovering technical opportunities via a site crawl, time management, and providing consistent benchmarks and reporting.

5 Tactics to Earn Links Without Having to Directly Ask - Whiteboard Friday

Rand Fishkin, July 28th

Thumbs: 71
Comments: 63

Typical link outreach is a tired sport, and we've all but alienated most content creators with our constant link requests. In this Whiteboard Friday, Rand outlines five smart ways to earn links to your site without having to beg.

"SEO Is Always Changing"... Or Is It?: Debunking the Myth and Getting Back to Basics

Bridget Randolph, July 19th

Thumbs: 56
Comments: 60

We're so fond of the idea that SEO is hard because it's always changing. But is that really true? Bridget Randolph challenges a common industry refrain and brings us back to the basics of what's really important in our work.

How to Target Multiple Keywords with One Page - Next Level

Brian Childs, June 15th

Thumbs: 45
Comments: 56

In this edition of our educational Next Level series, you'll learn an easy workflow for researching and targeting multiple keywords with a single page.


The top five posts in Link Building

A thousand years from now, when the Space Needle has toppled into Puget Sound and our great-great-great-great-etc. grandchildren are living on Mars, link building will still prove to be one of the most popular subjects on the Moz Blog. And you get a double-whammy of goodness this year, because they just so happen to all be Whiteboard Fridays!

Should SEOs Care About Internal Links? - Whiteboard Friday

Rand Fishkin, May 26th

Thumbs: 85
Comments: 87

Internal links are one of those essential SEO items you have to get right to avoid getting them really wrong. Rand shares 18 tips to help inform your strategy, going into detail about their attributes, internal vs. external links, ideal link structures, and much, much more in this edition of Whiteboard Friday.

How to Prioritize Your Link Building Efforts & Opportunities - Whiteboard Friday

Rand Fishkin, February 17th

Thumbs: 73
Comments: 81

We all know how effective link building efforts can be, but it can be an intimidating, frustrating process — and sometimes even a chore. In this Whiteboard Friday, Rand builds out a framework you can start using today to streamline and simplify the link building process for you, your teammates, and yes, even your interns.

The 3 Easiest Link Building Tactics Any Website Can Use to Acquire Their First 50 Links - Whiteboard Friday

Rand Fishkin, September 8th

Thumbs: 81
Comments: 77

Without a solid base of links, your site won't be competitive in the SERPs — even if you do everything else right. But building your first few links can be difficult and discouraging, especially for new websites. Never fear — Rand is here to share three relatively quick, easy, and tool-free (read: actually free) methods to build that solid base and earn yourself links.

When and How to Use Domain Authority, Page Authority, and Link Count Metrics - Whiteboard Friday

Rand Fishkin, June 16th

Thumbs: 50
Comments: 71

How can you effectively apply link metrics like Domain Authority and Page Authority alongside your other SEO metrics? Where and when does it make sense to take them into account, and what exactly do they mean? In this Whiteboard Friday, Rand answers these questions and more, arming you with the knowledge you need to better understand and execute your SEO work.

Image Link Building - Whiteboard Friday

Britney Muller, December 15th

Thumbs: 48
Comments: 63

Image link building is a delicate art. There are some distinct considerations from traditional link building, and doing it successfully requires a balance of creativity, curiosity, and having the right tools on hand. In this Whiteboard Friday, Moz's own SEO and link building aficionado Britney Muller offers up concrete advice for successfully building links via images.


The top 5 posts in Advanced SEO

2017's top posts in the advanced SEO category cover just about every post type we like to publish (and that you like to read): in-depth case studies, Whiteboard Fridays, best practice advice, and solid how-tos.

[Case Study] How We Ranked #1 for a High-Volume Keyword in Under 3 Months

Dmitry Dragilev, April 19th

Thumbs: 73
Comments: 140

If you've been struggling to take the number-one spot in the SERPs for a competitive keyword, take a cue from this case study. Dmitry Dragilev shares his team's 8-step methodology for ranking first in a popular niche.

How Google AdWords (PPC) Does and Doesn't Affect Organic Results - Whiteboard Friday

Rand Fishkin, November 17th

Thumbs: 68
Comments: 89

It's common industry knowledge that PPC can have an effect on our organic results. But what effect is that, exactly, and how does it work? In this Whiteboard Friday, Rand covers the ways paid ads influence organic results — and one very important way they don't.

SEO Best Practices for Canonical URLs + the Rel=Canonical Tag - Whiteboard Friday

Rand Fishkin, July 14th

Thumbs: 62
Comments: 87

If you've ever had any questions about the canonical tag, well, have we got the Whiteboard Friday for you. In this episode, Rand defines what rel=canonical means and its intended purpose, when it's recommended you use it, how to use it, and sticky situations to avoid.

How to Uncover Hidden Keyword-Level Data Using Google Sheets

Sarah Lively, February 13th

Thumbs: 42
Comments: 83

Which keywords are driving your organic traffic? Keyword-level data doesn't have to be (not provided). Sarah Lively shares a smart solution using two free add-ons for Google Sheets.

How Long Should Your Meta Description Be? (2018 Edition)

Dr. Pete, December 19th

Thumbs: 49
Comments: 76

The end of November saw a spike in the average length of SERP snippets. Across 90K results, we found a definite increase but many oddities, such as video snippets. Our data suggests that many snippets are exceeding 300 characters, and we recommend a new meta description limit of 300 characters.


The top 5 posts in Technical SEO

Technical SEO posts are some of my favorite categories to publish (which is perhaps a strange sentiment coming from a poetry major). The debate that recently raged — about whether it's necessary or unnecessary for SEO — will always stick with many of us, as will Rand's excellent Whiteboard Friday rebuttal on the topic.

XML Sitemaps: The Most Misunderstood Tool in the SEO's Toolbox

Michael Cottam, April 11th

Thumbs: 43
Comments: 83

XML sitemaps are a powerful tool for SEOs, but are often misunderstood and misused. Michael Cottam explains how to leverage XML sitemaps to identify and resolve indexation problems.

JavaScript & SEO: Making Your Bot Experience As Good As Your User Experience

Alexis Sanders, June 20th

Thumbs: 56
Comments: 79

More and more, we're realizing it's incredibly important for us as SEOs to understand JavaScript's impact on search experience. Can search engines see your content and experience your site the way a user does? If not, what solutions can you use to fix it?

Pros and Cons of HTTPS Services: Traditional vs Let's Encrypt vs Cloudflare

JR Ridley, September 13th

Thumbs: 38
Comments: 78

Thinking about going secure? It's more important than ever, with Google issuing security warnings for many non-secure sites in Chrome. This comparison of three popular HTTPS services will help you determine the best option for implementing an SSL certification on your site.

Mastering Google Search Operators in 67 Easy Steps

Dr. Pete, March 1st

Thumbs: 82
Comments: 76

Google search operators are like chess – knowing how the pieces move doesn't make you a master. Dive into 67 examples, from content research to site audits, and level up your search operator game.

Unlocking Hidden Gems Within Schema.org

Alexis Sanders, October 18th

Thumbs: 45
Comments: 69

Schema.org can be a confusing resource if you're trying to learn how to use and implement structured data. This mini-guide arms you with the right kind of thinking to tackle your next structured data project.


The top 5 posts in Keyword Research

The posts generating the most buzz in our keyword research category seem to revolve around quick yet effective wins and tactical advice. And with time constraints being one of the biggest challenges reported in our Reader's Survey, it's really no surprise.

The Lazy Writer’s Guide to 30-Minute Keyword Research

Britney Muller, July 26th

Thumbs: 52
Comments: 54

Keyword research doesn’t have to be a marathon bender. A brisk 30-minute walk can provide incredible insights — insights that connect you with a wider audience on a deeper level. Britney Muller shares several ways to get your keyword research tasks done efficiently and well.

The Keyword + Year Content/Rankings Hack - Whiteboard Friday

Rand Fishkin, February 10th

Thumbs: 63
Comments: 49

What's the secret to earning site traffic from competitive keywords with decent search volume? The answer could be as easy as 1, 2, 3 — or more precisely, 2, 0, 1, 7. In this Whiteboard Friday, Rand lets you in on a relatively straightforward tactic that can help you compete in a tough space using very fresh content.

3 Tactics for Hyperlocal Keywords - Whiteboard Friday

Rand Fishkin, February 24th

Thumbs: 63
Comments: 47

Trying to target a small, specific region with your keywords can prove frustrating. While reaching a high-intent local audience is incredibly valuable, without volume data to inform your keyword research, you'll find yourself hitting a wall. In this Whiteboard Friday, Rand shares how to uncover powerful, laser-focused keywords that will reach exactly the right people.

Which of My Competitor's Keywords Should (& Shouldn't ) I Target? - Whiteboard Friday

Rand Fishkin, November 24th

Thumbs: 45
Comments: 44

You don't want to try to rank for every one of your competitors' keywords. Like most things with SEO, it's important to be strategic and intentional with your decisions. In this Whiteboard Friday, Rand shares his recommended process for understanding your funnel, identifying the right competitors to track, and prioritizing which of their keywords you ought to target.

NEW in Keyword Explorer: See Who Ranks & How Much with Keywords by Site

Rand Fishkin, October 23rd

Thumbs: 41
Comments: 43

It's not often that a product-focused post makes our blog's Best of the Year list, so this is both interesting and heartening to see. We worked really hard to bring better data and more usefulness to Keyword Explorer this year, and y'all left some really kind sentiments in the comments. Thanks for always being here for us, folks! :)


The top 5 posts in Content

I won't say it, I promise. ;) But content is just as important as ever, and the rather vague advice of "create great content and the rest will come" has certainly gotten a bit exhausting over the years. We've made an effort to publish more actionable ways to think about and use content, and it seems like that's been resonating with you so far!

Refurbishing Top Content - Whiteboard Friday

Britney Muller, February 3rd

Thumbs: 66
Comments: 82

You've got top-performing content on your site that does really well. Maybe it's highly converting, maybe it garners the most qualified traffic — but it's just sitting there gathering dust. Isn't there something else you can do with content that's clearly proven its worth?

As it turns out, there is! In this Whiteboard Friday, Britney Muller shares three easy steps for identifying, repurposing, and republishing your top content to juice every drop of goodness out of it.

What We Learned From Analyzing 1.4 Million Featured Snippets

A.J. Ghergich, January 17th

Thumbs: 48
Comments: 78

From optimal snippet length, to practical application tips, to which queries prefer tables, lists, or paragraphs, learn everything you need to know to supercharge your snippet wins.

The Perfect Blog Post Length and Publishing Frequency is B?!!$#÷x - Whiteboard Friday

Rand Fishkin, August 18th

Thumbs: 76
Comments: 65

The perfect blog post length or publishing frequency doesn't actually exist. "Perfect" isn't universal — your content's success depends on tons of personalized factors. In this Whiteboard Friday, Rand explains why the idea of "perfect" is baloney when it comes to your blog, and lists what you should actually be looking for in a successful publishing strategy.

Learning to Re-Share: 4 Strategies to Renew, Refresh, and Recycle Content for Bigger Reach

Jen Carney, August 2nd

Thumbs: 31
Comments: 51

You've spend too much time and effort on content creation to share it only once. Check out four smart strategies you can implement today to improve the reach of your existing content.

How to Build the Right Content Marketing Strategy for SEO Growth

Alli Berry, November 15th

Thumbs: 30
Comments: 51

Keywords are important for innumerable SEO tasks, but driving your content marketing strategy isn't one of them. Your strategy should be based on the audience you're trying to reach if you want your organic traffic to convert.


Paid Search Marketing

While it perhaps seems a little strange for an SEO blog to cover, paid search plays an important part in our digital marketing world, and as reported in our Reader's Survey, plenty of us wear more than one hat. Here are the top posts from 2017 that generated the most commentary about all things paid:

Do iPhone Users Spend More Online Than Android Users?

Martin Meany, October 11th

Thumbs: 27
Comments: 71

iPhone users tend to spend 3x as much as Android users, according to an analysis of 31 million mobile e-commerce sessions. Digital marketers can capitalize on this revelation via Facebook and AdWords.

Branding Success: How to Use PPC to Amplify Your Brand

Purna Virji, February 21st

Thumbs: 34
Comments: 44

You might be surprised to learn that branding and PPC go hand-in-hand. Find out how to leverage your PPC campaigns to strengthen your brand and win conversions and loyalty from your customers.

No, Paid Search Audiences Won’t Replace Keywords

Kirk Williams, May 30th

Thumbs: 33
Comments: 29

Keywords or audience targeting? Kirk Williams sets out to argue that far from being dead, keywords are still the most useful tool in the paid search marketer's toolbox.

Paid Social for Content Marketing Launches - Whiteboard Friday

Kane Jamison, September 29th

Thumbs: 31
Comments: 29

Stuck in a content marketing rut? Relying on your existing newsletter, social followers, or email outreach won't do your launches justice. Boosting your signal with paid social both introduces your brand to new audiences and improves your launch's traffic and results. In this Whiteboard Friday, we're welcoming back our good friend Kane Jamison to highlight four straightforward, actionable tactics you can start using ASAP.

The Step-By-Step Guide to Testing Voice Search Via PPC

Purna Virji, March 21st

Thumbs: 30
Comments: 24

Conversational interfaces are becoming more and more popular, but it's hard to know where to start when it comes to voice search. A $50 PPC budget is enough to jumpstart your voice search keyword list and strategy — learn how in this step-by-step guide.


Top comments by thumbs up

Comments are my favorite blog post success metric, and it simply wouldn't do if we didn't honor the folks who contributed the most popular comments in 2017. Thank you, all of you, for sharing your thoughts with the greater Moz and SEO community, and for taking precious time out of your day to make the blog a more interesting and better place. And for all the comment lurkers out there like me, I offer you solemn solidarity and zero judgment (but I'd be delighted to see y'all venture out from behind the screen now and again ;).

1. Praveen Sharma on "10 Things that DO NOT (Directly) Affect Your Google Rankings - Whiteboard Friday" – 58 thumbs up

Short, sweet, accurate, relevant advice is the name of the game. :) We've had feedback before that some readers come to the blog for the comments as much as the post itself, and this example shows why. Thanks for sharing your insight, Praveen!

2. SEOMG on "7 ‹Title Tag› Hacks for Increased Rankings + Traffic - Whiteboard Friday" – 42 thumbs up

Much like the above, this comment exemplifies clear, useful examples related to the post topic. You rock, SEOMG!

3. Praveen Sharma on "The 3 Easiest Link Building Tactics Any Website Can Use to Acquire Their First 50 Links - Whiteboard Friday" – 39 thumbs up

Swooping in again with another helpful tidbit to add to the blog post at hand, Praveen's made it on the Top 10 list twice. We really appreciate your contributions, Praveen!

4. Trevor Klein on "Moz Transitions: Rand to Step Away from Operations and into Advisory Role in Early 2018" – 38 thumbs up

A bittersweet comment that clearly struck a chord with many in our community. Rand, I hope you know how much we all love and appreciate you! And Trevor, thank you so much for your candid and genuine thoughts; you truly spoke for all of us there.

5. Gianluca Fiorelli on "SEO Best Practices for Canonical URLs + the Rel=Canonical Tag - Whiteboard Friday" – 30 thumbs up

Gianluca's comments on the Moz Blog are legendary; each one is a treasure, a miniature blog post in and of itself. Thank you for sharing your smarts with us, Gianluca!

6. Rand Fishkin on "What Do Google's New, Longer Snippets Mean for SEO? - Whiteboard Friday" – 28 thumbs up

By using the comments section to clarify a few points about his Whiteboard Friday video and highlight his advice, Rand adds extra value and oomph to the post as a whole... and the community responded. :) Thank you for always leaving 10X comments, Rand!

7. Eric Hahn on "10 Things that DO NOT (Directly) Affect Your Google Rankings - Whiteboard Friday" – 26 thumbs up

The discussion in the thread spurred by this helpful, on-topic comment is the kind of lively, educational back-and-forth we love to witness. Thank you for inspiring folks to ask questions and learn, Eric!

8. Igor Gorbenko on "What Do Google's New, Longer Snippets Mean for SEO? - Whiteboard Friday" – 25 thumbs up

It makes me really happy that our community has — and rewards — such awesome personality. Igor, thank you for your wit and your insights! á••(⌐■_■)á•— ♪♬

9. Tim Soulo on "Moz Transitions: Rand to Step Away from Operations and into Advisory Role in Early 2018" – 22 thumbs up

The blog community definitely resonated with all the heartfelt, personal stories shared on this post. Tim, thank you for sharing!

10. Gianluca Fiorelli on "Comment Marketing: How to Earn Benefits from Community Participation - Whiteboard Friday" – 21 thumbs up

In an incredibly meta turn of events, Gianluca's comment on our Comment Marketing Whiteboard Friday rounds out the list of 2017's top comments on the Moz Blog. I don't think there's a person on this Internet that's done a better job of personal comment marketing than Gianluca! :)


Here's to you!

Thank you all, each and every one of you, for helping to keep our little community a thriving, nurturing place to learn SEO, share ideas, and hey, even make mistakes now and again. It's an honor to have a hand in providing content to such a TAGFEE and brilliant group of people, and I can't describe how excited I am for all that 2018 will bring.

Let me know in the comments how you liked the change-up this year, what other "Best of" formats or lists you might find helpful, and any other ponderings or thoughts you might have — and thank you again for reading!


Sign up for The Moz Top 10, a semimonthly mailer updating you on the top ten hottest pieces of SEO news, tips, and rad links uncovered by the Moz team. Think of it as your exclusive digest of stuff you don't have time to hunt down but want to read!



from The Moz Blog http://ift.tt/2ldTCH3
via IFTTT

A Sneak-Peek Inside The Southeast Asian Web Community

A few weeks ago, Vitaly Friedman (co-founder of this little magazine) and I had the pleasure to join the Mozilla’s Developer Roadshow, traveling through four countries in Southeast Asia in just two weeks. We visited cities that are buzzing with life and met people who share our passion for the web. Our mission: To get up close with the Southeast Asian web community. We wanted to learn how different local communities are compared to Europe and the US.

from Articles on Smashing Magazine — For Web Designers And Developers http://ift.tt/2Choo8V
via IFTTT

Five Design Fears to Vanquish With CSS Grid

CSS grid, along with a handful of other new CSS properties, are revolutionizing web design. Unfortunately, the industry hasn't embraced that revolution yet and a lot of it is centered around fear that we can trace back to problems with the current state of CSS grid tutorials.

The majority of them fall into one of two categories:

  1. Re-creating classic web design patterns. Grid is great at replicating classic web design patterns like card grids and "holy grail" pages.
  2. Playing around. Grid is also great for creating fun things like Monopoly boards or video game interfaces.

These types of tutorials are important for new technology. They're a starting point. Now is the time, as Jen Simmons says, to get out of our ruts. To do that, we must cast off our design fears.

Fear 1: Asymmetry

We've been trained in the era of frameworks that symmetric and orderly designs are better. It's true that for many applications a symmetric design or an orderly grid of items is preferred. Yet, asymmetry has the ability to capture the eye and mind in a way that symmetry never will. Asymmetry is interesting in its disorder. If you're nervous, you can always start small.

See the Pen Asymmetric Promo Grid by Bryan Robinson (@brob) on CodePen.

In this example, we have a simple promotional space. By using an asymmetric vertical and horizontal layout, we can make a stronger visual match between our icon and our button. This isn't a large space, but it's not afraid of using whitespace to draw the user's eye where we want it to go.

Speaking of whitespace...

Fear 2: Negative Space

As we left the early 2000s, we decided it was OK if users had to scroll. We began introducing whitespace into our designs and most of this fell between rows of content. This made our designs much cleaner, but is vertical whitespace the only valid option?

In this example, the design incorporates negative space to create a sense of exploration through the page. By not using traditional content rows, the user's eye is given a chance to scan and take things in at a slower pace.

See the Pen Experimental Homepage by Bryan Robinson (@brob) on CodePen.

Fear 3: Punk Rock?

There's no shortage of design talks focused on the print layouts of the 1970s. It was a time of great stability in design tooling, which allowed creativity to bloom. With that came inspired and avant-garde design work that centered around the punk-rock scene.

So my question is this: Can we be punk rockers in web design?

In this example, the design doesn't care about your preconceptions. Text overlap is a bug? Nope, it's a feature. Images shouldn't compete with each other? Survival of the fittest!

See the Pen Grid Overlap and Punk Rock Meditation by Bryan Robinson (@brob) on CodePen.

As this example asks, is this a good idea? It's completely up for debate. What I know is this: our tools have matured and become more stable; now is the time for experimentation. Do we want the web to look the same year after year, or do we want to dream up new and exciting patterns?

Fear 4: New Sources of Inspiration

Sources of inspiration shouldn't cause fear, but they do often cause headaches. Remember, inspiration doesn't mean a 1:1 translation of a concept.

Punk rock graphic design

I mentioned earlier the amazing designs that came out of the '70s and '80s. Here are some links to continue researching punk-rock design:

Vintage movie graphic design

Studying film in college gave me a great appreciation for vintage movie graphic design. One of my professors once told me: "You should be able to tell the tone and subject of a film by its title cards."

This is especially true of post-World War II films. Their title sequences and posters are a treasure trove of design ideas for setting a scene.

Learn how to create graphic design grids

Graphic designers have been using grids for layout for centuries, and there's a lot of great literature on the creation of these grids:

Fear 5: Fallbacks

It's true that Grid has only 74% support in the U.S. (at the time of this writing).

That should not stop you from pushing your designs forward. There are plenty of strategies for starting with support for all browsers and then pushing forward into new patterns.

What's next?

It falls to each of us to push our industry forward. The technology is in place to challenge ourselves to create new and interesting designs. This doesn't have to be as pointed and intense as some of these examples. It starts by realizing we can do amazing things … or we can stagnate.

How will you push the industry forward?


Five Design Fears to Vanquish With CSS Grid is a post from CSS-Tricks



from CSS-Tricks http://ift.tt/2laUNa7
via IFTTT

​Wix.com: Make the Web Your Playground

Front-End Tools: My Favorite Finds of 2017

Wednesday 27 December 2017

A Sliding Nightmare: Understanding the Range Input

::part and ::theme, an ::explainer

Monica Dinculescu on ::part and ::theme, two pseudo-elements that are very likely to gain traction and receive more attention in the new year. They're designed to help us create and style web components, as Monica explains:

The current new proposal is ::part and ::theme, a set of pseudo-elements that allow you to style inside a shadow tree, from outside of that shadow tree. Unlike :shadow and /deep/, they don’t allow you to style arbitrary elements inside a shadow tree: they only allow you to style elements that an author has tagged as being eligible for styling. They’ve already gone through the CSS working group and were blessed, and were brought up at TPAC at a Web Components session, so we’re confident they’re both the right approach and highly likely to be implemented as a spec by all browsers.

If the whole "shadow tree" phrase makes you panic as much as me then not to worry! Monica has already written an excellent piece that goes into great depth about web components and the Shadow DOM spec, too.

Direct Link to ArticlePermalink


::part and ::theme, an ::explainer is a post from CSS-Tricks



from CSS-Tricks http://ift.tt/2AVTUYP
via IFTTT

Tuesday 26 December 2017

Fragmented HTML5 Video

Further working mode changes at WHATWG

The Web Hypertext Application Technology Working Group (WHATWG) announced that it has adopted a formal governance structure:

The WHATWG has operated successfully since 2004 with no formal governance structure, guided by a strong culture of pragmatism and collaboration. Although this has worked well for driving the web forward, we realized that we could get broader participation by being clear about what rights and responsibilities members of the community have. Concretely, this involves creating an IPR Policy and governance structure.

WHATWG was founded by folks at Apple, Mozilla and Opera. The new structure will be comprised of individuals from Apple, Google, Microsoft and Mozilla. The Big Four, you might say.

I find this interesting because we often think of the Web as a wild west where standards are always evolving and adopted at a different pace. This change largely keeps public contributions to the Living Standards in tact, but establishes a clearer line of communication between working groups and provides a path to appeal and resolve disputes over standards.

Living Standards are informed by input from contributors, driven by workstream participants, articulated by editors, and coordinated by the Steering Group. If necessary, controversies are resolved by the Steering Group with members appointed from the organizations that develop browser engines.

And, with representatives from leading browsers at the table, we may see more agreement with adoption. I'm speculating here, but it seems reasonable.

If you're like me and are fuzzy on the differences between WHATWG and W3C, Bruce Lawson has a pretty simple explanation. It still kinda blows my mind that they're both standards we often refer to but come from two completely different groups.

Direct Link to ArticlePermalink


Further working mode changes at WHATWG is a post from CSS-Tricks



from CSS-Tricks http://ift.tt/2AvDrOM
via IFTTT

Refactoring Your Way to a Design System

Mina Markham on refactoring a large and complex codebase into an agile design system, slowly over time:

If you’re not lucky enough to be able to start a new design system from scratch, you can start small and work on a single feature or component. With each new project comes a new opportunity to flesh out a new part of the system, and another potential case study to secure buy-in and showcase its value. Make sure to carefully and thoroughly document each new portion of the system as it’s built. After a few projects, you’ll find yourself with a decent start to a design system.

As a side note, Mina’s point here also reminds me of an old blog post called "Things You Should Never Do" by Joel Spolsky where he talks about how all this work and all this code you feel you needs to be refactored is actually solving a problem. Deleting everything and starting from scratch is almost never a good idea:

When you throw away code and start from scratch, you are throwing away all that knowledge. All those collected bug fixes. Years of programming work.

I’m not entirely sure that Joel’s piece about programming fits snuggly with Mina’s point but I think it’s an interesting one to make nonetheless: new code doesn’t necessarily mean that it’s better.

Direct Link to ArticlePermalink


Refactoring Your Way to a Design System is a post from CSS-Tricks



from CSS-Tricks http://ift.tt/2BT8rps
via IFTTT

Monday 25 December 2017

Mozzy Good Wishes to You & Yours!

Posted by FeliciaCrawford

As the long holiday weekend draws to a close and we prepare to welcome a brand-new year, we at Moz just want to thank you all for a wonderful, fulfilling year on the blog. Your colorful commentary, delightful debates, thrilling thumbs-up, and vivacious visits have made the past twelve months sparkle and shine (and with that, I'll bid the alliteration adieu).

Our "card" features a cameo from a little Moz Dog you may recognize: the inimitable Lettie Pickles!

At the Moz HQ, we practice a multitude of holiday traditions. Whether it's Mozzers gathering in the common room (affectionately named "Roger") to light candles on the menorah during Hanukkah, trading and stealing gifts for the company-wide White Elephant exchange (someone won a bonafide Commodore 64 this year!), or getting our boogie and our board gaming on at the Moz holiday party, we try to honor this special season with a healthy mix of reverence and good old-fashioned fun.

The folks who come to our blog for digital marketing advice hail from almost every remote corner of the world (we know; we looked at our analytics ;). This week, when things tend to slow down and it's just a little more difficult than usual to get anyone to reply to your emails, we'd love to invite you to share your own unique tales and traditions in the comments. What's your favorite way to celebrate, in the office and at home? What mishaps and magical moments alike filled your days, and what's your resolution for 2018? Let's take a little breather as we gear up for all the new projects and responsibilities awaiting us just around the corner and share with each other; after all, that's what being a community is all about! :)


Sign up for The Moz Top 10, a semimonthly mailer updating you on the top ten hottest pieces of SEO news, tips, and rad links uncovered by the Moz team. Think of it as your exclusive digest of stuff you don't have time to hunt down but want to read!



from The Moz Blog http://ift.tt/2DMCBes
via IFTTT

2017 Staff Favorites

Sunday 24 December 2017

Invision Studio

Studio is the name of the new design tool by the team at InVision that’ll launch in January 2018 and it looks like it has a lot of great features, with shared component libraries being one of the more interesting features that I can’t wait to take a closer look at. Also I’m sure that it’ll integrate really nicely with InVision’s existing tools and apps to make prototyping a whole lot easier.

Direct Link to ArticlePermalink


Invision Studio is a post from CSS-Tricks



from CSS-Tricks http://ift.tt/2ywBZcv
via IFTTT

Saturday 23 December 2017

Many Ways to Learn

Julie Zhuo responds to the classic "What can I do to continue my growth?":

One of the things I believe the most firmly is that everyone has something to teach you if you’re looking for the lessons. And these people don’t have to be other designers at your company! There are many paths to becoming an awesome product designer

She lists (and explains):

  • Learn from your users
  • Learn from people with different skillsets
  • Learn by doing 

I have a draft blog post called "Tech Books are Supplementary" that I started in 2011 and somehow haven't gotten around to finishing. One of these days! The point I try to make in it, as you can imagine, is that tech books are just a slice of the learning pie.

I'm playing a lot more banjo lately, trying to level up the best I can. You know what it takes? Going to jams. YouTubing people playing the songs I want to learn. Asking for advice. Listening to tons of recordings. Playing along to those recordings. Buying and reading books on the topic. Finding tabs online.

Learning things well takes hitting it from all sides.

Direct Link to ArticlePermalink


Many Ways to Learn is a post from CSS-Tricks



from CSS-Tricks http://ift.tt/2C9wyiG
via IFTTT

Friday 22 December 2017

Chrome is Not the Standard

Chris Krycho has written an excellent post about how us fickle web developers might sometimes confuse features that land in one browser as being “the future of the web.” However, Chris argues that there’s more than one browser’s vision of the web that we should care about:

No single company gets to dominate the others in terms of setting the agenda for the web. Not Firefox, with its development and advocacy of WebAssembly, dear to my heart though that is. Not Microsoft and the IE/Edge team, with its proposal of the CSS grid spec in 2011, sad though I am that it languished for as long as it did. Not Apple, with its pitch for concurrent JavaScript. And not—however good its developer relations team is—Chrome, with any of the many ideas it’s constantly trying out, including PWAs.

It’s also worth recognizing how these decisions aren’t, in almost any case, unalloyed pushes for “the future of the web.” They reflect business priorities, just like any other technical prioritization.

I particularly like Chris’ last point about business priorities because I think it’s quite easy to forget that browser manufacturers aren’t making the web a better place out of sheer kindness; they’re companies with investors and incentives that might not always align with other companies’ objectives.

Direct Link to ArticlePermalink


Chrome is Not the Standard is a post from CSS-Tricks



from CSS-Tricks http://ift.tt/2DnvVDx
via IFTTT

The Rise of the Butt-less Website

It seems like all the cool kids have divided themselves into two cliques: the Headless CMS crowd on one side and the Static Site Generator crowd on the other. While I admit those are pretty cool team names, I found myself unable to pick a side. To paraphrase Groucho Marx, “I don't care to belong to any club that will have me as a member.”

For my own simple blog (which is embarrassingly empty at the moment), a static site generator could be a great fit. Systems like Hugo and Jekyll have both been highly recommended by developers I love and trust and look great at first glance, but I hit stumbling blocks when I wanted to change my theme or set up more complex JavaScript and interactions across pages. There are ways to solve both these issues, but that’s not the kind of weekend I want to have.

Besides that, I love to experiment, make new things, and I’ve got a major crush on Vue at the moment. Having a Headless CMS setup with a front-end that is decoupled from the back-end could be a great combination for me, but after 7+ years of PHP slinging with WordPress, the whole setup feels like overkill for my basic needs.

What I really want is a static site generator that will let me write a blog as a component of a larger single-page app so I have room to try new things and still have full control over styling, without the need for a database or any sort of back-end. This is a long way of telling you that I’ve found my own club to join, with a decidedly un-cool name.

Get ready for it...

The Butt-less Website

Because there’s no back-end, get it? 😶

It takes a few steps to go butt-less:

  1. Setup a single page app with Vue
  2. Generate each route at build time
  3. Create blog and article components
  4. Integrate Webpack to parse Markdown content
  5. Extend functionality with plugins
  6. Profit!

That last point has to be a part of every proposal, right?

I know it looks like a lot of steps but this is not quite as tough as it seems. Let's break down the steps together.

Setup a single page app with Vue

Let's get Vue up and running. We're going to need Webpack to do that.

I get it, Webpack is pretty intimidating even when you know what’s going on. It’s probably best to let someone else do the really hard work, so we’ll use the Vue Progressive Web App Boilerplate as our foundation and make a few tweaks.

We could use the default setup from the repo, but even while I was writing this article, there were changes being made there. In the interest of not having this all break on us, we will use a repo I created for demonstration purposes. The repo has a branch for each step we'll be covering in this post to help follow along.

View on GitHub

Cloning the repo and check out the step-1 branch:

$ git clone http://ift.tt/2pdbw0J step-1
$ cd vue-yes-blog
$ npm install
$ npm run dev

One of my favorite parts of modern development is that it takes a mere thirty seconds to get a progressive web app up and running!

Next, let’s complicate things.

Generate each route at build time

Out of the box, single page apps only have a single entry point. In other words, it lives lives at a single URL. This makes sense in some cases, but we want our app to feel like a normal website.

We’ll need to make use of the history mode in the Vue Router file in order to do that. First, we’ll turn that on by adding mode: 'history' to the Router object’s properties like so:

// src/router/index.js
Vue.use(Router);

export default new Router({
  mode: 'history',
  routes: [
// ...

Our starter app has two routes. In addition to Hello, we have a second view component called Banana that lives at the route /banana. Without history mode, the URL for that page would be http://localhost:1982/#/banana. History mode cleans that up to http://localhost:1982/banana. Much more elegant!

All this works pretty well in development mode (npm run dev), but let’s take a peek at what it would look like in production. Here's how we compile everything:

$ npm run build

That command will generate your Vue site into the ./dist folder. To see it live, there’s a handy command for starting up a super simple HTTP server on your Mac:

$ cd dist
$ python -m SimpleHTTPServer

Sorry Windows folks, I don’t know the equivalent!

Now visit localhost:8000 in your browser. You’ll see your site as it will appear in a production environment. Click on the Banana link, and all is well.

Refresh the page. Oops! This reveals our first problem with single page apps: there is only one HTML file being generated at build time, so there’s no way for the browser to know that /banana should target the main app page and load the route without fancy Apache-style redirects!

Of course, there's an app for that. Or, at least a plugin. The basic usage is noted in the Vue Progressive Web App Boilerplate documentation. Here's how it says we can spin up the plugin:

$ npm install -D prerender-spa-plugin

Let's add our routes to the Webpack production configuration file:

// ./build/webpack.prod.conf.js
// ...
const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin')
const PrerenderSpaPlugin = require('prerender-spa-plugin')
const loadMinified = require('./load-minified')
// ...
const webpackConfig = merge(baseWebpackConfig, {
  // ...
  plugins: [
  // ...
    new SWPrecacheWebpackPlugin({
      // ...
      minify: true,
      stripPrefix: 'dist/'
    }),
    // prerender app
    new PrerenderSpaPlugin(
      // Path to compiled app
      path.join(__dirname, '../dist'),
      // List of endpoints you wish to prerender
      [ '/', '/banana' ]
    )
  ]
})

That’s it. Now, when you run a new build, each route in that array will be rendered as a new entry point to the app. Congratulations, we’ve basically just enabled static site generation!

Create blog and article components

If you’re skipping ahead, we’re now up to the step-2 branch of my demo repo. Go ahead and check it out:

$ git checkout step-2

This step is pretty straightforward. We’ll create two new components, and link them together.

Blog Component

Let's register the the blog component. We'll create a new file called YesBlog.vue in the /src/components directory and drop in the markup for the view:

// ./src/components/YesBlog.vue
<template>
  <div class="blog">
    <h1>Blog</h1>
    <router-link to="/">Home</router-link>
    <hr/>
    <article v-for="article in articles" :key="article.slug" class="article">
      <router-link class="article__link" :to="`/blog/${ article.slug }`">
        <h2 class="article__title"></h2>
        <p class="article__description"></p>
      </router-link>
    </article>
  </div>
</template>

<script>
export default {
  name: 'blog',
  computed: {
    articles() {
      return [
        {
          slug: 'first-article',
          title: 'Article One',
          description: 'This is article one\'s description',
        },
        {
          slug: 'second-article',
          title: 'Article Two',
          description: 'This is article two\'s description',
        },
      ];
    },
  },
};
</script>

All we’re really doing here is creating a placeholder array (articles) that will be filled with article objects. This array creates our article list and uses the slug parameter as the post ID. The title and description parameters fill out the post details. For now, it’s all hard-coded while we get the rest of our code in place.

Article Component

The article component is a similar process. We'll create a new file called YesArticle.vue and establish the markup for the view:

// ./src/components/YesArticle.vue
<template>
  <div class="article">
    <h1 class="blog__title"></h1>
    <router-link to="/blog">Back</router-link>
    <hr/>
    <div class="article__body" v-html="article.body"></div>
  </div>
</template>

<script>
  export default {
    name: 'YesArticle',
    props: {
      id: {
        type: String,
        required: true,
      },
    },
    data() {
      return {
        article: {
          title: this.id,
          body: '<h2>Testing</h2><p>Ok, let\'s do more now!</p>',
        },
      };
    },
  };
</script>

We’ll use the props passed along by the router to know what article ID we’re working with. For now, we’ll just use that as the post title, and hardcode the body.

Routing

We can't move ahead until we add our new views to the router. This will ensure that our URLs are valid and allows our navigation to function properly. Here is the entirety of the router file:

// ./src/router/index.js
import Router from 'vue-router';
import Hello from '@/components/Hello';
import Banana from '@/components/Banana';
import YesBlog from '@/components/YesBlog';
import YesArticle from '@/components/YesArticle';

Vue.use(Router);

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Hello',
      component: Hello,
    },
    {
      path: '/banana',
      name: 'Banana',
      component: Banana,
    },
    {
      path: '/blog',
      name: 'YesBlog',
      component: YesBlog,
    },
    {
      path: '/blog/:id',
      name: 'YesArticle',
      props: true,
      component: YesArticle,
    },
  ],
});

Notice that we've appended /:id to the YesArtcle component's path and set its props to true. These are crucial because they establish the dynamic routing we set up in the component's props array in the component file.

Finally, we can add a link to our homepage that points to the blog. This is what we drop into the Hello.vue file to get that going:

<router-link to="/blog">Blog</router-link>

Pre-rendering

We've done a lot of work so far but none of it will stick until we pre-render our routes. Pre-rendering is a fancy way of saying that we tell the app what routes exist and to dump the right markup into the right route. We added a Webpack plugin for this earlier, so here's what we can add to our Webpack production configuration file:

// ./build/webpack.prod.conf.js
// ...
  // List of endpoints you wish to prerender
  [ '/', '/banana', '/blog', '/blog/first-article', '/blog/second-article' ]
// ...

I have to admit, this process can be cumbersome and annoying. I mean, who wants to touch multiple files to create a URL?! Thankfully, we can automate this, which we'll cover further down.

Integrate Webpack to parse Markdown content

We’re now up to the step-3 branch. Check it out if you're following along in the code:

$ git checkout step-3

The Posts

We’ll be using Markdown to write our posts, with some FrontMatter to create meta data functionality.

Fire up a new file in the posts directory to create our very first post:

// ./src/posts/first-article.md
---
title: Article One from MD
description: In which the hero starts fresh
created: 2017-10-01T08:01:50+02
updated:
status: publish
---
Here is the text of the article.  It's pretty great, isn't it?



// ./src/posts/second-article.md
---
title: Article Two from MD
description: This is another article
created: 2017-10-01T08:01:50+02
updated:
status: publish
---
## Let's start with an H2
And then some text
And then some code:
```html
<div class="container">
  <div class="main">
    <div class="article insert-wp-tags-here">
      <h1>Title</h1>
      <div class="article-content">
        <p class="intro">Intro Text</p>
        <p></p>
      </div>
      <div class="article-meta"></div>
    </div>
  </div>
</div>
```

Dynamic Routing

One annoying thing at the moment is that we need to hardcode our routes for the pre-rendering plugin. Luckily, it isn’t complicated to make this dynamic with a bit of Node magic. First, we’ll create a helper in our utility file to find the files:

// ./build/utils.js
// ...
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const fs = require('fs')

exports.filesToRoutes = function (directory, extension, routePrefix = '') {
  function findFilesInDir(startPath, filter){
    let results = []
    if (!fs.existsSync(startPath)) {
      console.log("no dir ", startPath)
      return
    }
    const files = fs.readdirSync(startPath)
    for (let i = 0; i < files.length; i++) {
      const filename = path.join(startPath, files[i])
      const stat = fs.lstatSync(filename)
      if (stat.isDirectory()) {
        results = results.concat(findFilesInDir(filename, filter)) //recurse
      } else if (filename.indexOf(filter) >= 0) {
        results.push(filename)
      }
    }
    return results
  }

  return findFilesInDir(path.join(__dirname, directory), extension)
    .map((filename) => {
      return filename
        .replace(path.join(__dirname, directory), routePrefix)
        .replace(extension, '')
      })
}

exports.assetsPath = function (_path) {
// ...

This can really just be copied and pasted, but what we’ve done here is create a utility method called filesToRoutes() which will take in a directory, extension, and an optional routePrefix, and return an array of routes based on a recursive file search within that directory.

All we have to do to make our blog post routes dynamic is merge this new array into our PrerenderSpaPlugin routes. The power of ES6 makes this really simple:

// ./build/webpack.prod.conf.js
// ...
new PrerenderSpaPlugin(
  // Path to compiled app
  path.join(__dirname, '../dist'),
  // List of endpoints you wish to prerender
  [
    '/',
    '/banana',
    '/blog',
    ...utils.filesToRoutes('../src/posts', '.md', '/blog')
  ]
)

Since we've already imported utils at the top of the file for other purposes, we can just use the spread operator ... to merge the new dynamic routes array into this one, and we’re done. Now our pre-rendering is completely dynamic, only dependent on us adding a new file!

Webpack Loaders

We’re now up to the step-4 branch:

$ git checkout step-4

In order to actually turn our Markdown files into parse-able content, we’ll need some Webpack loaders in place. Again, someone else has done all the work for us, so we only have to install and add them to our config.

$ npm install -D json-loader markdown-it-front-matter-loader markdown-it highlight.js yaml-front-matter

We will only be calling the json-loader and markdown-it-front-matter-loader from our Webpack config, but the latter has peer dependencies of markdown-it and highlight.js, so we’ll install those at the same time. Also, nothing warns us about this, but yaml-front-matter is also required, so the command above adds that as well.

To use these fancy new loaders, we’re going to add a block to our Webpack base config:

// ./build/webpack.base.conf.js
// ...
module.exports = {
  // ...
  module: {
    rules: [
  // ...
      {
        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
        loader: 'url-loader',
        options: {
          limit: 10000,
          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
        }
      },
      {
        test: /\.md$/,
        loaders: ['json-loader', 'markdown-it-front-matter-loader'],
      },
    ]
  }
}

Now, any time Webpack encounters a require statement with a .md extension, it will use the front-matter-loader (which will correctly parse the metadata block from our articles as well as the code blocks), and take the output JSON and run it through the json-loader. This way, we know we’re ending up with an object for each article that looks like this:

// first-article.md [Object]
{
  body: "<p>Here is the text of the article. It's pretty great, isn't it?</p>\n"
  created: "2017-10-01T06:01:50.000Z"
  description: "In which the hero starts fresh"
  raw: "\n\nHere is the text of the article. It's pretty great, isn't it?\n"
  slug: "first-article"
  status: "publish"
  title: "Article One from MD"
  updated: null
}

This is exactly what we need and it’s pretty easy to extend with other metadata if you need to. But so far, this doesn’t do anything! We need to require these in one of our components so that Webpack can find and load it.

We could just write:

require('../posts/first-article.md')

...but then we’d have to do that for every article we create, and that won’t be any fun as our blog grows. We need a way to dynamically require all our Markdown files.

Dynamic Requiring

Luckily, Webpack does this! It wasn’t easy to find documentation for this but here it is. There is a method called require.context() that we can use to do just what we need. We’ll add it to the script section of our YesBlog component:

// ./src/components/YesBlog.vue
// ...
<script>
  const posts = {};
  const req = require.context('../posts/', false, /\.md$/);
  req.keys().forEach((key) => {
    posts[key] = req(key);
  });

  export default {
    name: 'blog',
    computed: {
      articles() {
        const articleArray = [];
        Object.keys(posts).forEach((key) => {
          const article = posts[key];
          article.slug = key.replace('./', '').replace('.md', '');
          articleArray.push(article);
        });
        return articleArray;
      },
    },
  };
</script>
// ...

What’s happening here? We’re creating a posts object that we’ll first populate with articles, then use later within the component. Since we’re pre-rendering all our content, this object will be instantly available.

The require.context() method accepts three arguments.

  • the directory where it will search
  • whether or not to include subdirectories
  • a regex filter to return files

In our case, we only want Markdown files in the posts directory, so:

require.context('../posts/', false, /\.md$/);

This will give us a kind of strange new function/object that we need to parse in order to use. That's where req.keys() will give us an array of the relative paths to each file. If we call req(key), this will return the article object we want, so we can assign that value to a matching key in our posts object.

Finally, in the computed articles() method, we’ll auto-generate our slug by adding a slug key to each post, with a value of the file name without a path or extensions. If we wanted to, this could be altered to allow us to set the slug in the Markdown itself, and only fall back to auto-generation. At the same time, we push the article objects into an array, so we have something easy to iterate over in our component.

Extra Credit

There are two things you’ll probably want to do right away if you use this method. First is to sort by date and second is to filter by article status (i.e. draft and published). Since we already have an array, this can be done in one line, added just before return articleArray:

articleArray.filter(post => post.status === 'publish').sort((a, b) => a.created < b.created);

Final Step

One last thing to do now, and that’s instruct our YesArticle component to use the new data we’re receiving along with the route change:

// ./src/components/YesArticle.vue
// ...
data() {
  return {
    article: require(`../posts/${this.id}.md`), // eslint-disable-line global-require, import/no-dynamic-require
  };
},

Since we know that our component will be pre-rendered, we can disable the ESLint rules that disallow dynamic and global requires, and require the path to the post that matches the id parameter. This triggers our Webpack Markdown loaders, and we’re all done!

OMG!

Go ahead and test this out:

$ npm run build && cd dist && python -m SimpleHTTPServer

Visit localhost:8000, navigate around and refresh the pages to load the whole app from the new entry point. It works!

I want to emphasize just how cool this is. We’ve turned a folder of Markdown files into an array of objects that we can use as we wish, anywhere on our website. The sky is the limit!

If you want to just see how it all works, you can check out the final branch:

$ git checkout step-complete

Extend functionality with plugins

My favorite part about this technique is that everything is extensible and replaceable.

Did someone create a better Markdown processor? Great, swap out the loader! Need control over your site’s SEO? There’s a plugin for that. Need to add a commenting system? Add that plugin, too.

I like to keep an eye on these two repositories for ideas and inspiration:

Profit!

You thought this step was a joke?

The very last thing we’ll want to do now is profit from the simplicity we’ve created and nab some free hosting. Since your site is now being generated on your git repository, all you really need is to do is push your changes to Github, Bitbucket, Gitlab or whatever code repository you use. I chose Gitlab because private repos are free and I didn’t want to have my drafts public, even in repo-form.

After that's that set up, you need to find a host. What you really want is a host that offers continuous integration and deployment so that merging to your master branch triggers the npm run build command and regenerates your site.

I used Gitlab’s own CI tools for the first few months after I set this up. I found the setup to be easy but troubleshooting issues to be difficult. I recently switched to Netlify, which has an outstanding free plan and some great CLI tools built right in.

In both cases, you’re able to point your own domain at their servers and even setup an SSL certificate for HTTPS support—that last point being important if you ever want to experiment with things like the getUserMedia API, or create a shop to make sales.

With all this set up, you’re now a member of the Butt-less Website club. Congratulations and welcome, friends! Hopefully you find this to be a simple alternative to complex content management systems for your own personal website and that it allows you to experiment with ease. Please let me know in the comments if you get stuck along the way...or if you succeed beyond your wildest dreams. 😉


The Rise of the Butt-less Website is a post from CSS-Tricks



from CSS-Tricks http://ift.tt/2DxFakG
via IFTTT

Passkeys: What the Heck and Why?

These things called  passkeys  sure are making the rounds these days. They were a main attraction at  W3C TPAC 2022 , gained support in  Saf...