Utilizing Spiderable within Meteor results in the replication of head content before it is presented in the body tags

Having trouble with my meteor site, thought it was Google indexing, now suspecting an issue with the Spiderable package.

Meteor version 1.1.0.3 is in use, along with spiderable package and gadicohen:phantomjs as suggested by meteorpedia.

The current issue involves a duplication of default head code multiple times before displaying the body and html content. To see the problem, visit suleimanholdings.com?_escaped_fragment_= and view the page source.

If anyone has suggestions on how to fix this duplication issue and generate proper HTML for Google crawling, I'd appreciate it.

EDIT

Code used, with each template between the body tags:

<head>
<meta charset="UTF-8">
<title>Suleiman Holdings</title>
<link rel="icon" href="/favicon.ico?v=2">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/flexslider.css" type="text/css" media="screen" />
<script src="/prefixfree.min.js"></script>
<script src="/jquery.flexslider.js"></script>
<script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-62610011-1', 'auto');
    ga('send', 'pageview');

</script>

EDIT 2

This is the homepage template code:

    <template name="home">
    {{> nav}}


    <div style="overflow:hidden">
    <div id="main" role="main">
        <section class="slider">
            <div class="flexslider">
                <ul class="slides">
                    <div class="slider-bottom"></div>
                    <li style="background-image: url('/one-tech2.jpg');">
                        <div class="news" style="background-image : linear-gradient(to bottom, rgba(255,255,255, 0), rgba(255,255,255, .6) 20%);">
                            <h1>
                                One Technology Place
                            </h1>
                            <div class="news2">
                                <h2>
                                    Acquired: February 2015
                                </h2>
                                <p>
                                    Suleiman Holdings acquires the Nebraska Technology Park’s flagship office in a 3.3M cash transaction.
                                </p>
                            </div>
                        </div>
                        <div class="slider-bottom">
                            <div class="line" style="margin-left:0px; margin-right:10px;"></div>
                            <h3>
                                2015
                            </h3>
                            <div class="line" style="margin-left:80px"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                        </div>
                    </li>
                    <li style="background-image: url('/12thQ-inside2.jpg');">
                        <div class="news" style="background-image : linear-gradient(to bottom, rgba(255,255,255, 0), rgba(255,255,255, .6) 20%);">
                            <h1>
                                University of Nebraska
                            </h1>
                            <div class="news2">
                                <h2>
                                    Leased: January 2015
                                </h2>
                                <p>
                                    Suleiman Holdings welcomes the University of Nebraska College of Journalism and Mass Communications to Downtown Lincoln
                                </p>
                            </div>
                        </div>
                        <div class="slider-bottom">
                            <div class="line" style="margin-left:0px; margin-right:10px;"></div>
                            <h3>
                                2015
                            </h3>
                            <div class="line" style="margin-left:80px"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                        </div>
                    </li>
                    <li style="background-image: url('/interns.jpg');">
                        <div class="news" style="background-image : linear-gradient(to bottom, rgba(255,255,255, 0), rgba(255,255,255, .7) 20%);">
                            <h1>
                                Summer Internship Series
                            </h1>
                            <div class="news2">
                                <h2>
                                    Starting Summer 2015
                                </h2>
                                <p>
                                    Suleiman Holdings welcomes three interns to Lincoln for a summer of acquisitions and accounting.
                                </p>
                            </div>
                        </div>
                        <div class="slider-bottom">
                            <div class="line" style="margin-left:0px; margin-right:10px;"></div>
                            <h3>
                                2015
                            </h3>
                            <div class="line" style="margin-left:80px"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                            <div class="line"></div>
                        </div>
                    </li>
                </ul>
            </div>
        </section>
    </div>
</div>
    {{> footer}}
    </template>

Nav template code:

<template name="nav">

    <div class="logobox">
        <div class="mainnavwrap">
            <div class="menumain">
                <a href="/">
                    <div style="position:absolute; height:50px; width:150px; top:0px; z-index:5500; margin-left:60px;"></div>
                </a>
                <ul style="/*position:absolute; width:400px; right:0;*/">

                    <!--<li><a href="private-equity">PRIVATE EQUITY</a></li>
                    <li><a href="real-estate">REAL ESTATE</a></li>-->
                </ul>
            </div>
        </div>

        <div class="toggleMobile">
            <span class="menu1"></span>
            <span class="menu2"></span>
            <span class="menu3"></span>
        </div>
        <div class="logo2">
            <a href="home"><img src="/logo-black.png"></a>
        </div>
        <div id="mobileMenu">
            <ul>
                <a href="home">
                    <li>HOME</li>
                </a>

                <a href="real-estate">
                    <li>REAL ESTATE</li>
                </a>
                <a href="private-equity">
                    <li>PRIVATE EQUITY</li>
                </a>
                <a href="about"><li>ABOUT</li></a>
            </ul>
        </div>
    </div>
</template>

Footer template code:

<template name="footer">
    <div class="footer">
        <span class="copyright">&copy; Copyright 2015 Suleiman Holdings</span>

        <div class="legal">
            <span style="margin-left:20px; font-size:12px;">
                <a href="about" style="margin-right:10px;">About</a>
                <a href="press" style="margin-right:10px;">Press</a>
                <!--<a href="careers" style="margin-right:10px;">Careers</a>-->
                <label class="btn" for="modal-1">Contact</label>
                <a href="legal">Legal</a>
            </span>
        </div>
    </div>


    <input class="modal-state" id="modal-1" type="checkbox"/>

    <div class="modal">
        <label class="modal__bg" for="modal-1"></label>

        <div class="modal__inner">
            <label class="modal__close" for="modal-1"></label>

            <div class="contact">
                <div class="con-logo"><img src="/contact-logo.jpg"></div>
                <p>
                    4665 Innovation Drive
                    <br>
                    Lincoln, Nebraska 68521
                </p>
            </div>
        </div>
    </div>

