pnbp

a terrible but reliable site builder
Log | Files | Refs | README

docs.json (3399B)


      1 [{"post":"0","title":"Getting Started","description":"A quick guide to start using pnbp","content":"<h3>Welcome!<\/h3>\n<p>To get started using pnbp, you need to configure your first site.<\/p>\n<p>With pnbp, there's a specific directory structure that is at the base of every site.<\/p>\n<p>It looks something like this:<\/p>\n<pre><code>|- pages.yml\n|\n|-- data\n   \\ - static<\/code><\/pre>\n<h4>pages.yml<\/h4>\n<p>This file is the main configuration file for the entire site. This file specifies every page that's created, along with what template directories\/files are going to be used. If no templates are specified, <code>templates\/<\/code> is assumed as the default template directory.<\/p>\n<h4>data<\/h4>\n<p>This is where all the information regarding any module will be kept.<\/p>\n<h4>data\/static<\/h4>\n<p>The static directory is what will be added into the root directory of the site when built. This is used for things such as cat pictures, cgi scripts and styles for the site.<\/p>\n<p>So far, this site wouldn't generate anything.<\/p>\n<p>To get a working site, we need <a href=\"\/docs\/post\/site_configuration\">configure one<\/a>.<\/p>"},{"post":"1","title":"Site configuration","description":"Specifications on the Site config file","content":"<p>For every page, there's an entry in the pages.yml file specifying the template, module and page-variables\/includes.<\/p>\n<p>A basic pages.yml:<\/p>\n<pre><code>---\n  (pagename):\n    template: \"templates\/standard.html\"\n    pagevar:\n      :include: \"includes\/include.html\"\n      var: \"Variable\"\n    pagemod:\n      (modid):\n        mod: \"page\"\n  (pagename):\n    template: \"templates\/other.html\"\n    pagevar:\n      title: \"pnbp\"\n    pagemod:\n      (modid):\n        mod: \"page\"\n        settings:\n          location: \"space\"<\/code><\/pre>\n<h3>(pagename)<\/h3>\n<p>This specifies the name and location of the page.<\/p>\n<p>\"index\" is a special term used to define the home page of the website, thus creating this page in the root of the website.<\/p>\n<h3><a href=\"\/docs\/post\/templates_and_includes\/\">template<\/a><\/h3>\n<p>This specifies the location of the template that is going to be used in this page.<\/p>\n<h3>pagevar<\/h3>\n<p>These are the variables that are specified in the templates to be replaced with the values specified.<\/p>\n<p>Includes are specified with a <code>':'<\/code> at the beginning of the name of the variable, followed by the the value being the location of the file to include.<\/p>\n<h3>pagemod<\/h3>\n<p>This is a specialized set of variables, pointing to a module that can create subpages.<\/p>\n<p><code>(modid)<\/code> is used for the id of the module that is being used. This may be used in different ways for different modules. For information on the use of <code>(modid)<\/code>, refer to the documentation of the module being used.<\/p>"},{"post":"2","title":"Templates and Includes","description":"How do template?","content":"<p>Templates are the base of most websites. You have the fancy logo, navigation, and footers looking generally the same for every webpage, and the body of the webpage is where the mutable and dynamic content resides. This doesn't mean you must follow this paradigm, but it is helpful to be able to re-create this in your website if you want to take advantage of what website generators are designed for.<\/p>"}]