Replies: 3 comments 2 replies
-
The You'll want to add that Handlebars code in a .hbs file as indicated in the docs you linked to (search.hbs, etc). You could also try creating a new post template in your site folder (using a text editor) with the search results handlebars code, then create a post/page using that template in the Publii GUI. |
Beta Was this translation helpful? Give feedback.
-
"search.hbs - A dedicated search results page template. This template is necessary for themes that intend to offer enhanced search capabilities or integrate with specific search plugins, such as a Google Search plugin. " Try a google search: "publii" "search.hbs" |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your answers, and I hope you will forgive me if I ask questions that seem obvious but I am new to Publii.
This file already contains customSearchContent but does not contain customSearchInput. Should I add it somewhere? Then how can I make it visible on a page I call Search on Publii? |
Beta Was this translation helpful? Give feedback.
-
Hi, first of all let me congratulate you on this tool which is great. However, I have a problem and I am sure I am missing something.
I am trying to create a search page on the site I am creating using it as a mono theme and I have tried two ways:
By directly pasting the script code in html mode into the editod from google cse.
But sfotunately, although this solution functionally works, in the sense that it returns the search parameters, it appears to me graphically completely different from what I expected. In fact, it appears to me like this:
When I from an empty html page without css, I see it correctly like this:
So I tried a different approach and tried the Google Custom Search Plugin addon taking the guide in the link as a reference:
https://getpublii.com/docs/google-custom-search.html
Again, even though I have changed the parameters in the config.json of the theme as indicated and even though I have entered the code snippets, in the html section of the page editor, it looks like this:
And as if the program ignores that these are snippets. Surely I'm doing something wrong, missed something or didn't understand the guide properly. I am putting the snippets in the html section of the editor after obviously following all the points in the guide.
Would anyone feel like telling me where I am going wrong? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions