Simple Site - The site.json file

The site.json file is used to control a few of the more structural aspects of the web pages and relates to all of the pages that will be produced. It's content falls into three main parts: the meta, logos & links, and extras sections. The easiest method of creating your own site.json file is to copy the existing one that is provided with the project code and just edit it as needed. The sections shown below are cropped from a full file and contain descriptions rather than real values, for an example of real code please see this example site.json file.

The Meta values

'Meta elements are tags used in HTML and XHTML documents to provide structured metadata about a Web page'[1]. They are used to defined a selection of hidden information which can be used by search engines and web browsers. At this time this project only makes use of 5 of these meta elements, further values could be added if required but this would require making adjustments to the project code rather than just the JSON file.

{
  "metaDescription": "Short project description, this can be used and presented by search engines",
  "metaKeywords": "Used to help tag what your project is related to, this will assist search engines to find your project",
  "metaAuthor": "Author Name|Author Email Address|Further Institutional Information as required",
  "metaTitle": "Simple short title For Your website or project, which can be display in browser tabs",
  "metaFavIcon": "URL for your chosen favicon.ico file (https://en.wikipedia.org/wiki/Favicon)",
...

Logos & Links

As can be seen from the figure below the values in this section are reasonably straight forward and directly relate to the images and links that will appear on every page. These values are all optional and can be left blank, particularly the extra_logos details, but it is recommend that you do add an appropriate main logo and the required licence details.

...
  "logo_link": "The URL you would like the top left logo to point to a default would be \"./\" which would point to the home page of your project.",
  "licence": "Clickable links/icons of indicating the relevant licence or re-use restrictions of your project",
  "logo_path": "The full path or URL to the image you would like to appear in the top left corner",
  "footer": "Optional copy right statement or link you would like to appear on the bottom left of the page ",
  "extra_logos": {
    "1st Logo": {
      "link": "The clickable link for this specific logo",
      "logo": "The full path or URL for the required logo image file.",
      "alt": "Optional first extra logo related to the project"
    },
    "2nd Logo": {
      "link": "The clickable link for this specific logo",
      "logo": "The full path or URL for the required logo image file.",
      "alt": "Optional second extra logo related to the project"
    }
  },
...
site.json image
Annotated image highlighting which sections of the page are connected to each of the Logos & Links values.

Extra JS & CSS Code

For most simple projects the last section of values can be simply left blank as they are only required if more advanced users would like to add additional functionality or styling.

...
  "extra_js_scripts": ["A comma separated list of any additional javascript files that need to be included"],
  "extra_css_scripts": ["A comma separated list of any additional css style sheets that need to be included"],
  "extra_css": "Any additional css code that you need to be directly added to all of the pages",
  "extra_js": "Any additional javascript code that you need to be directly added to all of the pages",
...

Google Analytics

The inbuilt GitHub analytics system will track how people interact with your project files and code but it does not track visitors to your actual webpages. So if analytics are required for your webpages as well an option has been added to use Google Analytics simply by adding your site Google Analytics ID to your site.json file. Instructions for setting up Google Analytics and getting an Analytics ID can be found here.

...
  "GoogleAnalyticsID": "G-XXXXXXXXXX"
}