Page 1 of 1
meta tags in index.html
Posted: Fri Jun 28, 2024 8:29 am
by menschmarkus
Hi @all,
just one question, how can I add meta tags like 'description', 'keywords', 'author' to the <head> area in automated generated index.html while compiling?
OK I mean automated during compiling, not manually after compiling
Possibly it can be added to compiler options.
Re: meta tags in index.html
Posted: Fri Jun 28, 2024 9:41 am
by hoerbie
Hi,
does something like
Code: Select all
! $('head').append('<here the html code>');
at the head of your SB code not work?
Re: meta tags in index.html
Posted: Fri Jun 28, 2024 11:41 am
by menschmarkus
hoerbie wrote: Fri Jun 28, 2024 9:41 am
Hi,
does something like
Code: Select all
! $('head').append('<here the html code>');
at the head of your SB code not work?
nope. Doesn't work
Code: Select all
Procedure main()
! $('head').append('<meta name="keywords" content="keywords here">')
! $('head').append('<meta name="description" content="description here">')
! $('head').append('<meta name="author" content="author info here">')
endprocedure
main()
if you look to index.html (or whatever the start html is named) does not show additional meta tags
Re: meta tags in index.html
Posted: Fri Jun 28, 2024 1:37 pm
by Peter
works here

Re: meta tags in index.html
Posted: Fri Jun 28, 2024 3:17 pm
by useful
Peter wrote: Fri Jun 28, 2024 1:37 pm
works here
Is this enough to index the site?
Re: meta tags in index.html
Posted: Fri Jun 28, 2024 4:10 pm
by Peter
Unfortunately, I don't know enough about meta data in an html page. I am also of the opinion that they should be present in the page from the beginning and not be inserted manually by JavaScript.
I have written a small SpiderBasic tool that allows you to manipulate the HTML file generated by SpiderBasic before it is displayed in the browser:
HtmlPreprocessor for SpiderBasic
This makes it possible to insert the meta data directly into the HTML page.
Re: meta tags in index.html
Posted: Mon Jul 01, 2024 5:29 pm
by menschmarkus
Peter wrote: Fri Jun 28, 2024 4:10 pm
Unfortunately, I don't know enough about meta data in an html page. I am also of the opinion that they should be present in the page from the
beginning and not be inserted manually by JavaScript.
I agree. As I know meta tags have to be natively in the starting html because the html header is checked by crawlers, not js scripts.
Peter wrote: Fri Jun 28, 2024 4:10 pmI have written a small SpiderBasic tool that allows you to manipulate the HTML file generated by SpiderBasic before it is displayed in the browser:
HtmlPreprocessor for SpiderBasic
This makes it possible to insert the meta data directly into the HTML page.
I will check it soon and report the result.
Thanks Peter