https://github.com/custom-start-page/template
Template is an example of how a website that's compatible with Custom Start Page can be setup.
- Download a ZIP of this repository and use that as the base template for your startpage
Custom Start Page expects certain criteria to be met:
- there must be an
index.html
file in the root of the directory - there must be a
/manifest/
directory in the root of the directory with these files:defaultData.json
- the default options defined for the user, for example, a list of linksmeta.json
- provides meta information about this startpage such as the name and authorpreview.png
- a picture of how your startpage looks, provided with dimensions of 1920x1080readme.md
- a friendly document which tells the user about your startpageschema.json
- a JSON Schema that defines how thedefaultData.json
looks
A handy script called storage.js
has been provided which reads the users data or uses the data defined in the defaultData.json
document.
Include the script in your website:
<script src="csp/js/storage.js"></script>
In your own script, you can then write the following:
new CustomStartStorage().get()
.then(data => {
// Use the data...
});
This startpage needs to be hosted by a web server in order to work.
It's already hosted at https://template.customstart.page for your convenience.
If you want to self host, just run a web server pointed at the directory of /src
and everything should work.
You can't just open the /src/index.html
file in your web browser as this startpage requires use of LocalStorage and also needs to make HTTP requests to some JSON files.
Firefox will give the error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///waves/src/manifest/defaultData.json. (Reason: CORS request not http).
For local development, you can use a development web server such as:
- http-server (NodeJS)
- python server (Python)
- IIS, WAMP, etc
Just open a terminal in the /src
directory and run the web server.
Run:
dist.sh
This will create a /dist
folder which can be zipped and released.