-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.t2t
93 lines (74 loc) · 4.24 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
84
85
86
87
88
89
90
91
92
% 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="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">\n\1'
%!postproc: '(?i)(</head>)' '<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">\n\1'
%!postproc: '(?i)(</head>)' '<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">\n\1'
%!postproc: '(?i)(</head>)' '<link rel="manifest" href="/site.webmanifest">\n\1'
%!postproc: '(?i)(</head>)' '<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">\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
% meta: viewport
%!postproc: (</HEAD>) <meta name="viewport" content="width=device-width, initial-scale=1.0">\n\1
% meta: opengraph
%!postproc: (</HEAD>) <meta property="og:title" content="Salix" />\n\1
%!postproc: (</HEAD>) <meta property="og:description" content="Linux for the Lazy Slacker" />\n\1
%!postproc: (</HEAD>) <meta property="og:type" content="website" />\n\1
%!postproc: (</HEAD>) <meta property="og:url" content="https://salixos.org/" />\n\1
%!postproc: (</HEAD>) <meta property="og:image" content="/img/og_image.png"/>\n\1