Sha256: f03ea1327f630a29127b21d7c3b43348f6672b4d2c6c156ce51f80c665e446eb

Contents?: true

Size: 1.92 KB

Versions: 6

Compression:

Stored size: 1.92 KB

Contents

---
title: ResourceManager
inMenu: true
template: /plugin.template
plugin: Core/ResourceManager
---
h2(#description). Description

The ResourceManager plugin provides access to the resources which are shipped with webgen, for
example, the emoticons. Furthermore, it allows the user to specify their own resources.

A resource can either be included directly which means that the content of the resource is written
into the HTML file. Or it can be referenced in which case only the path is written into the HTML
file and the content of the resource itself is written to its predefined output path. Be aware that
a resource is *only* written to its output path if it is referenced at least once (for example, by
the plugin {plugin: Tag/Resource})!

Speaking of the output path, each resource has four properties:

* *resoure name*:
  It is unique among all resources and used to access the resource.
* *output path*:
  This is the path relative to output directory where the resource will be written to if it is
  referenced at least once.
* *type*:
  There are two different types of resources: file resources and memory resources.
** A *file* resource references a file in the file system. The content of this type of resource
   cannot be changed during a webgen run and this type mostly used for images and other binary files.
** A *memory* resource only exists during a webgen run and its content can be changed. This type of
   resource is used, for example, by plugins to specify addditional CSS formatting rules or
   Javascript code.
* *description*: A short description of the resource.

h2(#resources). Predefined Resources

A reason why webgen has a ResourceManager is the possibility to ship predefined resources with
webgen. These resources can be used by any website developed with webgen. The list of predefined
resources can be viewed on the
<a href="{relocatable: /documentation/references/resource_reference.page}">Resource Reference</a>
page.

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
webgen-0.4.2 doc/src/documentation/plugins/core/resourcemanager.page
webgen-0.4.4 doc/src/documentation/plugins/core/resourcemanager.page
webgen-0.4.5 doc/src/documentation/plugins/core/resourcemanager.page
webgen-0.4.3 doc/src/documentation/plugins/core/resourcemanager.page
webgen-0.4.6 doc/src/documentation/plugins/core/resourcemanager.page
webgen-0.4.7 doc/src/documentation/plugins/core/resourcemanager.page