storing scalable vector graphics


I have included some svg icons in my pages on this site, however they are loaded with the page. I want to add them to the images/svg and then dymamically load them and insert into the dom.

First make sure svg ’on save’ is uploaded to localhost.

Then add the store-md target to the build file.

Note we remove www from the path with a filterchain. We add the collection path Then store the file. curl to check if we can fetch it and its returning the right content type

Ok. lets go to our templates/includes folder open up head.html and add

... continue to read article
article first published on the and updated
tagged - svg

optimising javascript


download js

article first published on the and updated
tagged - javascript

hacking repo nginx exist ubuntu


re. nginx-eXist-ubuntu

Thanks for the mention Joe. The scripts set up for ‘remote-host production’, enable Nginx to act as a reverse proxy and cache server for eXist. For local-host development Nginx just acts as a reverse proxy because you want to see your development changes before you deploy.

Its my dog-food, it works for me. I make no claim to be an expert on caching.

If anyone thinks it useful I’ll create a ant file with a properties file to alter variable properties like the period the cache is valid which is hard coded. Set to one day below.

ref: proxy-cache.conf

... continue to read article
article first published on the and updated

nginx as reverse proxy for exist

Nginx The Web Server, Exist The XML Application Server

Nginx as a reverse proxy and cache server for the eXist-db Application Server

eXist-db provides a XML document-oriented schema-less data-store and an xQuery engine to access and serve this data.

ubuntu with it’s server and deskstop vesions, pretty much the best OS enviroment for developing web apps.

Nginx The Web Server, Exist The XML Application Server

The projects purpose is to help users set up Nginx as as a reverse proxy for eXist-db application server for both local development and remote production.

... continue to read article
article first published on the and updated
tagged - nginx - ubuntu - existdb
A new note.
note first published on the and updated
tagged - test
Test: Draft test 2
note first published on the and updated
tagged - test

publishing drafts


Now I have a local to remote trigger, I don’t want every save to appear live on the remote production server. So I have included a draft publishing control to be included in the front matter.

The draft value, either ‘yes’ or ’no’ TODO: maybe add true false If there is no draft key in the front matter then the default is to publish to remote.

This value md front matter value is converted to a atomPub control when saved to our data store. The control element is in its own namespace. http://www.w3.org/2007/app

I don’t know why it has its own namespace but it does so I’ll add it

In our stored atom entry

... continue to read article
article first published on the and updated
tagged - atom

comment first published on the and updated
tagged - test

sending webmentions

Some background notes on sending webmentions.

A work in progress

Two parts

  1. This article: a ‘publishing client’ which can send webmentions
  2. Next article: my servers capability of receiving webmentions an doing something useful with the received mention.

A Webmentions Publishing Client.

I write markdown in a text editor (Komodo) publishing environment. The markdown text ’on save’ is preprocessed and published to localhost server which in turn publishes to my remote server. My publishing environment pretty much behaves like a ‘static site generator’. Meta data is provided via markdown front-matter block.

... continue to read article
article first published on the and updated
tagged - webmention
Test: this note mentions another note http://markup.co.nz/archive/2014/02/20/091049
note first published on the and updated
Started coding for webmentions
note first published on the and updated
tagged - webmentions
Well I screwed that up. Wobbly site now back on an even keel ... until the next time
note first published on the and updated
tagged - selfdogfood
Just created a gist. #xquery3 function that uses 'group by' to list entries by year month day https://gist.github.com/grantmacken/9084989 used in http://markup.co.nz/archive
note first published on the and updated
tagged - xquery3 - existdb
also posted on twitter
Indiemark 0.2 pts by adding a google site-specific search form to archive page.
note first published on the and updated
tagged - indiemark - siteSpecificSearch
also posted on twitter
a existdb trigger which syncs localhost to remotehost
https://gist.github.com/grantmacken/8950792
note first published on the and updated
tagged - existdb
also posted on twitter

publishing posts

Publishing updates to remotehost now works without blocking our editing enviroment

From localhost to remote

When I save a Markdown file from Komodo, the files data get stored as an atom entry in the localhost existdb server. What I wanted to do is from our localhost server, call a function to ‘upload’ the created or updated document to the remote server.

Existdb has event triggers. I set up an event trigger for the archive collection that will call archive-trigger.xqm. which will call my update function trigger:update-remote($uri)

First I get my archive-trigger.xqm update function to log so I can see whats happening.

I open the terminal and use tail to track the existdb log

... continue to read article
article first published on the and updated
tagged - existdb - nonblocking - komodo - async

ux design patterns


The Home Page

The home page will be a posts feed consisting of ’post listings’.

At the moment

  1. This activity stream of my 20 latest Articles and Notes and other ‘post items’ are in reverse chronological order
  2. post listings: these will not be separated out by post-type i.e. articles vs notes vs images but clumped together in one listing.
  3. Post Articles will be shortened to 5 block elements with a call to action … continue reading
  4. Post Notes contain ‘linkable things’ URL, hashtags TODO: and people
  5. Titles are stored as lowercase but are transformed via CSS `text-transform: capitalize
  6. Short summaries are displayed if they are available
  7. Permalinks and published and update dates are displayed
  8. Also posted on POSSE links are displayed

Post Listing Issues

... continue to read article
article first published on the and updated
The pygments xquery language lexer does not recognise xquery 3 tokens.As github also uses Python Pygments so it might be worthwhile forking the project and try to update the lexer. If I've got time I will take a look ref: git hub issue.
[XQuery 3.0](https://github.com/spig/pygments-xquery-lexer/issues/1)
note first published on the and updated
tagged - xquery - xquery3 - pygments
If a note char count doesn't fit twitters 140 chars then this will become an
**abbr note**. In this case the *summary* is used with a link otherwise the
summary is not relevant.
A note taken from
> http://markup.co.nz/archive/2014/01/20/creating-notes
note first published on the and updated
tagged - indieweb - POSSE