Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Algolia Search Support && Gallery Mode #329

Merged
merged 428 commits into from
May 23, 2021
Merged

Algolia Search Support && Gallery Mode #329

merged 428 commits into from
May 23, 2021

Conversation

rxrw
Copy link
Contributor

@rxrw rxrw commented Apr 25, 2021

之前两个pr 因为不小心合在了一起所以只好一起提一下了

Algolia Search

原有的 lunrjs 利用本地json进行索引,但是由于不支持中文,不是很友好。因此又接了用得比较广泛的 algolia 索引,调用它的 instant-search.js 来实现,其免费额度对于大部分人应该够用了。

Gallery Mode

As said before, 这个模式是支持博客文章图片以图库模式展示的,使用第三方插件 来实现的。点击图片后,全屏以轮播图形式展示内容

reuixiy and others added 30 commits January 22, 2020 22:58
Previously, I added this feature so that you can insert videos just like
inserting images in Markdown. Now, I think this function is useless.
this commit also let image hosting support `Param.images`.
* Add:Article sharing function

* Add:Article sharing function-style revise(样式调整)

* Mod:remove: share on google,add: share on telegram

* mod:add config.toml-ShareTelegram

* fix:telegram icon class

* style: delete some spaces, rename some params ...

adjust some positions, fix some typos

* refactor: use flexbox layout

* feat: support `share` in Front Matter

* i18n

* refactor: post-share.html

* feat: support douban, qzone

* feat: add brand color

* feat: support qrcode

Co-authored-by: reuixiy <[email protected]>
this commit also let CSS of `shareViaQRCode` load on demand.
```
sudo pacman -S python-fonttools
sudo npm install -g fontmin ttf2woff2

pyftsubset glyph-correction.ttf --text="…—•·"
mv glyph-correction.subset.ttf glyph-correction.ttf
fontmin glyph-correction.ttf
cd build
rm glyph-correction.css glyph-correction.svg
cat glyph-correction.ttf | ttf2woff2 >> glyph-correction.woff2
```

https://github.com/fonttools/fonttools
https://github.com/ecomfe/fontmin
https://github.com/nfroidure/ttf2woff2
CoelacanthusHex and others added 24 commits March 10, 2021 22:43
We must add -webkit-backdrop-filter into this condition, otherwise
our backdrop style won't be visible on iOS, because webkit doesn't
support backdrop-filter without the -webkit prefix, which makes
this old condition true, then background-color is appended, then
backdrop-filter becomes invisible.
To configure the Yandex.Metrika counter, please specify `yandexMetrikaId` parameter with you y.metrika Id in your config.toml.
This commit also made some code position adjustments for last commit.
@reuixiy
Copy link
Owner

reuixiy commented May 23, 2021

稍微看了一下,修改如下

  1. 调整了配置示例 config.toml,删除多余,调整位置,重命名 algolia* 的 3 个变量名以保持与 algolia-search.js 中的一致
  2. config.toml 中,为保证简单兼容已有的 enableLunrSearch,暂时没有采用新的 enableSearch,使用了独立的 enableAlgoliaSearchenableSearch 或许可以等以后支持 Fuse.js 搜索时再重构
  3. config.toml 中,默认关闭 Algolia 搜索,中文环境默认关闭 Lunr 搜索
  4. 调整了一些代码的缩进
  5. Gallery Mode 的修改暂时抛弃了,看了下改动也不大,一个新文件和两个文件的小修改,可待本 PR merged 后,使用新 master 代码修改再 commit 提一个新的 PR

@reuixiy reuixiy merged commit 2dc1f8b into reuixiy:master May 23, 2021
ulmefors pushed a commit to ulmefors/hugo-theme-meme that referenced this pull request Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.