manifest.json
#
Configuring Application manifest (or manifest.json
) is mandatory but can be emptied. Hence, we have default manifest values as below.
info
App manifest schema might be changed on this track release depends on majority of people's need. Pull request and open issue are welcome.
However, we suggest you to configure manifest properly to make sure your app looks good by web crawlers. If you are managing app environment with structured method, consider to learn explanations below.
#
MetadataSearch Engine Optimization (SEO) is important. We could configure the manifest to have some metadata information for SEO. Here is an example:
For more detail specification, see Open Graph Protocol, Twitter Developer, and some SEO advice.
#
StagesWhen you choose to follow structured method, you have to configure "stages"
inside your app manifest. Here is a full example for configuring "stages"
:
The "stages"
value must an array of objects with these properties:
- route (required)
This is URL relatives to your website's root path. If browser visit that URL, it will redirects tomain.fiwl
inside path that defined on"resource"
, or another*.fiwl
file if you define"layout"
value. - resource (required)
Informs where the stage and its resource files live. This is an URL relatives to website's root path. - layout (optional, default: "main")
If the stage has file name other thanmain.fiwl
, then you should set this. Keep in mind that you should not write.fiwl
extension. - controller (optional, default: null)
Not all developer combine logic and layout. If you are the one who prefer split logic and layout, then put the script inside*.js
file at stage's resource directory and set the"controller"
with that JavaScript file name. Like"layout"
, you don't have to write.js
extension. For further information about script, see the next page.
#
WidgetsFIWL allows developers to share their widgets. To use another widgets, you could simply put the *.js
files which contain some widgets to project directory as example:
Then add these to manifest.json
The awsome
and anotherawsome
are widget modules now. You could name the widget module anything you want with rules:
- Only use alphanumerics (a-z, A-Z, 0-9) and underscores (
_
) - Do not start naming with number (as example
4chan_widgets
is illegal) - To avoid conflict, do not name with something that already defined (as example DisplayObject, Layout, Button, ...)
To use that widget (as example CoolClock from "awsome" widget module), write this on any *.fiwl
stage:
caution
Modular widget support still in development, so it won't work for now. See development checklist