npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

header-footerify

v1.0.0

Published

A simple JavaScript library to automate the insertion of header and footer content into your webpages.

Readme

header-footerify

header-footerify is a lightweight JavaScript library designed to automate the insertion of header and footer content into your web pages. By loading header and footer content from external HTML files, this library helps you maintain a clean and modular structure in your projects, making updates easier and more efficient.

Table of Contents

Features

  • Easy Integration: Quickly integrate the library into your existing projects with minimal setup.
  • External Content Loading: Load header and footer content from external HTML files.
  • DOM Manipulation: Automatically inserts the content into designated <header> and <footer> elements.
  • Lightweight: Minimal impact on page load times.

Installation

You can install header-footerify via npm:

npm install header-footerify

Or you can directly include the headerFooter.js file in your project by downloading or cloning the repository:

git clone https://github.com/burhanuddinhamzabhai/header-footerify.git

Include the script in your HTML file:

<script src="path/to/headerFooter.js"></script>

Usage

  1. Prepare Header and Footer HTML Files

    Create separate header.html and footer.html files containing your desired header and footer content.

  2. Include Header and Footer Elements

    In your HTML files, include <header> and <footer> elements where the content should be inserted:

    <header></header>
    <footer></footer>
  3. Use the Library

    Use the insertHeaderFooter() function to load the content from your external HTML files:

    insertHeaderFooter('path/to/header.html', 'path/to/footer.html');

Example

Here’s a simple example of how to use header-footerify in a web page:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Example Page</title>
</head>
<body>
    <!-- Header placeholder -->
    <header></header>

    <!-- Main content -->
    <main>
        <h1>Welcome to My Website</h1>
        <p>This is a simple example of using the header-footerify.</p>
    </main>

    <!-- Footer placeholder -->
    <footer></footer>

    <!-- Include the library -->
    <script src="dist/headerFooter.js"></script>
    <script>
        // Insert header and footer content
        insertHeaderFooter('header.html', 'footer.html');
    </script>
</body>
</html>

Contributing

We welcome contributions to improve header-footerify. If you have any suggestions or find a bug, please open an issue or submit a pull request.

Steps to Contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add new feature').
  5. Push to the branch (git push origin feature-branch).
  6. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.