Skip to main content

Map TiddlyWeb URLs to your own custom URLs

Project description

tiddlywebplugins.urls

Map a custom URL to a default TiddlyWeb URL

Uses selector syntax for the custom URL (http://lukearno.com/projects/selector/)

Also lets you map a custom URL to any other URL, for use as a URL shortener

Usage:

to bring up a tiddlywiki at /wiki/foo, create a tiddler like follows:

title: /wiki/{bag_name:segment}

text: /bags/{{ bag_name }}/tiddlers.wiki

alternately:

title: /wiki/{bag_name:segment}

text: /recipes/edit_wiki/tiddlers.wiki

recipe (edit_wiki in this case): desc: policy: {“read”: [], “create”: [], “manage”: [], “write”: [], “owner”: null, “delete”: []}

/bags/system/tiddlers /bags/{{ bag_name }}/tiddlers

where bag_name can be any variable name.

Note that this does not support PUTs, so if the second example is used, you may be unable to PUT to the the recipe (unless you provide a default for bag_name).

To create a short link to google.com, you might do:

title: /google

text: http://www.google.com

If you want to redirect to an internal URL, you can also add the tag “redirect”:

title: /wiki/{user:segment}

tags: redirect

text: /recipes/{{ user }}/tiddlers.wiki

Please note: all urls are stored in a bag called “urls” by default. The name of this bag can be changed by adding “urls_bag” to tiddlywebconfig.py, but all tiddlers in the bag must be “url tiddlers” of the above format. If this bag doesn’t exists already, it will be created automatically.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tiddlywebplugins.urls-0.1.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file tiddlywebplugins.urls-0.1.tar.gz.

File metadata

File hashes

Hashes for tiddlywebplugins.urls-0.1.tar.gz
Algorithm Hash digest
SHA256 a67fafb8870e5ad4e03ed97b0feea2edfc111dd6046352aaed2818676a07d5c6
MD5 4e395623cb528e11dbb0635414c3346b
BLAKE2b-256 2a34b5b1aabfda066b9d93e8bd4a1bd2de0ea78ff764515196b0e2c8673e0ce1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page