-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.t2t
83 lines (66 loc) · 3.51 KB
/
config.t2t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
% This is the txt2tags site main configuration file.
% All the pages of the website use these configs.
% Some self-explanatory options (I guess)
%!target: html
%!encoding: UTF-8
% The CSS style file for this site.
%!style: site.css
% The --css-sugar is a nice option when you use CSS for formatting.
% It adds <div> tags on the HTML code: header, toc and body,
% making it easy to format each document area. It also removes some
% little formatting information that txt2tags adds, leaving the code
% clear for all your CSS trips.
%!options: --css-sugar
% New option in SVN version of txt2tags to fix the path of CSS files,
% images and local links. Thanks to this option, I can refer to
% site.css in the %!style setting above and each converted file will
% have the CSS file relative path correctly set.
%%!options: --fix-path
% The SITEROOT is a wildcard that refers to the site root folder (/)
% using relative folder paths. Here it is expanded to the current
% folder (dot). Other files may redefine it to .. or ../.. depending
% how deep they are in the folder structure. But remember to do it
% *before* calling this file. For example, to use this config file,
% the foo/bar/baz.t2t file should use:
%
% %!postproc: SITEROOT ../..
% %!includeconf: ../../inc/config.t2t
%
% This wildcard is used to compose *relative* links to other files
% from this site. So always compose relative links as SITEROOT/file.html
% Another use is for referring to images in the /img folder. Always
% use SITEROOT/img/myimage.png
%!postproc: SITEROOT .
% Trick to add the author meta tag right after the <head> tag.
%!postproc: '(?i)(<head>)' '\1\n<meta name="author" content="George Vlahavas <vlahavas~at~gmail~dot~com>">'
% Trick to add the favicon meta tag right before the </head> tag.
%!postproc: '(?i)(</head>)' '<link rel="icon" type="image/png" href="img/favicon.png">\n\1'
% Trick to add the TITLE/ALT attribute to an image
%!postproc: '(?i)(src="[^"]*t2tpowered.png")' '\1 title="O>OOOO"'
%!postproc: '(?i)(src="[^"]*donate.png".*?) ALT=""' '\1 alt="DONATE"'
% Real nice trick to transform a link into a SPAN with TITLE.
% Used when you want a tooltip to appear when the mouse hovers some words.
%
% On the .t2t file, create a fake link like [CSS #tooltip1]
% Then make a filter like %!postproc: {tooltip1} Cascading Style Sheets
% If you need more tooltips, just increase the number: tooltip2, tooltip3...
% Also, make a span.tooltip rule on the CSS to highlight the words.
%
%!postproc: '(?i)<a href="#(tooltip[0-9]*)">(.*?)</a>' '<span class="tooltip" title="{\1}">\2</span>'
% This fixes a bug in %%infile path when inside included file.
% In this case, the %%infile inside footer.t2t incorrectly gets footer.t2t
% path instead the original file's path.
%!postproc: '(<A HREF=")inc/(.*?.t2t">See sources</A>)' '\1\2'
%!postproc: '(<A HREF=")../inc/(.*?.t2t">See sources</A>)' '\1\2'
%%% Some post processing filter magic (search & replace)
% Adds an ID to the <body> tag
% Note: the (?i) makes the pattern case insensitive (avoids headaches)
%!postproc: '(?i)(<body)' '\1 id="home"'
% meta: keywords
%!postproc: (</HEAD>) <meta name="keywords" content="salix, slackware, gnu, linux, distribution, slapt-get">\n\1
% meta: description
%!postproc: (</HEAD>) <meta name="description" content="Salix - The Linux distribution for the lazy Slacker!">\n\1
% Create a link bank to keep the text clean
%!preproc: MODERNVINTAGE http://www.modernvintagestyle.co.uk
%!preproc: PAINHEALTH http://www.lowerabdominalpaintreatment.com
%!preproc: VIPPI http://www.vippivelho.fi