Pelisgo has no configuration file,Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LuisED18/proyecto-pagina-peliculas/llms.txt
Use this file to discover all available pages before exploring further.
.env file, or build-time environment variables. All settings are defined as plain JavaScript constants at the top of js/main.js. To change any setting, open that file, edit the relevant constant, and save.
Configuration Constants
Your TMDB v3 API key. Every request to the TMDB API is authenticated with this value, appended as
?api_key=YOUR_KEY on each URL. Get a free key at themoviedb.org/settings/api.The TMDB API base URL. All endpoint paths are appended to this value at runtime. Do not change this unless TMDB publishes a new API version (e.g. a future
/4 endpoint).CDN base URL for poster images. The
poster_path string returned by TMDB (e.g. /abc123.jpg) is appended directly to this value. Change the w500 segment to a different size variant to control the resolution and file size of poster images.Language / Locale
The TMDB API returns localised metadata (titles, overviews, dates) based on alanguage query parameter. In Pelisgo, the locale is embedded directly in the endpoint strings inside obtenerContenido():
es-ES with any BCP 47 locale code that TMDB supports. Common options:
| Locale code | Language / Region |
|---|---|
es-ES | Spanish (Spain) — Pelisgo default |
en-US | English (United States) |
fr-FR | French (France) |
pt-BR | Portuguese (Brazil) |
de-DE | German (Germany) |
language parameter affects both the popular-content endpoints (/movie/popular, /tv/popular) and the search endpoints (/search/movie, /search/tv). You must update both if branches inside obtenerContenido() to change the locale consistently.
Image Size Variants
Thew500 segment at the end of IMAGE_BASE_URL is a TMDB image size variant. TMDB serves poster images at several fixed widths through the same CDN path — only the size token changes:
| Variant | Approximate width | Best for |
|---|---|---|
w92 | 92 px | Thumbnails, mobile lists |
w154 | 154 px | Compact grids |
w185 | 185 px | Small cards |
w342 | 342 px | Medium cards |
w500 | 500 px | Pelisgo default — balanced quality and load time |
w780 | 780 px | Large feature cards, retina displays |
original | Full source resolution | Maximum quality, largest file size |
w92–w185) load faster and consume less bandwidth but appear blurry if rendered at a larger CSS size. Larger variants (w780, original) are crisp on high-DPI screens but significantly increase page weight, especially with grids of 20+ posters. w500 is the recommended default for a typical movie-browser grid.
To change the size, update the constant in js/main.js:
Page Detection Variable
Pelisgo serves movies onindex.html and TV series on series.html using a single shared main.js file. The correct content type is determined automatically at runtime by inspecting the page URL:
- If the current page URL contains the string
"series"(e.g.series.html),esPaginaSeriesistrueandtipois set to'tv'. - On any other page (e.g.
index.html),esPaginaSeriesisfalseandtipois set to'movie'.
tipo variable is then used throughout obtenerContenido() and mostrarCards() to pick the right endpoint (/movie/popular vs /tv/popular), the right response field (title vs name), and the right date field (release_date vs first_air_date).
This is auto-detected — you do not need to configure it manually. As long as your series page filename contains the word series, the detection works without any code changes.