use LoveIt theme, self hosted

This commit is contained in:
Christoph Cullmann 2021-02-18 21:44:01 +01:00
parent bcafaafff8
commit e9ec93a471
1973 changed files with 54578 additions and 15688 deletions

View file

@ -0,0 +1,8 @@
import { Segment, useDefault } from 'segmentit';
const segmentit = useDefault(new Segment());
lunr.segmentit = segmentit;
lunr.queryHandler = query => {
if (/^[\u4e00-\u9fa5]+$/.test(query)) query = lunr.segmentit.doSegment(query).map(seg => '+' + seg.w).join(' ');
return query;
};