* add npm dependencies used in this theme * implement helper to configure JS and ESBuild * migrate jquery popper.js bootstrap fontawesome to js bundle * refactor main.js into smaller pieces, and moved navbar.js to assets * remove list.js. It adjusts post card height to be the same, but is actually not needed. * refactored notes.js, search.js, single.js into application.js * move ityped to js asset, implement experiences horizontal vertical line in css * align recent post height via css * migrated home.js and refactored into various sections * migrated darkMode feature to js bundle * moved mermaid feature to js bundle * migrate syntax highlight to js bundle * migrate katex ( js portion ) to js bundle * migrate pdf-js to js bundle by delegating to cdn * set explicit comparisions for feature envvars so js can properly optimize * removed goat-counter * more fixes for broken achievements and small bugs * more bug fixes * allow configuration of hightlight.js, fix video-player shortcode * remove jquery all together * add null handling and fix merge conflicts Co-authored-by: Aaron Qian <aaron@yeet.io>
54 lines
1.3 KiB
Markdown
54 lines
1.3 KiB
Markdown
---
|
|
title: "Resultados de Búsqueda"
|
|
date: 2010-06-08T08:06:25+06:00
|
|
weight: 999999
|
|
sitemap:
|
|
priority : 0.1
|
|
layout: "search"
|
|
url: search
|
|
---
|
|
|
|
|
|
Este archivo existe únicamente para responder a la URL /search con la plantilla de diseño `search` relacionada.
|
|
|
|
No se muestra ningún contenido aquí, todo el contenido se basa en la plantilla layouts/page/search.html
|
|
|
|
Establecer una prioridad muy baja en el mapa del sitio le dirá a los motores de búsqueda que éste no es un contenido importante.
|
|
|
|
Esta implementación utiliza Fusejs, jquery y mark.js
|
|
|
|
|
|
## Configuración inicial
|
|
|
|
La búsqueda depende del tipo de contenido de salida adicional de JSON en config.toml
|
|
|
|
\```
|
|
[outputs]
|
|
home = ["HTML", "JSON"]
|
|
\```
|
|
|
|
## Búsqueda de archivos adicionales
|
|
|
|
Para buscar campos adicionales definidos en el front matter, debes añadirlo en 2 lugares.
|
|
|
|
### Editar layouts/_default/index.JSON
|
|
Esto expone los valores en /index.json: por ejemplo, para agregar `categories`
|
|
\```
|
|
...
|
|
"contents":{{ .Content | plainify | jsonify }}
|
|
{{ if .Params.tags }},
|
|
"tags":{{ .Params.tags | jsonify }}{{end}},
|
|
"categories" : {{ .Params.categories | jsonify }},
|
|
...
|
|
\```
|
|
|
|
### Editar las opciones de fuse.js para buscar
|
|
`assets/scripts/pages/search.js`
|
|
\```
|
|
keys: [
|
|
"title",
|
|
"contents",
|
|
"tags",
|
|
"categories"
|
|
]
|
|
\```
|