Sha256: 40dd2f136e2a6b6a7d0c762178192e42703d894ad8ddf79bedd2ec5106f0ceb1
Contents?: true
Size: 1.89 KB
Versions: 3
Compression:
Stored size: 1.89 KB
Contents
# Your First Page To setup the default site, simply create a directory and use the `utopia` command: ```bash $ mkdir www.example.com $ cd www.example.com $ utopia site create $ rake server ``` You will now have a basic template site running on `https://localhost:9292`. ## Welcome Page Utopia includes a redirection middleware to redirect all root-level requests to a given URI. The default being `/welcome/index`: ```ruby # in config.ru use Utopia::Redirection::Rewrite, '/' => '/welcome/index' ``` This page includes a basic overview of Utopia. Most of it's standard HTML, except for the outer `<content:page>` tag. Utopia uses the name `page` to lookup the file-system hierarchy. First, it looks for `/welcome/_page.xnode`, and then it looks for `/_page.xnode` which it finds. This page template includes a tag `<utopia:content/>` which is replaced with the inner body of the `<content:page>` tag. This recursive lookup is the heart of Utopia. ## Links Utopia is a content-centric web application platform. It leverages the file-system to provide a mapping between logical resources and files on disk. The primary mode of mapping incoming requests to specific nodes (content) is done using the `links.yaml` file. The links file associates metadata with node names for a given directory. This can include things like redirects, titles, descriptions, etc. You can add any metadata you like, to support your specific use-case. The primary use of the links files is to provide site structure, e.g. menus. In addition, they can function as a rudimentary data-store for static information, e.g. a list of applications (each with it's own page), a list of features, etc. You'll notice that there is a file `/links.yaml`. This file contains important metadata relating to the `errors` subdirectory. As we don't want these nodes showing up in a top level menu, we mark them as `display: false` ```yaml errors: display: false ```
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
utopia-2.15.1 | wiki/pages/your-first-page/index.md |
utopia-2.15.0 | wiki/pages/your-first-page/index.md |
utopia-2.14.0 | wiki/pages/your-first-page/index.md |