Error while adding a js content in post

I get this error

error processing shortcode _internal/shortcodes/highlight.html while adding a js script with highlight tag in my post

:https://github.com/senthilthyagarajan/stencilled.me/blob/master/content/post/2017-02-15-foursquare.md

What could I be doing to fix this.

How are you calling it in your content?

@rdwatters . This is what I used to insert the code

{{< highlight javascript >}}

 <style>
      text {
      font: 10px sans-serif;
      text-anchor: middle;
      }
   </style>

<div class="form-group">
                  <label for="myValue">Checkins less than: </label>
                  <input type="number" class="form-control" id="myValue" value="0-30000" placeholder = "Enter a value between 0-30000">
               </div>
               <div class="form-group">
                  <label for="myRating">Rating greater than: </label>
                  <input type="number" class="form-control" id="myRating" value="0-10" placeholder = "Enter a value between 0-10">
               </div>
               <svg width="1250" height="1080"></svg>

               <script> src = "https://d3js.org/d3.v4.min.js" ></script>
               <!-- <link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css"> -->
               <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.4.4/d3.min.js" type="text/JavaScript"></script>
               <script src="https://cdnjs.cloudflare.com/ajax/libs/d3-queue/3.0.3/d3-queue.min.js"></script>
               <script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/2.2.0/topojson.min.js"></script>
               <!-- JS–––––––––––––––––––––––––––––––––––––––––––––––––– -->
               <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
               <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
               <script>
               var svg = d3.select("svg"),
                   width = +svg.attr("width"),
                   height = +svg.attr("height");

                   var format = d3.format(",d");

                   var color = d3.scaleOrdinal(d3.schemeCategory10);

                   var pack = d3.pack()
                       .size([width, width])
                       .padding(1.5);

                   var inputs = {};

                   d3.csv("austin_fsq.csv", function(d) {
                       d.sno = +d.sno;
                       return d;
                   }, function(error, data) {
                       if (error) throw error;

                       d3.selectAll("input").on("change", function(){
                         inputs[this.id] = +this.value;
                         console.log(inputs.myValue + "-" + inputs.myRating)
                         if(inputs.myValue && inputs.myRating){
                            var classes = data.filter(d => d.value < inputs.myValue && d.rating >= inputs.myRating);
                           draw(classes);
                         }
                       })

                       function draw(classes) {

                         d3.selectAll("svg > *").remove();

                           console.log(classes.length);
                           var root = d3.hierarchy({
                                   children: classes
                               })
                               .sum(function(d) {
                                   return d.value;
                               })
                               .each(function(d) {
                                   if (id = d.data.id) {
                                       var id, i = id.lastIndexOf(".");
                                       d.id = id;
                                       d.package = id.slice(0, i);
                                       d.class = id.slice(i + 1);
                                   }
                               });

                           var node = svg.selectAll(".node")
                               .data(pack(root).leaves())
                               .enter().append("g")
                               .attr("class", "node")
                               .attr("transform", function(d) {
                                   return "translate(" + d.x + "," + d.y + ")";
                               });

                           node.append("circle")
                               .attr("id", function(d) {
                                   return d.id;
                               })
                               .attr("r", function(d) {
                                   return d.r;
                               })
                               .style("fill", function(d) {
                                   return color(d.package);
                               });

                           node.append("clipPath")
                               .attr("id", function(d) {
                                   return "clip-" + d.id;
                               })
                               .append("use")
                               .attr("xlink:href", function(d) {
                                   return "#" + d.id;
                               });

                           node.append("text")
                               .attr("clip-path", function(d) {
                                   return "url(#clip-" + d.id + ")";
                               })
                               .selectAll("tspan")
                               .data(function(d) {
                                   return d.class.split(/(?=[A-Z][^A-Z])/g);
                               })
                               .enter().append("tspan")
                               .attr("x", 0)
                               .attr("y", function(d, i, nodes) {
                                   return 13 + (i - nodes.length / 2 - 0.5) * 10;
                               })
                               .text(function(d) {
                                   return d;
                               });

                           node.append("title")
                               .text(function(d) {
                                   return d.data.id + "\n" + format(d.value);
                               });
                       }
                   });
               </script>

{{< highlight>}}

This works fine even after throwing that error in local. But it fails while building on wercker.

@rdwatters any suggestions on what I could be doing to show the JS output too.Thank you again :slight_smile:

