Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r12f/hexo-tag-search-link
A hexo tag plugin for creating search links with specified search engine and content.
https://github.com/r12f/hexo-tag-search-link
Last synced: 7 days ago
JSON representation
A hexo tag plugin for creating search links with specified search engine and content.
- Host: GitHub
- URL: https://github.com/r12f/hexo-tag-search-link
- Owner: r12f
- License: bsd-3-clause
- Created: 2017-02-02T08:04:44.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-05T23:42:31.000Z (almost 8 years ago)
- Last Synced: 2024-08-09T15:53:02.407Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hexo-tag-search-link
[![npm version](https://badge.fury.io/js/hexo-tag-search-link.svg)](http://badge.fury.io/js/hexo-tag-search-link)
A hexo tag plugin for creating search links with specified search engine and content.
## Installation
``` bash
$ npm install hexo-tag-search-link --save
```## Usage
To search the content, we can use search tag, which uses the default search engine, and search_with tag, which uses the specified search engine. Here are some examples:
With default search engine:
```
{% search "Hello World" %}
```With specified search engine:
```
{% search_with google "Hello World" %}
{% search_with bing "Hello World" %}
{% search_with baidu "Hello World" %}
{% search_with yahoo "Hello World" %}
{% search_with wiki "Hello World" %}
{% search_with wiki "你好,世界" zh %}
{% search_with msdn "Hello World" %}
{% search_with github "Hello World" %}
{% search_with github_code generateSearchLink r12f/hexo-tag-search-link %}
```We can also specify what to show with search_alt and search_alt_with tags. The tag works almost exactly the same. The only difference is that they have an end tag. Here are 2 examples:
With alternated things to show:
```
{% search_alt "Hello World (maybe not)" %}Hello World{% endsearch_alt %}
```With specified search engine and alternated things to show:
```
{% search_alt_with google "Hello World (maybe not)" %}Hello World{% endsearch_alt_with %}
```Config:
```
# Search link
search_link:
default_engine: google
```## License
BSD v3