{"id":22687393,"url":"https://github.com/cablehead/noplate","last_synced_at":"2025-03-29T15:43:12.413Z","repository":{"id":1301462,"uuid":"1243634","full_name":"cablehead/noplate","owner":"cablehead","description":"A small experiment for designers who want to make a quick static html site, with simple template reuse, without having to run a full blown server side scripting solution.","archived":false,"fork":false,"pushed_at":"2011-01-19T09:05:36.000Z","size":324,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T05:05:47.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://cablehead.github.com/noplate","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cablehead.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-01-11T23:50:52.000Z","updated_at":"2014-06-17T18:59:30.000Z","dependencies_parsed_at":"2022-08-16T13:00:44.179Z","dependency_job_id":null,"html_url":"https://github.com/cablehead/noplate","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fnoplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fnoplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fnoplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fnoplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cablehead","download_url":"https://codeload.github.com/cablehead/noplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246207491,"owners_count":20740723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-12-09T23:18:12.275Z","updated_at":"2025-03-29T15:43:12.381Z","avatar_url":"https://github.com/cablehead.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"NoPlate\n=======\n\nNoPlate is a small experiment for designers who want to make a quick static\nhtml site, with simple template reuse, without having to run a full blown\nserver side scripting solution.\n\nCheck out the hosted [demo](http://cablehead.github.com/noplate/)!\n\nIt allows you to define a base template, which has placeholders blocks.  The\ncontents of these placeholders can be filled dynamically by external files\nwhich contain html fragments.  Virtual addresses are maintained as links are\nnavigated. These virtual addresses can be linked to directly and allow the\nbrowser history and reload buttons to be utilized.  The linking structure is\ndesigned to be as SEO friendly as possible.  External fragments are cached so\nthey only need to be loaded once.  You can include *\u0026lt;script\u0026gt;* snippets in\nexternal files.  These snippets will get rerun every time that address is\nnavigated to.\n\nNoPlate requires [jQuery](http://jquery.com/), [jQuery\nAddress](https://github.com/asual/jquery-address) and the noplate.js to be\nincluded in your html file.  For convenience a recent copy of [jQuery\nAddress](https://github.com/asual/jquery-address) is included in the\nrepository.\n\nTo get started, create the initial landing page for your site.  Then add these headers.\n\n    \u003cscript type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"jquery.address.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"noplate.js\"\u003e\u003c/script\u003e\n\nIdentify blocks of markup which should change as links are navigated.  Give the\ncontaining element of each of these blocks an id, and the class\n*noplate-block*:\n\n    \u003cdiv id=\"main\" class=\"noplate-block\"\u003e\n        \u003ch2\u003eHome Page\u003c/h2\u003e\n        \u003cp\u003eHi, welcome to my website.\u003c/p\u003e\n    \u003c/div\u003e\n\nYou can define any number of these blocks.\n\nYou can create links to files which contain html fragments to fill these blocks\nby setting a link's target to *_noplate*.  For example, this is how you link to\nan external template *bio.html*:\n\n    \u003ca target=\"_noplate\" href=\"bio.html\"\u003eBio\u003c/a\u003e\n\nExternal files simply define elements with ids that match the blocks to be replaced:\n\n    \u003cdiv id=\"main\"\u003e\n    \u003ch2\u003eAbout Me\u003c/h2\u003e\n    \u003c/div\u003e\n\nIn case someone links directly to an external file, you can place a redirect at\nthe bottom of the fragment file for that page's virtual address.  Give the\nscript the class *noplate-skip* so it won't be run when it's link to by\nnoplate.  Here's an example for the bio page:\n\n    \u003cscript class=\"noplate-skip\"\u003ewindow.location.href='./#/bio'\u003c/script\u003e\n\n\nJust watch, do to issues with most browsers handling of the [Same origin\npolicy](http://en.wikipedia.org/wiki/Same_origin_policy) NoPlate will only work\nwhen your files are served over http.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcablehead%2Fnoplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcablehead%2Fnoplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcablehead%2Fnoplate/lists"}