-
Notifications
You must be signed in to change notification settings - Fork 0
referer_scheme.rb
Makes it easier to edit the referer table.
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
- tdiary:http://tdiary.tdiary.net/ tDiary.net management journal.
- wiki:http://docs.tdiary.org/en/ tDiary Documents
- ymd:http://www.example.com/diary/ Example diary
- Date-like string in the URL is converted into something like YYYY-MM-DD (Contributed by kitaj)
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.
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.