4
edits
m (Fix title for indexing custom content) |
(Remove bold from "Index Custom Content" title) |
||
Line 134: | Line 134: | ||
</syntaxhighlight>If you are using a special image component like <code><v-img></code> from a UI library like [https://vuetifyjs.com/en/ Vuetify], refer to this [https://github.com/openzim/youtube/blob/853b9245aa5af552110be205b94c6c0e804bf865/zimui/src/plugins/webp-hero.ts helper function] and it [https://github.com/openzim/youtube/blob/853b9245aa5af552110be205b94c6c0e804bf865/zimui/src/components/video/VideoCard.vue#L37-L42 usage] in the YouTube scraper. | </syntaxhighlight>If you are using a special image component like <code><v-img></code> from a UI library like [https://vuetifyjs.com/en/ Vuetify], refer to this [https://github.com/openzim/youtube/blob/853b9245aa5af552110be205b94c6c0e804bf865/zimui/src/plugins/webp-hero.ts helper function] and it [https://github.com/openzim/youtube/blob/853b9245aa5af552110be205b94c6c0e804bf865/zimui/src/components/video/VideoCard.vue#L37-L42 usage] in the YouTube scraper. | ||
==== | ==== Indexing Custom Content for Suggestions/Search ==== | ||
Since we are not using HTML templates with the Vue.js UI, the content stored in ZIM files will no longer be automatically indexed. To manually index special content refer to code below:<syntaxhighlight lang="python3"> | Since we are not using HTML templates with the Vue.js UI, the content stored in ZIM files will no longer be automatically indexed. To manually index special content refer to code below:<syntaxhighlight lang="python3"> | ||
from libzim.writer import IndexData | from libzim.writer import IndexData |
edits