How to pass a string containing quotes as an `include` parameter in Liquid/Jekyll? The Next CEO of Stack OverflowIn YAML, how do I break a string over multiple lines?Jekyll/Liquid - how to add large blocks of text to YAML front matter?Sorted navigation menu with Jekyll and LiquidInclude jekyll / liquid template data in a YAML variable?How do I include “% %” in markdown file when using jekyll?Passing parameters to inclusion in Liquid templatesJekyll: parametric (partial?) includeHow to concatenate / append a string to another one in Jekyll / Liquid?Passing Jekyll variables “up” scopeJekyll / Liquid: Passing an Array into an Include and Looping

What is the difference between "behavior" and "behaviour"?

What is the purpose of the Evocation wizard's Potent Cantrip feature?

% symbol leads to superlong (forever?) compilations

When did Lisp start using symbols for arithmetic?

Inappropriate reference requests from Journal reviewers

Why didn't Khan get resurrected in the Genesis Explosion?

Are there languages with no euphemisms?

How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?

How do we know the LHC results are robust?

If the heap is initialized for security, then why is the stack uninitialized?

Can the Reverse Gravity spell affect the Meteor Swarm spell?

Too much space between section and text in a twocolumn document

Why here is plural "We went to the movies last night."

Customer Requests (Sometimes) Drive Me Bonkers!

How should I support this large drywall patch?

How easy is it to start Magic from scratch?

Is it okay to store user locations?

Why is there a PLL in CPU?

What size rim is OK?

How do I solve this limit?

Text adventure game code

Horror movie/show or scene where a horse creature opens its mouth really wide and devours a man in a stables

Grabbing quick drinks

Increase performance creating Mandelbrot set in python



How to pass a string containing quotes as an `include` parameter in Liquid/Jekyll?



The Next CEO of Stack OverflowIn YAML, how do I break a string over multiple lines?Jekyll/Liquid - how to add large blocks of text to YAML front matter?Sorted navigation menu with Jekyll and LiquidInclude jekyll / liquid template data in a YAML variable?How do I include “% %” in markdown file when using jekyll?Passing parameters to inclusion in Liquid templatesJekyll: parametric (partial?) includeHow to concatenate / append a string to another one in Jekyll / Liquid?Passing Jekyll variables “up” scopeJekyll / Liquid: Passing an Array into an Include and Looping










0















Consider: I want to pass a block of text as a parameter in an include tag. The block of text contains a quote. For example:



Breaking news:

Area man says, "This is newsworthy!"


There are several ways I can think of to do this:



1. Wrap in single quotes



%
include newsitem.html
content='Breaking news:

Area man says, "This is newsworthy!"'
%


This is not ideal since there may be single quotes/apostrophes in the text block.



2. Use captures



% capture newscontent %
Breaking news:

Area man says, "This is newsworthy!"
% endcapture %
%
include newsitem.html
content=newscontent
%


This is not ideal because it is verbose.



3. Escape quotes



%
include newsitem.html
content="Breaking news:

Area man says, "This is newsworthy!""
%


This is not ideal because if there are many quotes then they will all need backslashes, which will be tiresome to add.



4. Use captures and include



% capture content %% include_relative newscontent.md %% endcapture %
%
include newsitem.html
content=content
%


This is not really ideal because it is also fairly verbose.



5. Use frontmatter and/or YAML



---
newscontent: |
Breaking news:

Area man says, "This is newsworthy!"
---

%
include newsitem.html
content=page.newscontent
%


This is not ideal because it spreads out page content in a weird way.




Now, I absolutely admit these are all really trivial complaints. But mostly in order to gain a better familiarity with Jekyll/liquid, I'd like to know if there's another way to pass multi-line parameters containing quotes to include. What would be GREAT is if I could use backtics, or some other character that isn't very common in textual content:



%
include newsitem.html
content=`Breaking news:

Area man says, "This is newsworthy!"`
%


Unfortunately this doesn't seem to be supported. What are your thoughts? Thanks!










share|improve this question


























    0















    Consider: I want to pass a block of text as a parameter in an include tag. The block of text contains a quote. For example:



    Breaking news:

    Area man says, "This is newsworthy!"


    There are several ways I can think of to do this:



    1. Wrap in single quotes



    %
    include newsitem.html
    content='Breaking news:

    Area man says, "This is newsworthy!"'
    %


    This is not ideal since there may be single quotes/apostrophes in the text block.



    2. Use captures



    % capture newscontent %
    Breaking news:

    Area man says, "This is newsworthy!"
    % endcapture %
    %
    include newsitem.html
    content=newscontent
    %


    This is not ideal because it is verbose.



    3. Escape quotes



    %
    include newsitem.html
    content="Breaking news:

    Area man says, "This is newsworthy!""
    %


    This is not ideal because if there are many quotes then they will all need backslashes, which will be tiresome to add.



    4. Use captures and include



    % capture content %% include_relative newscontent.md %% endcapture %
    %
    include newsitem.html
    content=content
    %


    This is not really ideal because it is also fairly verbose.



    5. Use frontmatter and/or YAML



    ---
    newscontent: |
    Breaking news:

    Area man says, "This is newsworthy!"
    ---

    %
    include newsitem.html
    content=page.newscontent
    %


    This is not ideal because it spreads out page content in a weird way.




    Now, I absolutely admit these are all really trivial complaints. But mostly in order to gain a better familiarity with Jekyll/liquid, I'd like to know if there's another way to pass multi-line parameters containing quotes to include. What would be GREAT is if I could use backtics, or some other character that isn't very common in textual content:



    %
    include newsitem.html
    content=`Breaking news:

    Area man says, "This is newsworthy!"`
    %


    Unfortunately this doesn't seem to be supported. What are your thoughts? Thanks!










    share|improve this question
























      0












      0








      0


      1






      Consider: I want to pass a block of text as a parameter in an include tag. The block of text contains a quote. For example:



      Breaking news:

      Area man says, "This is newsworthy!"


      There are several ways I can think of to do this:



      1. Wrap in single quotes



      %
      include newsitem.html
      content='Breaking news:

      Area man says, "This is newsworthy!"'
      %


      This is not ideal since there may be single quotes/apostrophes in the text block.



      2. Use captures



      % capture newscontent %
      Breaking news:

      Area man says, "This is newsworthy!"
      % endcapture %
      %
      include newsitem.html
      content=newscontent
      %


      This is not ideal because it is verbose.



      3. Escape quotes



      %
      include newsitem.html
      content="Breaking news:

      Area man says, "This is newsworthy!""
      %


      This is not ideal because if there are many quotes then they will all need backslashes, which will be tiresome to add.



      4. Use captures and include



      % capture content %% include_relative newscontent.md %% endcapture %
      %
      include newsitem.html
      content=content
      %


      This is not really ideal because it is also fairly verbose.



      5. Use frontmatter and/or YAML



      ---
      newscontent: |
      Breaking news:

      Area man says, "This is newsworthy!"
      ---

      %
      include newsitem.html
      content=page.newscontent
      %


      This is not ideal because it spreads out page content in a weird way.




      Now, I absolutely admit these are all really trivial complaints. But mostly in order to gain a better familiarity with Jekyll/liquid, I'd like to know if there's another way to pass multi-line parameters containing quotes to include. What would be GREAT is if I could use backtics, or some other character that isn't very common in textual content:



      %
      include newsitem.html
      content=`Breaking news:

      Area man says, "This is newsworthy!"`
      %


      Unfortunately this doesn't seem to be supported. What are your thoughts? Thanks!










      share|improve this question














      Consider: I want to pass a block of text as a parameter in an include tag. The block of text contains a quote. For example:



      Breaking news:

      Area man says, "This is newsworthy!"


      There are several ways I can think of to do this:



      1. Wrap in single quotes



      %
      include newsitem.html
      content='Breaking news:

      Area man says, "This is newsworthy!"'
      %


      This is not ideal since there may be single quotes/apostrophes in the text block.



      2. Use captures



      % capture newscontent %
      Breaking news:

      Area man says, "This is newsworthy!"
      % endcapture %
      %
      include newsitem.html
      content=newscontent
      %


      This is not ideal because it is verbose.



      3. Escape quotes



      %
      include newsitem.html
      content="Breaking news:

      Area man says, "This is newsworthy!""
      %


      This is not ideal because if there are many quotes then they will all need backslashes, which will be tiresome to add.



      4. Use captures and include



      % capture content %% include_relative newscontent.md %% endcapture %
      %
      include newsitem.html
      content=content
      %


      This is not really ideal because it is also fairly verbose.



      5. Use frontmatter and/or YAML



      ---
      newscontent: |
      Breaking news:

      Area man says, "This is newsworthy!"
      ---

      %
      include newsitem.html
      content=page.newscontent
      %


      This is not ideal because it spreads out page content in a weird way.




      Now, I absolutely admit these are all really trivial complaints. But mostly in order to gain a better familiarity with Jekyll/liquid, I'd like to know if there's another way to pass multi-line parameters containing quotes to include. What would be GREAT is if I could use backtics, or some other character that isn't very common in textual content:



      %
      include newsitem.html
      content=`Breaking news:

      Area man says, "This is newsworthy!"`
      %


      Unfortunately this doesn't seem to be supported. What are your thoughts? Thanks!







      yaml jekyll liquid






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 21 at 16:30









      RobertAKARobinRobertAKARobin

      2,0881427




      2,0881427






















          0






          active

          oldest

          votes












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55285122%2fhow-to-pass-a-string-containing-quotes-as-an-include-parameter-in-liquid-jekyl%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55285122%2fhow-to-pass-a-string-containing-quotes-as-an-include-parameter-in-liquid-jekyl%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현