Skip to content

referer_scheme.rb

TADA Tadashi edited this page Dec 22, 2017 · 1 revision

About

Makes it easier to edit the referer table.

Usage

Enable this plug-in by coping into the plugin directory or selecting from the plug-in selection plug-in.

Then, edit the Rule of conversion URL to words' in Today's Link' of Preference'. Add prefixes (meta-scheme) like tdiary:'.

This adds the date of the diaries or blogs according to their URLs.

For example, set the `Rule' as

For these examples, date is added with a (YYYY-MM-DD) format if it is contained in the URL.

For URLs with tdiary:, wiki:, and ymd:,

  • Do not use parenthesis (' and )'
  • End the URL with a '/'

Please make sure to refresh the cache if you use it in disp_referrer.rb.

How to make a meta-scheme

Meta-schems are extracted from the user's Rule with a Regexp: /^(\w+):/. Define singleton methods of @conf.referer_table as iterators:

def scheme_<scheme>( url, name )
:
yield( url_variants, name_variants )
:
end

The singleton methods are called according to the user's Rule with the ```:' part omitted in the url.

Clone this wiki locally