@senthil_thyagarajan I notice that it’s now showing up on your site already with the syntax highlighting, but I tested it for you on Wercker (well, my local Docker setup I use to test this) to see what’s going on with Wercker.

The only reason I can think of why the build fails is that it picks up the ERROR message. To make that go away you’ll want to change the closing tag to {{< /highlight >}}, notice the slash in there. That will get rid of the errors and then should allow Wercker to see the build as successful.

I hope this helped, otherwise let me know and I’ll have another look at it.

1 Like

Sorry @senthil_thyagarajan ; crazy day at work. Besides, @ArjenSchwarz is way more qualified to answer all S3-related queries. He’s the guru :smile:

Thank you @ArjenSchwarz and @rdwatters. I did take care of the highlight tag and it works fine on local without any error message. I did enable force install as true on wrecker and it runs fine without any error in the build.I am attaching the log along with this message. When I add the / it actually shows the script only.(http://www.stencilled.me/post/2017-02-15-foursquare/) Couldnt attach the log so had to paste it

export WERCKER_STEP_ROOT="/pipeline/hugo-build-837ed87a-c740-493c-a660-5ad923ff6234" export WERCKER_STEP_ID="hugo-build-837ed87a-c740-493c-a660-5ad923ff6234" export WERCKER_STEP_OWNER="arjen" export WERCKER_STEP_NAME="hugo-build" export WERCKER_REPORT_NUMBERS_FILE="/report/hugo-build-837ed87a-c740-493c-a660-5ad923ff6234/numbers.ini" export WERCKER_REPORT_MESSAGE_FILE="/report/hugo-build-837ed87a-c740-493c-a660-5ad923ff6234/message.txt" export WERCKER_REPORT_ARTIFACTS_DIR="/report/hugo-build-837ed87a-c740-493c-a660-5ad923ff6234/artifacts" export WERCKER_HUGO_BUILD_DEV_BRANCHES="" export WERCKER_HUGO_BUILD_PROD_BRANCHES="" export WERCKER_HUGO_BUILD_FORCE_INSTALL="true" export WERCKER_HUGO_BUILD_VERSION="0.19" export WERCKER_HUGO_BUILD_CONFIG="" export WERCKER_HUGO_BUILD_DEV_FLAGS="" export WERCKER_HUGO_BUILD_THEME="" export WERCKER_HUGO_BUILD_FLAGS="" export WERCKER_HUGO_BUILD_DISABLE_PYGMENTS="false" export WERCKER_HUGO_BUILD_BASEDIR="" source "/pipeline/hugo-build-837ed87a-c740-493c-a660-5ad923ff6234/run.sh" < /dev/null Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB] Ign http://deb.debian.org jessie InRelease Get:2 http://deb.debian.org jessie-updates InRelease [145 kB] Get:3 http://deb.debian.org jessie Release.gpg [2373 B] Get:4 http://deb.debian.org jessie Release [148 kB] Get:5 http://security.debian.org jessie/updates/main amd64 Packages [448 kB] Get:6 http://deb.debian.org jessie-updates/main amd64 Packages [17.6 kB] Get:7 http://deb.debian.org jessie/main amd64 Packages [9049 kB] Fetched 9874 kB in 5s (1813 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: file libexpat1 libffi6 libmagic1 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libsqlite3-0 libssl1.0.0 mime-support python python-chardet python-minimal python-pkg-resources python2.7 python2.7-minimal Suggested packages: python-doc python-tk python-distribute python-distribute-doc ttf-bitstream-vera python2.7-doc binutils binfmt-support The following NEW packages will be installed: file libexpat1 libffi6 libmagic1 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libsqlite3-0 libssl1.0.0 mime-support python python-chardet python-minimal python-pkg-resources python-pygments python2.7 python2.7-minimal 0 upgraded, 17 newly installed, 0 to remove and 0 not upgraded. Need to get 6661 kB of archives. After this operation, 27.7 MB of additional disk space will be used. Get:1 http://security.debian.org/ jessie/updates/main libssl1.0.0 amd64 1.0.1t-1+deb8u6 [1047 kB] Get:2 http://deb.debian.org/debian/ jessie/main libmagic1 amd64 1:5.22+15-2+deb8u3 [250 kB] Get:3 http://deb.debian.org/debian/ jessie/main libsqlite3-0 amd64 3.8.7.1-1+deb8u2 [438 kB] Get:4 http://deb.debian.org/debian/ jessie/main libpython2.7-minimal amd64 2.7.9-2+deb8u1 [378 kB] Get:5 http://deb.debian.org/debian/ jessie/main python2.7-minimal amd64 2.7.9-2+deb8u1 [1401 kB] Get:6 http://deb.debian.org/debian/ jessie/main python-minimal amd64 2.7.9-1 [40.3 kB] Get:7 http://deb.debian.org/debian/ jessie/main mime-support all 3.58 [36.0 kB] Get:8 http://deb.debian.org/debian/ jessie/main libexpat1 amd64 2.1.0-6+deb8u3 [80.0 kB] Get:9 http://deb.debian.org/debian/ jessie/main libffi6 amd64 3.1-2+b2 [20.1 kB] Get:10 http://deb.debian.org/debian/ jessie/main libpython2.7-stdlib amd64 2.7.9-2+deb8u1 [1847 kB] Get:11 http://deb.debian.org/debian/ jessie/main python2.7 amd64 2.7.9-2+deb8u1 [252 kB] Get:12 http://deb.debian.org/debian/ jessie/main libpython-stdlib amd64 2.7.9-1 [19.5 kB] Get:13 http://deb.debian.org/debian/ jessie/main python amd64 2.7.9-1 [151 kB] Get:14 http://deb.debian.org/debian/ jessie/main file amd64 1:5.22+15-2+deb8u3 [60.4 kB] Get:15 http://deb.debian.org/debian/ jessie/main python-pkg-resources all 5.5.1-1 [64.4 kB] Get:16 http://deb.debian.org/debian/ jessie/main python-chardet all 2.3.0-1 [96.2 kB] Get:17 http://deb.debian.org/debian/ jessie/main python-pygments all 2.0.1+dfsg-1.1+deb8u1 [482 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 6661 kB in 1s (3641 kB/s) Selecting previously unselected package libssl1.0.0:amd64. (Reading database ... 7559 files and directories currently installed.) Preparing to unpack .../libssl1.0.0_1.0.1t-1+deb8u6_amd64.deb ... Unpacking libssl1.0.0:amd64 (1.0.1t-1+deb8u6) ... Selecting previously unselected package libmagic1:amd64. Preparing to unpack .../libmagic1_1%3a5.22+15-2+deb8u3_amd64.deb ... Unpacking libmagic1:amd64 (1:5.22+15-2+deb8u3) ... Selecting previously unselected package libsqlite3-0:amd64. Preparing to unpack .../libsqlite3-0_3.8.7.1-1+deb8u2_amd64.deb ... Unpacking libsqlite3-0:amd64 (3.8.7.1-1+deb8u2) ... Selecting previously unselected package libpython2.7-minimal:amd64. Preparing to unpack .../libpython2.7-minimal_2.7.9-2+deb8u1_amd64.deb ... Unpacking libpython2.7-minimal:amd64 (2.7.9-2+deb8u1) ... Selecting previously unselected package python2.7-minimal. Preparing to unpack .../python2.7-minimal_2.7.9-2+deb8u1_amd64.deb ... Unpacking python2.7-minimal (2.7.9-2+deb8u1) ... Selecting previously unselected package python-minimal. Preparing to unpack .../python-minimal_2.7.9-1_amd64.deb ... Unpacking python-minimal (2.7.9-1) ... Selecting previously unselected package mime-support. Preparing to unpack .../mime-support_3.58_all.deb ... Unpacking mime-support (3.58) ... Selecting previously unselected package libexpat1:amd64. Preparing to unpack .../libexpat1_2.1.0-6+deb8u3_amd64.deb ... Unpacking libexpat1:amd64 (2.1.0-6+deb8u3) ... Selecting previously unselected package libffi6:amd64. Preparing to unpack .../libffi6_3.1-2+b2_amd64.deb ... Unpacking libffi6:amd64 (3.1-2+b2) ... Selecting previously unselected package libpython2.7-stdlib:amd64. Preparing to unpack .../libpython2.7-stdlib_2.7.9-2+deb8u1_amd64.deb ... Unpacking libpython2.7-stdlib:amd64 (2.7.9-2+deb8u1) ... Selecting previously unselected package python2.7. Preparing to unpack .../python2.7_2.7.9-2+deb8u1_amd64.deb ... Unpacking python2.7 (2.7.9-2+deb8u1) ... Selecting previously unselected package libpython-stdlib:amd64. Preparing to unpack .../libpython-stdlib_2.7.9-1_amd64.deb ... Unpacking libpython-stdlib:amd64 (2.7.9-1) ... Setting up libpython2.7-minimal:amd64 (2.7.9-2+deb8u1) ... Setting up python2.7-minimal (2.7.9-2+deb8u1) ... Linking and byte-compiling packages for runtime python2.7... Setting up python-minimal (2.7.9-1) ... Selecting previously unselected package python. (Reading database ... 8392 files and directories currently installed.) Preparing to unpack .../python_2.7.9-1_amd64.deb ... Unpacking python (2.7.9-1) ... Selecting previously unselected package file. Preparing to unpack .../file_1%3a5.22+15-2+deb8u3_amd64.deb ... Unpacking file (1:5.22+15-2+deb8u3) ... Selecting previously unselected package python-pkg-resources. Preparing to unpack .../python-pkg-resources_5.5.1-1_all.deb ... Unpacking python-pkg-resources (5.5.1-1) ... Selecting previously unselected package python-chardet. Preparing to unpack .../python-chardet_2.3.0-1_all.deb ... Unpacking python-chardet (2.3.0-1) ... Selecting previously unselected package python-pygments. Preparing to unpack .../python-pygments_2.0.1+dfsg-1.1+deb8u1_all.deb ... Unpacking python-pygments (2.0.1+dfsg-1.1+deb8u1) ... Setting up libssl1.0.0:amd64 (1.0.1t-1+deb8u6) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Setting up libmagic1:amd64 (1:5.22+15-2+deb8u3) ... Setting up libsqlite3-0:amd64 (3.8.7.1-1+deb8u2) ... Setting up mime-support (3.58) ... Setting up libexpat1:amd64 (2.1.0-6+deb8u3) ... Setting up libffi6:amd64 (3.1-2+b2) ... Setting up libpython2.7-stdlib:amd64 (2.7.9-2+deb8u1) ... Setting up python2.7 (2.7.9-2+deb8u1) ... Setting up libpython-stdlib:amd64 (2.7.9-1) ... Setting up python (2.7.9-1) ... Setting up file (1:5.22+15-2+deb8u3) ... Setting up python-pkg-resources (5.5.1-1) ... Setting up python-chardet (2.3.0-1) ... Setting up python-pygments (2.0.1+dfsg-1.1+deb8u1) ... Processing triggers for libc-bin (2.19-18+deb8u7) ... Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: ca-certificates krb5-locales libcurl3 libgmp10 libgnutls-deb0-28 libgssapi-krb5-2 libhogweed2 libidn11 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 libnettle4 libp11-kit0 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libssh2-1 libtasn1-6 openssl Suggested packages: gnutls-bin krb5-doc krb5-user libsasl2-modules-otp libsasl2-modules-ldap libsasl2-modules-sql libsasl2-modules-gssapi-mit libsasl2-modules-gssapi-heimdal The following NEW packages will be installed: ca-certificates curl krb5-locales libcurl3 libgmp10 libgnutls-deb0-28 libgssapi-krb5-2 libhogweed2 libidn11 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 libnettle4 libp11-kit0 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libssh2-1 libtasn1-6 openssl 0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded. Need to get 6813 kB of archives. After this operation, 12.4 MB of additional disk space will be used. Get:1 http://security.debian.org/ jessie/updates/main openssl amd64 1.0.1t-1+deb8u6 [665 kB] Get:2 http://deb.debian.org/debian/ jessie/main libgmp10 amd64 2:6.0.0+dfsg-6 [253 kB] Get:3 http://deb.debian.org/debian/ jessie/main libnettle4 amd64 2.7.1-5+deb8u2 [176 kB] Get:4 http://deb.debian.org/debian/ jessie/main libhogweed2 amd64 2.7.1-5+deb8u2 [125 kB] Get:5 http://deb.debian.org/debian/ jessie/main libp11-kit0 amd64 0.20.7-1 [81.2 kB] Get:6 http://deb.debian.org/debian/ jessie/main libtasn1-6 amd64 4.2-3+deb8u2 [49.0 kB] Get:7 http://deb.debian.org/debian/ jessie/main libgnutls-deb0-28 amd64 3.3.8-6+deb8u4 [695 kB] Get:8 http://deb.debian.org/debian/ jessie/main libkeyutils1 amd64 1.5.9-5+b1 [12.0 kB] Get:9 http://deb.debian.org/debian/ jessie/main libkrb5support0 amd64 1.12.1+dfsg-19+deb8u2 [59.1 kB] Get:10 http://deb.debian.org/debian/ jessie/main libk5crypto3 amd64 1.12.1+dfsg-19+deb8u2 [115 kB] Get:11 http://deb.debian.org/debian/ jessie/main libkrb5-3 amd64 1.12.1+dfsg-19+deb8u2 [303 kB] Get:12 http://deb.debian.org/debian/ jessie/main libgssapi-krb5-2 amd64 1.12.1+dfsg-19+deb8u2 [152 kB] Get:13 http://deb.debian.org/debian/ jessie/main libidn11 amd64 1.29-1+deb8u2 [136 kB] Get:14 http://deb.debian.org/debian/ jessie/main libsasl2-modules-db amd64 2.1.26.dfsg1-13+deb8u1 [67.1 kB] Get:15 http://deb.debian.org/debian/ jessie/main libsasl2-2 amd64 2.1.26.dfsg1-13+deb8u1 [105 kB] Get:16 http://deb.debian.org/debian/ jessie/main libldap-2.4-2 amd64 2.4.40+dfsg-1+deb8u2 [218 kB] Get:17 http://deb.debian.org/debian/ jessie/main librtmp1 amd64 2.4+20150115.gita107cef-1 [59.8 kB] Get:18 http://deb.debian.org/debian/ jessie/main libssh2-1 amd64 1.4.3-4.1+deb8u1 [125 kB] Get:19 http://deb.debian.org/debian/ jessie/main libcurl3 amd64 7.38.0-4+deb8u5 [259 kB] Get:20 http://deb.debian.org/debian/ jessie/main krb5-locales all 1.12.1+dfsg-19+deb8u2 [2649 kB] Get:21 http://deb.debian.org/debian/ jessie/main ca-certificates all 20141019+deb8u2 [207 kB] Get:22 http://deb.debian.org/debian/ jessie/main curl amd64 7.38.0-4+deb8u5 [200 kB] Get:23 http://deb.debian.org/debian/ jessie/main libsasl2-modules amd64 2.1.26.dfsg1-13+deb8u1 [101 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 6813 kB in 2s (3298 kB/s) Selecting previously unselected package libgmp10:amd64. (Reading database ... 8697 files and directories currently installed.) Preparing to unpack .../libgmp10_2%3a6.0.0+dfsg-6_amd64.deb ... Unpacking libgmp10:amd64 (2:6.0.0+dfsg-6) ... Selecting previously unselected package libnettle4:amd64. Preparing to unpack .../libnettle4_2.7.1-5+deb8u2_amd64.deb ... Unpacking libnettle4:amd64 (2.7.1-5+deb8u2) ... Selecting previously unselected package libhogweed2:amd64. Preparing to unpack .../libhogweed2_2.7.1-5+deb8u2_amd64.deb ... Unpacking libhogweed2:amd64 (2.7.1-5+deb8u2) ... Selecting previously unselected package libp11-kit0:amd64. Preparing to unpack .../libp11-kit0_0.20.7-1_amd64.deb ... Unpacking libp11-kit0:amd64 (0.20.7-1) ... Selecting previously unselected package libtasn1-6:amd64. Preparing to unpack .../libtasn1-6_4.2-3+deb8u2_amd64.deb ... Unpacking libtasn1-6:amd64 (4.2-3+deb8u2) ... Selecting previously unselected package libgnutls-deb0-28:amd64. Preparing to unpack .../libgnutls-deb0-28_3.3.8-6+deb8u4_amd64.deb ... Unpacking libgnutls-deb0-28:amd64 (3.3.8-6+deb8u4) ... Selecting previously unselected package libkeyutils1:amd64. Preparing to unpack .../libkeyutils1_1.5.9-5+b1_amd64.deb ... Unpacking libkeyutils1:amd64 (1.5.9-5+b1) ... Selecting previously unselected package libkrb5support0:amd64. Preparing to unpack .../libkrb5support0_1.12.1+dfsg-19+deb8u2_amd64.deb ... Unpacking libkrb5support0:amd64 (1.12.1+dfsg-19+deb8u2) ... Selecting previously unselected package libk5crypto3:amd64. Preparing to unpack .../libk5crypto3_1.12.1+dfsg-19+deb8u2_amd64.deb ... Unpacking libk5crypto3:amd64 (1.12.1+dfsg-19+deb8u2) ... Selecting previously unselected package libkrb5-3:amd64. Preparing to unpack .../libkrb5-3_1.12.1+dfsg-19+deb8u2_amd64.deb ... Unpacking libkrb5-3:amd64 (1.12.1+dfsg-19+deb8u2) ... Selecting previously unselected package libgssapi-krb5-2:amd64. Preparing to unpack .../libgssapi-krb5-2_1.12.1+dfsg-19+deb8u2_amd64.deb ... Unpacking libgssapi-krb5-2:amd64 (1.12.1+dfsg-19+deb8u2) ... Selecting previously unselected package libidn11:amd64. Preparing to unpack .../libidn11_1.29-1+deb8u2_amd64.deb ... Unpacking libidn11:amd64 (1.29-1+deb8u2) ... Selecting previously unselected package libsasl2-modules-db:amd64. Preparing to unpack .../libsasl2-modules-db_2.1.26.dfsg1-13+deb8u1_amd64.deb ... Unpacking libsasl2-modules-db:amd64 (2.1.26.dfsg1-13+deb8u1) ... Selecting previously unselected package libsasl2-2:amd64. Preparing to unpack .../libsasl2-2_2.1.26.dfsg1-13+deb8u1_amd64.deb ... Unpacking libsasl2-2:amd64 (2.1.26.dfsg1-13+deb8u1) ... Selecting previously unselected package libldap-2.4-2:amd64. Preparing to unpack .../libldap-2.4-2_2.4.40+dfsg-1+deb8u2_amd64.deb ... Unpacking libldap-2.4-2:amd64 (2.4.40+dfsg-1+deb8u2) ... Selecting previously unselected package librtmp1:amd64. Preparing to unpack .../librtmp1_2.4+20150115.gita107cef-1_amd64.deb ... Unpacking librtmp1:amd64 (2.4+20150115.gita107cef-1) ... Selecting previously unselected package libssh2-1:amd64. Preparing to unpack .../libssh2-1_1.4.3-4.1+deb8u1_amd64.deb ... Unpacking libssh2-1:amd64 (1.4.3-4.1+deb8u1) ... Selecting previously unselected package libcurl3:amd64. Preparing to unpack .../libcurl3_7.38.0-4+deb8u5_amd64.deb ... Unpacking libcurl3:amd64 (7.38.0-4+deb8u5) ... Selecting previously unselected package krb5-locales. Preparing to unpack .../krb5-locales_1.12.1+dfsg-19+deb8u2_all.deb ... Unpacking krb5-locales (1.12.1+dfsg-19+deb8u2) ... Selecting previously unselected package openssl. Preparing to unpack .../openssl_1.0.1t-1+deb8u6_amd64.deb ... Unpacking openssl (1.0.1t-1+deb8u6) ... Selecting previously unselected package ca-certificates. Preparing to unpack .../ca-certificates_20141019+deb8u2_all.deb ... Unpacking ca-certificates (20141019+deb8u2) ... Selecting previously unselected package curl. Preparing to unpack .../curl_7.38.0-4+deb8u5_amd64.deb ... Unpacking curl (7.38.0-4+deb8u5) ... Selecting previously unselected package libsasl2-modules:amd64. Preparing to unpack .../libsasl2-modules_2.1.26.dfsg1-13+deb8u1_amd64.deb ... Unpacking libsasl2-modules:amd64 (2.1.26.dfsg1-13+deb8u1) ... Setting up libgmp10:amd64 (2:6.0.0+dfsg-6) ... Setting up libnettle4:amd64 (2.7.1-5+deb8u2) ... Setting up libhogweed2:amd64 (2.7.1-5+deb8u2) ... Setting up libp11-kit0:amd64 (0.20.7-1) ... Setting up libtasn1-6:amd64 (4.2-3+deb8u2) ... Setting up libgnutls-deb0-28:amd64 (3.3.8-6+deb8u4) ... Setting up libkeyutils1:amd64 (1.5.9-5+b1) ... Setting up libkrb5support0:amd64 (1.12.1+dfsg-19+deb8u2) ... Setting up libk5crypto3:amd64 (1.12.1+dfsg-19+deb8u2) ... Setting up libkrb5-3:amd64 (1.12.1+dfsg-19+deb8u2) ... Setting up libgssapi-krb5-2:amd64 (1.12.1+dfsg-19+deb8u2) ... Setting up libidn11:amd64 (1.29-1+deb8u2) ... Setting up libsasl2-modules-db:amd64 (2.1.26.dfsg1-13+deb8u1) ... Setting up libsasl2-2:amd64 (2.1.26.dfsg1-13+deb8u1) ... Setting up libldap-2.4-2:amd64 (2.4.40+dfsg-1+deb8u2) ... Setting up librtmp1:amd64 (2.4+20150115.gita107cef-1) ... Setting up libssh2-1:amd64 (1.4.3-4.1+deb8u1) ... Setting up libcurl3:amd64 (7.38.0-4+deb8u5) ... Setting up krb5-locales (1.12.1+dfsg-19+deb8u2) ... Setting up openssl (1.0.1t-1+deb8u6) ... Setting up ca-certificates (20141019+deb8u2) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype /usr/sbin/update-ca-certificates: [--verbose] [--fresh] Setting up curl (7.38.0-4+deb8u5) ... Setting up libsasl2-modules:amd64 (2.1.26.dfsg1-13+deb8u1) ... Processing triggers for libc-bin (2.19-18+deb8u7) ... Processing triggers for ca-certificates (20141019+deb8u2) ... Updating certificates in /etc/ssl/certs... 174 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d....done. Started building sites ... Built site for language en: 0 draft content 0 future content 0 expired content 5 regular pages created 8 other pages created 15 non-page files copied 6 paginator pages created 4 tags created 0 categories created total in 105 ms

