Sublime Forum

Sublime Text generator of static sites

#1

I have static site on GitHub Pages. For example, I create simple snippet

<!DOCTYPE html>
<html lang="ru">
<head>
<title></title>
</head>
<body>
<p><p>
</body>
</html>

And I insert it on pages of my site.

But, let us assume, I want to change something in <head> of all pages where my snippet is inserted:

<!DOCTYPE html>
<html lang="ru">
<head>
<title></title>
<meta charset="utf-8">
<meta name="description" content="">
</head>
<body>
<p><p>
</body>
</html>

And I am compelled to carry out changes on each page where my snippet is inserted. Whether it is possible to carry out somehow automatically changes on all pages where my snippet is inserted? Whether that is in Sublime Text the plugins which are carrying out functions of the generator of the static sites? Thanks.

0 Likes

#2

You would be using a regular expression replacement over multiple files to carry out the changes. Sublime Text has this functionality in “Find > Find in Files…” and can easily match multiple lines via the \n escape sequence or by inserting a literal newline via shift+enter.

1 Like