Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Pablo-app-developer/ThinkPython
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3
Choose a base ref
...
head repository: midudev/ThinkPython
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 12 commits
  • 22 files changed
  • 2 contributors

Commits on May 20, 2026

  1. feat: update README, add deployment instructions, and configure Wrangler

    - Updated README to include links to the public book page and the GitHub repository.
    - Added deployment instructions for Cloudflare Workers, detailing the build and deployment process.
    - Introduced `wrangler.toml` for managing static assets deployment.
    - Enhanced the build script to copy static site files to the `dist/` directory.
    - Updated the full book PDF extension to point site-level links to the public site.
    midudev committed May 20, 2026
    Configuration menu
    Copy the full SHA
    e2dcbcc View commit details
    Browse the repository at this point in the history
  2. chore: update .gitignore to include Wrangler cache file

    - Added `jb/.wrangler/cache/wrangler-account.json` to .gitignore to prevent versioning of Wrangler's cache files.
    midudev committed May 20, 2026
    Configuration menu
    Copy the full SHA
    6a76e3c View commit details
    Browse the repository at this point in the history
  3. Balance logo title wrapping

    Co-authored-by: Copilot <[email protected]>
    midudev and Copilot authored May 20, 2026
    Configuration menu
    Copy the full SHA
    1e186ce View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5a7359f View commit details
    Browse the repository at this point in the history
  5. Configure Wrangler observability (midudev#4)

    Co-authored-by: Copilot <[email protected]>
    midudev and Copilot authored May 20, 2026
    Configuration menu
    Copy the full SHA
    316cd75 View commit details
    Browse the repository at this point in the history
  6. Update Spanish book cover (midudev#5)

    Co-authored-by: Copilot <[email protected]>
    midudev and Copilot authored May 20, 2026
    Configuration menu
    Copy the full SHA
    7d85bae View commit details
    Browse the repository at this point in the history
  7. chore: ignorar imagen fuente de portada en extra_html

    Añade `jb/extra_html/cover-source.jpg` al .gitignore: es la imagen
    original sin optimizar usada para derivar la portada y la OG image,
    y no necesita versionarse junto al resto de assets ya optimizados.
    midudev committed May 20, 2026
    Configuration menu
    Copy the full SHA
    5edec74 View commit details
    Browse the repository at this point in the history
  8. feat(jb): añadir favicons, OG image y manifest en extra_html

    Incluye los assets estáticos servidos en la raíz del sitio publicado:
    
    - `favicon.ico`, `favicon.svg`, `favicon-16.png`, `favicon-32.png`,
      `favicon-32x32.png`: iconos de pestaña para distintos navegadores.
    - `apple-touch-icon.png` e `icon-512.png`: iconos para iOS y PWA.
    - `og-image.jpg`: imagen 1200x630 usada en metaetiquetas Open Graph
      y Twitter Card al compartir el libro en redes.
    - `site.webmanifest`: manifiesto web con nombre, iconos y colores.
    
    Estos archivos se copian tal cual al sitio gracias a `html_extra_path`
    en el config de Jupyter Book.
    midudev committed May 20, 2026
    Configuration menu
    Copy the full SHA
    c02129d View commit details
    Browse the repository at this point in the history
  9. feat(jb): añadir extensión SEO con Open Graph, Twitter Card y JSON-LD

    - Nueva extensión Sphinx `_extensions/seo.py` que inyecta en cada
      página un contexto `seo` con título, descripción, URL canónica,
      imagen, autor, traductor y locale. La home recibe un título sin
      sufijo y se mapea a la raíz del dominio.
    - Nuevo template `_templates/layout.html` que extiende el layout del
      tema y, usando ese contexto, añade en `<head>`:
      - `<title>` y `<meta name="description">`.
      - Etiquetas Open Graph (`og:title`, `og:description`, `og:image`,
        `og:url`, dimensiones e idioma) y Twitter Card
        (`summary_large_image`).
      - Enlaces a favicons (`.ico`, `.svg`, PNG), `apple-touch-icon` y
        `site.webmanifest`.
      - JSON-LD de tipo `Book` con autor, traductor, idioma, licencia y
        `isAccessibleForFree`, mejorando la indexación en buscadores.
    midudev committed May 20, 2026
    Configuration menu
    Copy the full SHA
    dce414c View commit details
    Browse the repository at this point in the history
  10. feat(jb): renombrar a "Think Python en español" y activar SEO/favicon

    - Cambia el título del libro a "Think Python en español" en
      `_config.yml` e `index.md` (eliminando el sufijo "edición en
      español") para un branding más claro y mejor SEO.
    - Añade en `_config.yml`:
      - `html.favicon: extra_html/favicon.ico`.
      - Registro de la extensión local `seo` (`_extensions/seo.py`).
      - `language: es`, `html_title`, `html_short_title` y
        `html_extra_path: [extra_html]` para que Sphinx use el idioma
        correcto y publique los assets estáticos.
    - Añade frontmatter (`title`, `description`) a `index.md` para que
      la home aparezca con metadatos optimizados en buscadores.
    midudev committed May 20, 2026
    Configuration menu
    Copy the full SHA
    da59313 View commit details
    Browse the repository at this point in the history
  11. fix(jb): sanear titles en metaetiquetas SEO para evitar HTML colado

    El `title` que Sphinx pasa al contexto de cada capítulo incluye HTML
    (p. ej. `<span class="section-number">6. </span>Valores de retorno`).
    Al inyectarlo dentro de `<meta property="og:title" content="...">`,
    las comillas internas del `class="…"` rompían el atributo y el resto
    del título quedaba como texto suelto visible en la cabecera del sitio
    desplegado.
    
    Cambios:
    
    - `_extensions/seo.py`: nueva utilidad `_strip_html` que elimina las
      etiquetas y decodifica entidades antes de construir `page_title`,
      para que los hijos del contexto no contengan markup.
    - `_templates/layout.html`:
      - Aplica `|striptags|e` a `seo.page_title` y `seo.description` en
        `<title>` y en todas las meta de Open Graph y Twitter Card como
        defensa frente a regresiones.
      - Escapa el resto de valores con `|e`.
      - Reescribe el bloque JSON-LD usando `|tojson`, que es la forma
        correcta de serializar strings dentro de `application/ld+json`
        (evita romper el JSON con comillas o caracteres especiales).
    midudev committed May 20, 2026
    Configuration menu
    Copy the full SHA
    c851c6d View commit details
    Browse the repository at this point in the history
  12. fix(jb): ocultar también la celda de imports cuando va en su propia c…

    …elda
    
    `prep_notebooks.py` añadía `remove-cell` solo cuando una misma celda
    incluía a la vez `def download(url):` y `import thinkpython`. En
    chap04 esos dos bloques están repartidos en dos celdas consecutivas,
    por lo que ninguna de las dos cumplía la condición AND y el HTML
    desplegado mostraba el código de descarga y de configuración de
    autoreload al principio del capítulo.
    
    Ahora se detectan dos patrones independientes:
    
    - Celdas con `def download(url):` (setup de descarga).
    - Celdas con `import thinkpython` y `%autoreload` (setup de
      autoreload).
    
    Cualquier celda que coincida con alguno de los dos recibe los tags
    `remove-cell` y `keep`, así que se ocultan tanto cuando van juntas
    (resto de capítulos) como cuando van separadas (chap04). Verificado
    reconstruyendo el HTML: ya no aparecen los bloques en chap04 y el
    resto de capítulos siguen igual.
    midudev committed May 20, 2026
    Configuration menu
    Copy the full SHA
    a4ab297 View commit details
    Browse the repository at this point in the history
Loading