{"id":19960120,"url":"https://github.com/born2net/gulp-header-footer-gen-v2","last_synced_at":"2026-04-15T00:31:37.585Z","repository":{"id":75354649,"uuid":"390124767","full_name":"born2net/gulp-header-footer-gen-v2","owner":"born2net","description":null,"archived":false,"fork":false,"pushed_at":"2021-07-27T20:57:59.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T16:29:40.011Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/born2net.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-27T20:57:23.000Z","updated_at":"2021-08-02T19:15:32.000Z","dependencies_parsed_at":"2023-06-06T06:15:13.690Z","dependency_job_id":null,"html_url":"https://github.com/born2net/gulp-header-footer-gen-v2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/born2net/gulp-header-footer-gen-v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/born2net%2Fgulp-header-footer-gen-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/born2net%2Fgulp-header-footer-gen-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/born2net%2Fgulp-header-footer-gen-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/born2net%2Fgulp-header-footer-gen-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/born2net","download_url":"https://codeload.github.com/born2net/gulp-header-footer-gen-v2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/born2net%2Fgulp-header-footer-gen-v2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31821420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T01:53:50.957Z","updated_at":"2026-04-15T00:31:37.577Z","avatar_url":"https://github.com/born2net.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"gulp-header-footer-gen\n==========================\n\nMost web sites share a common HTML header and footer throughout a web site.\nThis Plugin attempts to solve a simple problem, the ability to share a single page template that includes both a header and footer with the entire web site (all html pages).\n\nIf you know DreamWeaver, it's the same idea as Web Template (DWT)\n\nEasier to explain with an example.\n\nSite structure:\n\nbefore gulp execution:\n\n\u003cpre\u003e\nindex.html\n|\n   _source -\n      file1.html\n      file2.html\n      file3.html\n|\n   _js\n   _css\n   ...\n\u003c/pre\u003e\n\n\nafter gulp execution:\n\n\u003cpre\u003e\nindex.html\n|\n   _source -\n      file1.html\n      file2.html\n      file3.html\n|\n   _js\n   _html\n      file1.html\n      file2.html\n      file3.html\n   _css\n   ...\n\n\u003c/pre\u003e\n\nwith all references to ./ changed to ../\n\nso gulp-header-footer-gen will generate the HTML pages for us.\n\n\nHow to setup:\n==============\n\nIn index.html (or whatever template file you choose that resides at the root of the project) put your content between the tags of:\n\n```\n\u003c!-- MAIN_CONTENT_START --\u003e\n\n\u003c!-- MAIN_CONTENT_END --\u003e\n```\n\nso a typical index.html will look like:\n\n\nHTML template sample:\n==============\n\n```\n\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"\u003e\n\u003chtml xmlns=\"http://www.w3.org/1999/xhtml\"\u003e\u003c!-- InstanceBegin template=\"/Templates/Template.dwt\" codeOutsideHTMLIsLocked=\"false\" --\u003e\n\u003chead\u003e\n    \u003cmeta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/\u003e\n    \u003ctitle\u003eMediasignage\u003c/title\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n    \u003cmeta name=\"description\" content=\"Mediasignage\"/\u003e\n    \u003cmeta name=\"keywords\" content=\"Mediasignage\"/\u003e\n    \u003cmeta name=\"publisher\" content=\"Mediasignage\"/\u003e\n    \u003clink rel=\"icon\" href=\"images/favicon.ico\" type=\"image/x-icon\"\u003e\n    \u003clink rel=\"shortcut icon\" href=\"images/favicon.ico\" type=\"image/x-icon\"/\u003e\n    \u003clink rel=\"stylesheet\" type=\"text/css\" href=\"http://fonts.googleapis.com/css?family=Leckerli+One\" media=\"screen\"\u003e\n    \u003clink rel=\"stylesheet\" type=\"text/css\" href=\"http://fonts.googleapis.com/css?family=Pacifico\" media=\"screen\"\u003e\n    \u003clink href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'\u003e\n    \u003clink rel=\"stylesheet\" type=\"text/css\" href=\"./css/layout.css\" media=\"screen\"\u003e\n    \u003clink rel=\"stylesheet\" type=\"text/css\" href=\"./css/bootstrap.css\" media=\"screen\"\u003e\n\u003c/head\u003e\n\n\u003cbody\u003e\n\u003cdiv class=\"MyHeader\"\u003e\n   ...\n\u003c/div\n\n\u003c!-- MAIN_CONTENT_START --\u003e\n\n\u003csection id=\"myContentForIndex\"\u003e\n\u003c/section\u003e\n\n\u003c!-- MAIN_CONTENT_END --\u003e\n\n\u003cfooter\u003e\n    \u003cdiv class=\"container\"\u003e\n    \u003c/div\u003e\n\u003c/footer\u003e\n\n\u003cscript src=\"./js/jquery-1.4.2.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\u003cscript src=\"./js/sliding.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\u003cscript src=\"./js/jquery.easing.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\u003cscript src=\"./js/jquery-1.7.1.min.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\u003cscript src=\"./js/bootstrap.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"./html5lightbox/jquery.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"./html5lightbox/html5lightbox.js\"\u003e\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n\n\n```\n\nPlugin responsibility:\n==============\n\n- remove index.html content (between the MAIN_CONTENT START and END).\n- use the rest of the page as a template\n- replace the content of all _html/* pages with the index.html template and replace all './' paths with '../' so we can still load up images, CSS, scripts etc from proper path.\n\nremember, in your _html/file1.html etc you also need to use the same pattern, i.e.: put all page content between the opening and closing tags of\n\n```\n\u003c!-- MAIN_CONTENT_START --\u003e\n...\n\u003c!-- MAIN_CONTENT_END --\u003e\n```\n\nTo execute:\n==============\n\n```\ngulp.task('headerFooterGan', function () {\n    gulp.src('./_source/*')\n        .pipe(headerfootergen('./index.html')).on('error', handleError)\n        .pipe(gulp.dest('./_html/'))\n});\n\nfunction handleError(err) {\n    console.log(err.toString());\n    this.emit('end');\n}\n```\n\nDemo:\n==============\nhttps://github.com/born2net/webSiteBoilerplate\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborn2net%2Fgulp-header-footer-gen-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborn2net%2Fgulp-header-footer-gen-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborn2net%2Fgulp-header-footer-gen-v2/lists"}