diff options
author | Sebastian Pech <sp@valuedesk.de> | 2019-09-19 11:47:41 +0300 |
---|---|---|
committer | Sebastian Pech <sp@valuedesk.de> | 2019-09-19 11:47:41 +0300 |
commit | ba6f29b8848f5467e41220d25492255a637003ab (patch) | |
tree | 2d572ca92f9ddf67607413ff377ca2cacd580a23 | |
parent | 848d8dab19585085199d9705e65ab868313d9d7b (diff) |
Added Bing/DuckDuckGo search box.
-rw-r--r-- | README.md | 31 | ||||
-rw-r--r-- | exampleSite/config.toml | 6 | ||||
-rw-r--r-- | exampleSite/content/post/005-theme-info/cover-home-office-599475_1920.jpg | bin | 433444 -> 0 bytes | |||
-rw-r--r-- | exampleSite/content/post/005-theme-info/feature-laptop-2838918_1920.jpg | bin | 415824 -> 0 bytes | |||
-rw-r--r-- | exampleSite/content/post/005-theme-info/index.md | 61 | ||||
-rw-r--r-- | layouts/index.html | 12 |
6 files changed, 17 insertions, 93 deletions
@@ -22,6 +22,8 @@ Most settings should be done with hugo specific variables. There are only a few * `welcomeText = "Startpage!"` is the text above the search box * `showGoogleSearch = true` to switch Google search box on/off +* `showBingSearch = true` to switch Bing search box on/off +* `showDuckDuckGoSearch = true` to switch DuckDuckGo search box on/off * `startPageColumns = true` will show the start page in grouped lists ![startPageColumns = false](https://raw.githubusercontent.com/spech66/bootstrap-bp-hugo-startpage/master/images/screenshot.png) @@ -49,35 +51,6 @@ Define the links in a file in `data/links.yml`. This needs to be structured like Icons are taken from [Font Awesome](https://fontawesome.com/icons?d=gallery). -## Google Analytics - -This theme uses the internal asynchronous template for Google Analytics tracking. You only have to provide your tracking id in your configuration file: - -```yaml -googleAnalytics = "UA-123-45" -``` - -## Schema.org support - -Provide one author to enable the Schema.org support. - -```yaml -[Author] - name = "Sebastian Pech" -``` - -## Images, Open Graph and Twitter Cards - -This theme uses Hugos `feature/cover` name method to set the optimized feature image. This will also be in the Twitter Cards and Open Graph block. - -```yaml -# Site Config toml -title = "My hugo site" - -[params] - description = "Text about the site" -``` - ## Sources * Background image by [Mikael Gustafsson](https://www.artstation.com/artwork/Y2Wew) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 405af2c..108b946 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,7 +1,7 @@ baseURL = "https://example.com/" languageCode = "en-US" title = "My New Hugo Site" -theme = "bootstrap-bp-hugo-theme" +theme = "bootstrap-bp-hugo-startpage" # googleAnalytics = "UA-123-45" copyright = "Sebastian Pech" enableRobotsTXT = true @@ -27,4 +27,6 @@ paginate = 5 #images = ["logo.jpg"] startPageColumns = true welcomeText = "Bootstrap-BP hugo startpage" - showGoogleSearch = true
\ No newline at end of file + showGoogleSearch = false + showBingSearch = false + showDuckDuckGoSearch = true diff --git a/exampleSite/content/post/005-theme-info/cover-home-office-599475_1920.jpg b/exampleSite/content/post/005-theme-info/cover-home-office-599475_1920.jpg Binary files differdeleted file mode 100644 index 4dff1c5..0000000 --- a/exampleSite/content/post/005-theme-info/cover-home-office-599475_1920.jpg +++ /dev/null diff --git a/exampleSite/content/post/005-theme-info/feature-laptop-2838918_1920.jpg b/exampleSite/content/post/005-theme-info/feature-laptop-2838918_1920.jpg Binary files differdeleted file mode 100644 index 5fa89d9..0000000 --- a/exampleSite/content/post/005-theme-info/feature-laptop-2838918_1920.jpg +++ /dev/null diff --git a/exampleSite/content/post/005-theme-info/index.md b/exampleSite/content/post/005-theme-info/index.md deleted file mode 100644 index 3dbd182..0000000 --- a/exampleSite/content/post/005-theme-info/index.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "Theme Info" -type: post -date: 2018-10-28T08:59:27+01:00 -publishdate: 2018-10-28 -lastmod: 2018-10-28 -description: "Information about the theme" -tags: - - Code - - Lorem ipsum - - Test - - Table - - Quote -categories: - - Theme ---- - -## Headline 2 - -The header image is automatically added if there is a file called `*feature*` or `*cover*`. The first wildcard is prefered over the second one. If there are multiple images the first one is used. - -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. - -### Headline 3 - -#### Headline 4 - -##### Headline 5 - -###### Headline 6 - -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, **sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat**, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. _Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet_. - -> _"Be yourself; everyone else is already taken."_ ― Oscar Wilde - -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. - -```js -var config = { - [...] - language: "de", - timeFormat: 24, - units: "metric", - [...] -} -``` - -{{< optfigure src="cover-home-office-599475_1920" class="figure" title="Home office" caption="This is the home office caption. The image is resized automatically using `optfigure` shortcode." >}} - -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. - -| Test | More test | -|:-----|-----------| -| 12 | 21 | -| AB | BA | - -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. - - - -**Images from pixabay:** [laptop-2838918](https://pixabay.com/de/laptop-businessmann-von-oben-2838918/), [home-office-599475](https://pixabay.com/de/home-office-laptop-notebook-startup-599475/)
\ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index c567954..02df301 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -3,10 +3,20 @@ <h1 class="welcomeText">{{ .Site.Params.welcomeText }}</h1> {{ if .Site.Params.showGoogleSearch }} -<form id="search-form" action="https://www.google.com/search" method="get"> +<form id="search-form-g" action="https://www.google.com/search" method="get"> <input id="search-bar" class="form-control" type="text" autofocus type="text" placeholder="Search Google" name="q" alt="Search Google" onkeydown="if(event.keyCode === 13) { this.form.submit(); return false; }"> </form> {{ end }} +{{ if .Site.Params.showBingSearch }} +<form id="search-form-b" action="https://www.bing.com/search" method="get"> + <input id="search-bar" class="form-control" type="text" autofocus type="text" placeholder="Search Bing" name="q" alt="Search Bing" onkeydown="if(event.keyCode === 13) { this.form.submit(); return false; }"> +</form> +{{ end }} +{{ if .Site.Params.showDuckDuckGoSearch }} +<form id="search-form-ddg" action="https://duckduckgo.com/" method="get"> + <input id="search-bar" class="form-control" type="text" autofocus type="text" placeholder="Search DuckDuckGo" name="q" alt="Search DuckDuckGo" onkeydown="if(event.keyCode === 13) { this.form.submit(); return false; }"> +</form> +{{ end }} {{ if .Site.Params.startPageColumns }} <div id="groupList" class="card-deck mt-3"> |