Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8535395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:25:15+00:00 2026-06-11T10:25:15+00:00

This is a simple question that I’m having trouble finding an answer to. I’m

  • 0

This is a simple question that I’m having trouble finding an answer to. I’m just beginning to use docpad to build a site. I’ve encountered the following line in the HTML5 Boilerplate skeleton:

<%- @getBlock('styles').add(["/style.css"]).toHTML() %>

Does anyone know what this does. The endpoint is that it outputs the following html:

<link rel="stylesheet" href="/style.css" />

But I’m unsure what is going on under the hood here and why this simple css link is produced in this manner rather.

Any illumination would be greatly appreciated.

Update

After playing with this a bit, it seems that what @getBlock does is output a certain html code block. In this case, styles seems to specify the code. What would be nice to know, if this is correct, is what other blocks there are in Docpad, or whatever other framework this @getBlock function(?) comes from…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:25:16+00:00Added an answer on June 11, 2026 at 10:25 am

    Founder of DocPad here.

    Correct, getBlock is part of the built in template helpers available to you. Several blocks are available, including scripts, styles and meta. The purpose of these is to allow plugins and other templates to safely inject and interact with the contents of the blocks.

    Such examples could be:

    • Adding a particular script to the header for only one template
    • Minifying all the scripts you use, and even concatenating them into one file
    • Injecting new scripts etc for certain plugins

    We’re working really hard at improving the documentation and support systems, so apologies that this stuff wasn’t clear before – but we’re doing our best!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is admittedly a very simple question that I just can't find an answer
This is a super simple question that I just can't seem to find a
I was writing an answer to this question when noticed that my simple implementation
This is a relatively simple question that may just not have a solution. Is
Just a simple question that I can't seem to find the answer to. myarray.length()
This is probably a simple question that I am just missing but I have
I'm actually surprised that I didn't find the answer to this simple question here.
Just a quick simple question that I can not seem to find an answer
it is a very simple question that I'm not finding an answer for it.
Very simple question that I've been having trouble answering. In Windows XP and Server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.