</template>

Answer №1

If you are working with iron router, make sure to delete the body and head tags from your main HTML template (main || masterLayout || layout) and keep only the {{> yield}}

For example:

<template name="masterLayout">
    {{> navbar}}
    <div class="container">
    {{> yield}}   
    </div>
</template>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Executing additional code after all tests have finished in Mocha.js

In the world of MochaJS testing, it is customary to have before and after blocks for setup and teardown operations. But what if we want to execute an extra cleanup step after all test files have been processed? This is crucial to ensure that any lingering ...

Tips for retrieving return values from an ajax form submission

When using ajax to submit a form, I encountered an issue where the process would halt at api.php and not return to the ajax success. Below is the code snippet: <form method="POST" id="form_1" action="../api.php" enctype="multipart/form-data" novalidate ...

file_put_contents - store user-defined variables

When I execute this script, it successfully generates the html page as expected. However, I am encountering challenges in incorporating variables, such as the $_GET request. The content is enclosed in speech marks and sent to a new webpage on my site usin ...

An issue arises when attempting to utilize the 'push()' method to append a string to a JSON array

I am looking to append strings to my JSON file structure shown below: { "items": [] } To achieve this, I have the requirement of using the following code: var items = require("../../config/item.json"); The approach I am taking is ...

What is the best way to combine JavaScript objects with identical values?

We have a task to compare each input key with others to find any common values. If there are common values, we need to concatenate them together and display the pairs. If no common values are found, then an empty array should be displayed as output. inpu ...

How can I update a CSS class value by utilizing AngularJS variables?

I am currently facing an issue with making my CSS values dynamic. The code I have tried is not functioning as expected. <style> .panel-primary { background-color:{{myColorPanel}} } </style> I came across a similar query on Ho ...

Ways to deactivate selecting rows in a datatable

Is there a way to deactivate the select feature specifically within datatables? An example of using ctrl+a for disabling select all function is available here https://i.stack.imgur.com/RQNXT.png ...

The largest contentful paint is anticipating an unidentified event

My website is encountering issues with Google Pagespeed and I'm unsure of the cause. The primary bottleneck appears to be the LCP time, which Google reports as taking between 7 and 11 seconds during each test. Upon analyzing the waterfall chart, it ...

Create a specific website link for searching on YouTube

Is there a way to generate a YouTube URL using JavaScript or PHP that searches for videos on a specific user account and displays the best title match at the top of the search results? This is the code I am currently using: <!DOCTYPE html> <head ...

What could be causing the Twitter Timeline to fail to load based on a variable in a Vue.js component?

My goal is to display the Twitter timeline of multiple accounts based on the route. I initially attempted to use a plugin called vue-tweet-embed, but encountered issues with it. As a result, I resorted to the traditional method by embedding twitter's ...

If you don't get the correct response from the $.ajax success function

I am utilizing the $.ajax function to retrieve content, however I am encountering an issue when attempting to display special tags from it. The data appears to be missing! This is how I am currently handling it: $(document).ready(function(){ $("button") ...

Issues with MySQL not functioning properly when using Promise.All in a Node.js environment

When it comes to running multiple mysql queries asynchronously in express node.js, MySQL works well with simple callbacks. However, I wanted to take it a step further by using async await with promise.all. I also experimented with promise.allSettled, but u ...

Creating an IF statement within a jQuery / Ajax request when using PHP

Does anyone know how to implement an IF statement inside jQuery? I am currently working with two rows of data in a database that have different statuses. My main file for displaying the data is index.php. Here is a snippet from my index.php: $.get("tes ...

Update data dynamically on a div element using AngularJS controller and ng-repeat

I am currently navigating my way through Angular JS and expanding my knowledge on it. I have a div set up to load data from a JSON file upon startup using a controller with the following code, but now I am looking to refresh it whenever the JSON object cha ...

Verify changes in the Cross Domain RSS feed by utilizing Ajax technology

I have a website where I am trying to automatically reload an RSS news feed from every 60 seconds if it has been updated. I attempted to use Ajax for this purpose, but I seem to be facing some issues: <script type="text/javascript" src="../js/jquery.a ...

straightforward multiple second timer

I have multiple <span class="timer">342</span> elements with different values (in seconds). I am trying to create a countdown timer for all of them by using the following code: $('.timer').ready(function() { ...

Having difficulty with the useState hook in a material ui functional component that integrates with Firebase

Currently, I am endeavoring to create a sign-up form utilizing a Material UI functional component. Within this form, I am aiming to trigger a signup event by using the "onClick" attribute attached to the sign-up button. My approach involves passing the ema ...

Can you explain the distinction between these two forms of functional components in ReactJs?

What sets apart these two code usages? In the FirstExample, focus is lost with every input change (It appears that each change triggers a rerender).. The SecondExample maintains focus and functions as intended. example import React, { useState } from &quo ...

Axios fails to input data into the table

Having trouble with my axios request to insert.php. The variable note_text is coming back as null. I suspect it's because I'm not properly specifying the 2nd argument. My assumption was that there would be a variable like $ _POST['note_text ...

Encountering a problem with Selenium when dealing with tabular data displayed in a DIV format on a website, where each row is encapsulated within its own DIV element

While creating Selenium automation tests for a website with multiple rows contained within a main DIV element, each row represented by a separate DIV. For example, if there are 5 dynamically generated rows, the HTML code structure would look like this: < ...