S
S
Serjon2018-09-23 21:32:34
CMS
Serjon, 2018-09-23 21:32:34

Is there such a CMS for a static html site?

There are static sites in html. Is there a CMS that can simply be uploaded to the root of the site, or does it convert the site into the format it needs and allows you to install traffic counters on all pages of the site and insert adsense ad units in the text according to the specified parameters. For example, after the title, after the first picture, etc.?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Antonio Solo, 2018-09-23
@solotony

perhaps SSI (in particular the directive <--#include -->) will help you

M
Maxim Tolkachev, 2018-10-04
@Th0r_N13

There is http://textolite.ru, you can edit static files

N
Nikolai Chuprik, 2018-09-23
@choupa

Make a routing in .htaccess to your insert_ad.php script, to which you pass the name of the requested html file as a parameter:
The script reads the file, inserts what is needed where it is needed, and voila - gives the client an output with advertising.

if ( $file == '' ) $file = 'index.html';
$input = file_get_contents( $file );
$insert_this = '<div id=ad>...</div>';   // Например вставляем это
$marker_before = '</body>';  //  перед вот этим
$position = strrpos( $input, $marker_before ); 
echo substr( $input, 0, $position ).$insert_this.substr( $input, $position );

Of course, the site has become dynamic instead of static, with all the ensuing disadvantages. Therefore, if ads are not inserted dynamically (the same for everyone) or these are static counters, then it is better, as I wrote in the comment, to shovel all the files with a script, making inserts, and save them statically. You can shovel once a day, and once a 10 minutes, probably.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question