Online Business Card application
Build
- Get
Stack,make stack setupto get GHCJS etcmake all
View locally
-
make serveThis command makes use of
sws- a simple Haskell web server - to serve static content from thedistdirectory. If you have noswsinstalled feel free to use any other preferred web server serving files from the same directory.
Use for yourself (no programming needed)
-
Copy the contents of the
distdirectory to your web server path. -
Create a Github Gist containing a json representation of the
Data.Treesite tree (or edit the json example below.). -
Create a gist containing a json representation of the blog index.
-
Replace the root gist id and the blog gist id in the
index.htmlfile with the ids of your gists:<script>window.RootG=JSON.stringify({"rootGist":"...", "blogGist":"..."})</script> -
Open the page in a browser.
Example root gist
dataSource is a gist id. Gist is expected to contain a string with valid json.
blogSlug specifies the blog slug (blog part is processed in a different way).
collapsedMenuPaths is a list of slug prefixes for which the menu will be collapsed.
titleRoot specifies the root label in the title bar.
titleSep specifies a separator for title parts.
forest contains a list of trees representing hierarchical structure of the content.
Each element in the trees has the same properties:
dataSource is an id of a gist containg the html content of the page.
title is menu item title as shown in the menu.
path is slug.
{ "blogSlug": "blog"
, "collapsedMenuPaths": [ "blog", "photos" ]
, "titleRoot": "<♥>"
, "titleSep": " <> "
, "forest":
[
[
{
"dataSource": "<gist-id>",
"title": "Menu item 1",
"path": "item1"
},
[
[
{
"dataSource": "<gist-id>",
"title": "Submenu level 1 item 1",
"path": "subitem1"
},
[]
],
[
{
"dataSource": "<gist-id>",
"title": "Submenu level 1 item 2",
"path": "subitem2"
},
[
[
{
"dataSource": "<gist-id>",
"title": "Submenu level 2 item 1",
"path": "subsubitem1"
},
[]
],
...
]
],
...
]
],
[
{
"dataSource": "<gist-id>",
"title": "Menu item s",
"path": "item2"
},
[]
],
...
]
}
Example blog index gist
{
"unblog": [
{
"day": 25,
"month": 2,
"year": 2019,
"hash": "<gist-id>",
"slug": "a-slug",
"humanTitle": "An article"
},
{
"day": 22,
"month": 2,
"year": 2019,
"hash": "<gist-id>",
"slug": "b-slug",
"humanTitle": "Another article"
},
...
]
}
Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