@senthil_thyagarajan ok, I’m trying to understand the exact problem you’re facing. That page has two blocks of Javascript code, one that you’re highlighting with the short code ( ({{<highlight javascript>}} which seems to be showing correctly on the currently live site) and one that you’re trying to highlight with a code block fence (```javascript). That last one doesn’t seem to be showing correctly, is that indeed the problem? In that case the easiest solution would be to change that from the fence to the short code, which might work.

Also, enabling force install isn’t necessary, that is a functionality that will only help if you use a container with Hugo already installed and want to use a different version.

@ArjenSchwarz If you see this link http://www.stencilled.me/post/2017-01-29-nfl/ there is only one highlight shortcode.My understanding is that this syntax will allow me to render the js inside it and show the output,something like this.

Where as for this post if you see http://www.stencilled.me/post/2017-02-15-foursquare/ the last two blocks are teh same code, one is using highlight syntax and other using (```javascript). What I want to do is render the second last code block which has two input elements when entered with those values will show an output.

Hope I could explain my problem and Thank you for all your time.

@ArjenSchwarz Sorry i can attach only one image at a time. So for this post http://www.stencilled.me/post/2017-02-15-foursquare/ this is how it works on my local and what I want to show on my site too

So you want it to render the output JS and not necessarily show the code block? I think that’s where you are getting hung up. The triple back tick is GFM (Github-flavored markdown)…and should therefore render as <code> and not necessarily executed code on the client.

If you are embedding JavaScript directly into your pages, Go templates are context aware and very particular about what is and isn’t escaped. So, your best bet is to look at the safeJS and safeHTML functions. Have you already taken a look at these? http://gohugo.io/templates/functions/#safejs

@senthil_thyagarajan As an aside, I looked at your post on beer. It makes me very happy to see that such a high number of the best are in Chicago :wink:

Thanks @rdwatters. I will check these out .My only question being how are they getting rendered in local buy not when I deploy them to s3.

What is the value you have set for PygmentsCodeFences in your configuration?

Have set it as true @rdwatters

@rdwatters When I finished this map and saw the results I didnt have any of these beers for which I have the cap :expressionless:

@rdwatters @ArjenSchwarz I was looking on the index.html it renders on local and after deploying . In local it renders the html properly and shows the output as needed. When deployed it add pre code tags to the html and end up showing as a code and not the rendered js.

Thank You .

At work so this has to be short. Take a look at the docs concept I’m working on here since I I’m hoping it provides more insight into the highlight shortcode. There is a setting in your config file (I believe it’s PygmentsCodeFences) that tells Hugo whether to render triple-back-tic code fences using Pygments; my guess is there is a discrepancy in this setting between the two environments…but I’m just guessing…