diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 4054c0598c91c57d9a81495b1ff7e20ee1e247b5..7390a7e99be83d39b922d3f4a05b4c4238bf368e 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,74 +1 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -nationality, personal appearance, race, religion, or sexual identity and -orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, or to ban temporarily or permanently any -contributor for other behaviors that they deem inappropriate, threatening, -offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at -https://gitter.im/squidfunk/mkdocs-material. The project team will review and -investigate all complaints, and will respond in a way that it deems appropriate -to the circumstances. The project team is obligated to maintain confidentiality -with regard to the reporter of an incident. Further details of specific -enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ +# LAGO Code of Conduct diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9bcb6bcef4ad5d6e00132d23fd149c2c2ba11c84..854139a319a943d95ca525c8be994c4dfe83e00e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,112 +1 @@ # Contributing - -Interested in contributing to the Material for MkDocs? Have a question? Want to -report a bug? Before you do, please read the following guidelines. - -## Submission context - -### Got a question or problem? - -For quick questions there's no need to open an issue as you can reach us on -[gitter.im]. - - [gitter.im]: https://gitter.im/squidfunk/mkdocs-material - -### Found a bug? - -If you found a bug in the source code, you can help us by submitting an issue -to the [issue tracker] in our GitHub repository. Even better, you can submit -a Pull Request with a fix. However, before doing so, please read the -[submission guidelines]. - - [issue tracker]: https://github.com/squidfunk/mkdocs-material/issues - [submission guidelines]: #submission-guidelines - -### Missing a feature? - -You can request a new feature by submitting an issue to our GitHub Repository. -If you would like to implement a new feature, please submit an issue with a -proposal for your work first to be sure that it is of use to everyone, as -Material for MkDocs is highly opinionated. Please consider what kind of change -it is: - -* For a **major feature**, first open an issue and outline your proposal so - that it can be discussed. This will also allow us to better coordinate our - efforts, prevent duplication of work, and help you to craft the change so - that it is successfully accepted into the project. - -* **Small features and bugs** can be crafted and directly submitted as a Pull - Request. However, there is no guarantee that your feature will make it into - the `master`, as it's always a matter of opinion whether if benefits the - overall functionality of the project. - -### Missing translations? - -Material for MkDocs supports 50+ languages with the help of community -contributions. When new features are added, sometimes, new translations are -necessary as well. It's impossible for the maintainers of the project to update -all translations (we just don't speak 50+ languages), so we have to rely on -our contributors to update translations incrementally. This process is pretty -simple, so if you find a translation missing in your language, follow these -guidelines: - -1. Fork the repository. - -2. Open up the [translation file for your language] as well as the - [English translations], as they are always up-to-date. Compare them - side-by-side and add the missing translations. __Important__: only add the - translations that are different from the defaults, e.g. if your language - is left-to-right, don't add the `direction` translation, as English is - left-to-right as well. The following translations are for technical - purposes and should not be updated, so if they're missing from your - language, it's for good reason: - - - `search.config.lang` - - `search.config.pipeline` - - `search.config.separator` - -3. Create a PR (see below) with your changes. - - [translation file for your language]: https://github.com/squidfunk/mkdocs-material/tree/master/src/partials/languages - [English translations]: https://github.com/squidfunk/mkdocs-material/tree/master/src/partials/languages/en.html - -## Submission guidelines - -### Submitting an issue - -Before you submit an issue, please search the issue tracker, maybe an issue for -your problem already exists, and the discussion might inform you of workarounds -readily available. - -We want to fix all the issues as soon as possible, but before fixing a bug, we -need to reproduce and confirm it. In order to reproduce bugs, we will -systematically ask you to provide a minimal reproduction scenario using the -custom issue template. Please stick to the issue template. - -Unfortunately, we are not able to investigate / fix bugs without a minimal -reproduction scenario, so if we don't hear back from you, we may close the issue. - -### Submitting a Pull Request (PR) - -Search GitHub for an open or closed PR that relates to your submission. You -don't want to duplicate effort. If you do not find a related issue or PR, -go ahead. - -1. **Development**: Fork the project, set up the [development environment], - make your changes in a separate git branch and add descriptive messages to - your commits. - -2. **Build**: Before submitting a pull request, [build the theme]. This is - a mandatory requirement for your PR to get accepted, as the theme should be - installable through GitHub at all times. - -3. **Pull Request**: After building the theme, commit the compiled output, - push your branch to GitHub and send a PR to `mkdocs-material:master`. If we - suggest changes, make the required updates, rebase your branch and push the - changes to your GitHub repository, which will automatically update your PR. - -After your PR is merged, you can safely delete your branch and pull the changes -from the main (upstream) repository. - - [development environment]: https://squidfunk.github.io/mkdocs-material/customization/#environment-setup - [build the theme]: https://squidfunk.github.io/mkdocs-material/customization/#building-the-theme diff --git a/LICENSE b/LICENSE index e40940735b710d253f6a2e47539ec67a03d13936..0f00e04ea7892716100e7f00d5f754ed79d23d75 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com> +Copyright (c) 2023 LAGO Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/docs/about/about.md b/docs/about/about.md new file mode 100644 index 0000000000000000000000000000000000000000..c6d94b1160ac59ebc990bbcb892534b9d278ee1a --- /dev/null +++ b/docs/about/about.md @@ -0,0 +1,17 @@ +# About LAGO + +The LAGO (Latin American Giant Observatory) project is an extended Astroparticle Observatory at global scale. It is mainly oriented to basic research on three branches of Astroparticle physics: the Extreme Universe, Space Weather phenomena, and Atmospheric Radiation at ground level. + +The LAGO detection network consists in single or small arrays of particle detectors at ground level, spanning over different sites located at significantly different latitudes (currently from Mexico up to the Antarctic region) and different altitudes (from sea level up to more than 5000 meters over sea level), covering a huge range of geomagnetic rigidity cut-offs and atmospheric absorption/reaction levels. + +The LAGO Project is operated by the LAGO Collaboration, a non-centralized and distributed collaborative network of more than 80 scientist from more than 25 institutions of 9 latinamerican countries (currently Argentina, Bolivia, Brazil, Colombia, Ecuador, Mexico, Peru and Venezuela. See the complete list of the collaboration members and their institutions). + +Finally, detectors installed in various universities are used as a tool to teach students about particle and astroparticle physics, in particular by leading them to the measurement of the muon decay. + +!!! info + + Technical information is available in the Lago wiki, our working tool (not foreseen for General Public, as it is currently under development and for now is very technical). + + A list of publications from the LAGO collaboration and its members is available, as well as some LAGO talks, where a lot of information can be found. + + Finally, an historical news page lists LAGO milestones as they have been reached. diff --git a/docs/about/collaboration.md b/docs/about/collaboration.md new file mode 100644 index 0000000000000000000000000000000000000000..854765bdc64a62ba113c698a73da8e6741e14a68 --- /dev/null +++ b/docs/about/collaboration.md @@ -0,0 +1,174 @@ +# The LAGO Collaboration + +??? note "Last Update: August - 2021" + + Previous list + +## Organization + +**Principal Investigator: Iván Sidelnik** + +Collaboration Secretary: Diego Cogollo + +**Country representatives** + +- Argentina: A.M. Gulisano +- Bolivia: M. Raljevic +- Brasil: A. Campos-Fauth +- Chile: A. Vega +- Colombia: L.A. Núñez +- Ecuador: M. Audelo +- Guatemala: H.E. Pérez-Figueroa +- Mexico: H. Salazar +- Peru: L. Otiniano +- Spain: R. Mayo-GarcÃa + +**Tasks Coordinators** + +- Anderson Campos Fauth: Physics +- Mauricio Suárez Durán : Simulation and Analyses Task Coordinator +- Dennis Cazar Ramirez: Detectors +- Horacio Arnaldi: Electronics +- R. Mayo-GarcÃa: Data + +--- + +## Collaboration members + +- Alberto Morillas, Angelines 3 [A. Alberto] +- Alvarez Ochoa, Cesar 13 [C. Alvarez-Ochoa] +- Arceo, R. 13 [R. Arceo] +- Areso, Omar 10 [O. Areso] +- Arnaldi, Luis Horacio 2 [L. H. Arnaldi] +- Asorey, Hernán 2 [H. Asorey] +- Audelo, M 7 [M. Audelo] +- Ballina Escobar, Maynor Giovanni 16 [M.G. Ballina-Escobar] +- Becerra Villamizar, Daniel Camilo 15 [D. C. Becerra-Villamizar] +- Bertou, Xavier 2 [X. Bertou] +- Caballero Mora, Karen Salome 13 [K.S. Caballero-Mora] +- Caiza, R 6 [R. Caiza] +- Calderón-Ardila, Rolando 11 [R. Calderón-Ardila] +- Campelo, Josafary 26 [Josafary Campelo] +- Campos Fauth, Anderson 25 [A. C. Fauth] +- Carramiñana Alonso, Alberto 12 [A. Carramiñana-Alonso] +- Carrasco, Esperanza 12 [E. Carrasco] +- Carrasco, Esperanza 12 [E. Carrasco] +- Carrera JarrÃn, E 24 [E. Carrera-JarrÃn] +- Castillo Delacroix, Lucas Ezequiel 9 [L. E. Castillo Delacroix] +- Castromonte, César 23 [C. Castromonte] +- Cazar, D 24 [D. Cazar] +- Cogollo, Diego 26 [D. Cogollo] +- Coloma Borja, D.A. 24 [D. Coloma-Borja] +- Conde Sanchez, Ruben 1 [R. Conde] +- Cotzomi Paleta, Jorge 1 [J. Cotzomi] +- Dall'ara, Dario 9 [D. Dallara] +- Dasso, Sergio 10, 5 [S. Dasso] +- de Aguiar, Renan 25 [R. Aguiar] +- de Albuquerque Silva, Alex 26 [A. Albuquerque] +- de Andrade Pacheco Reis, Jorge Henrique 25 [J.H.A.P.Reis] +- De León, H. 13 [H. De-León] +- De León Barrios, Riccardo 20 [R. deLeón-Barrios] +- DomÃnguez, D 6 [D. DomÃnguez] +- Durán, Jesús Andrés 21 [J.A. Durán] +- Echiburu, Mauricio 18 [M. Echiburu] +- Galindo Tellez, Aline 12 [A. Galindo-Tellez] +- González, Manuel 2 [M. González] +- Gómez Berisso, Mariano 2 [M. Gómez Berisso] +- Grisales Casadiegos, Jenniffer 20 [J. Grisales-Casadiegos] +- Gulisano, Adriana MarÃa 10, 29, 30 [A. M. Gulisano] +- Gutierrez, Christian 5 [C. Gutierrez] +- Helo, Juan Carlos 14 [J. Helo] +- Huanca, César 21 [C. Huanca] +- Ise, Juan Eduardo 9 [J. E. Ise] +- Kelly Matias do Nascimento, Gyovanna 26 [G. K. M. Nascimento] +- Leigui de Oliveira, Marcelo Augusto 27 [M. A. Leigui de Oliveira] +- Lock Miletto, Fernando 25 [F. L. Miletto] +- Luzio, Vitor Prestes 27 [V. P. Luzio] +- Machado, Franz 23 [F. Machado] +- Martinez, Alexander 20 [A. MartÃnez-Méndez] +- Martinez Bravo, Oscar Mario 1 [O. Martinez] +- Mayo-GarcÃa, Rafael 3 [R. Mayo-GarcÃa] +- Mijangos Fuentes, Luis Guillermo 19 [L.G. Mijangos] +- Miranda, Pedro 21 [P. Miranda] +- Molina, MarÃa Graciela 9 [M. G. Molina] +- Morales Argueta, Iván René 16 [I.R. Morales] +- Morales Olivares, O.G 13 [O.G Morales-Olivares] +- Moreno Barbosa, Eduardo 1 [E. Moreno-Barbosa] +- Muñoz, Pablo 14 [P. Muñoz] +- Nina, Carlos 21 [C. Nina] +- Núñez, Luis A. 20 [L.A. Núñez] +- Otiniano, Luis 4 [L. Otininano] +- Pagán Muñoz, Raúl 3 [R. Pagán-Muñoz] +- Parada Jaime, Karoll Michely 15 [K. M. Parada-Jaime] +- Parada Villamizar, Heidar Marcel 15 [H. M. Parada-Villamizar] +- Parra, Rodrigo 8 [R. Parra] +- Peña-RodrÃguez, Jesús 20 [J. Peña-RodrÃguez] +- Pereira, Matias 10 [M. Pereira] +- Perez Cuevas, Yorlan Arneth 15 [Y. A. Perez-Cuevas] +- Pérez Figueroa, Héctor Eduardo 16 [H. Perez] +- Pisco-Guabave, Jhonattan 20 [J. Pisco-Guabave] +- Ponce Lancho, Epifanio 1 [E. Ponce] +- Quispe, Richard 21 [R. Quispe] +- Raljevic, Mirko 21 [M. Raljevic] +- Ramelli, Maximilano 10 [M. Ramelli] +- Rivera, Hugo 21 [H. Rivera] +- Rubinstein, Lucas Tomás 10 [L. T. Rubinstein] +- Rubio-Montero, Antonio Juan 3 [A.J. Rubio-Montero] +- Sacahuà Reyes, José Rodrigo 16 [J.R. Sacahui] +- Salazar Ibarguen, Humberto 1 [H. Salazar] +- Salomón, Nicolás 9 [N. Salomón] +- Samanés, Jorge 4 [J. Samanes] +- Santos, Noelia Ayelén 5 [N.A. Santos] +- Sarmiento-Cano, Christian 11 [C. Sarmiento-Cano] +- Sidelnik, Iván 2 [I. Sidelnik] +- Suárez-Durán, Mauricio 15 [M. Suárez-Durán] +- Subieta, MartÃn 21 [M. Subieta] +- Stuani, Luiz Augusto 26 [L. Stuani] +- Taboada Núñez, Alvaro 11 [A. Taboada-Núñez] +- Terrazas, Juan Carlos 21 [J. Terrazas] +- Ticona, Rolando 21 [R. Ticona] +- Torres Peralta, Ticiano 9 [T. Torres Peralta] +- Urrutia de Gutierrez, Zaida del Rosario 19 [Z.R. Urrutia] +- Vásquez, N 6 [N. Vásquez] +- Vázquez-RamÃrez, Adriana 20 [A. Vázquez-RamÃrez] +- Vega, Juan 4 [J. Vega] +- Vega, Pedro 14 [P. Vega] +- Vega, Alfredo 17 [A. Vega] +- Vesga-Ramirez, Alejandra 11 [A. Vesga-Ramirez] +- Villaseñor Cendejas, Luis 22 [L. Villaseñor-Cendejas] +- Vitoreti, Douglas 28 [D. Vitoreti] +- Wiklich Sobrinho, Rafaela 27 [R. Wiklich Sobrinho] +- Zepeda, Arnulfo 13 [A. Zepeda] + +## Institutes + +- Benemérita Universidad Autónoma de Puebla [BUAP] +- Centro Atómico Bariloche (CNEA/CONICET/IB) [CAB] +- Centro de Investigaciones Energéticas, Medioambientales y Tecnológicas [CIEMAT] +- Comisión Nacional de Investigación y Desarrollo Aeroespacial [CONIDA] +- Departamento de Ciencias de la Atmósfera y los Océanos, Facultad de Ciencias Exactas y Naturales, Universidad de Buenos Aires. [DCAO] +- Escuela Politécnica Nacional [EPN] +- Escuela Superior Politécnica de Chimborazo [ESPOCH] +- European Soutern Observatory (ESO) [ESO] +- Facultad de Ciencias Exactas y TecnologÃa (FACET) – Universidad Nacional de Tucumán (UNT) [UNT] +- Instituto de AstronomÃa y FÃsica del Espacio, IAFE (UBA-CONICET) [IAFE] +- Instituto de TecnologÃas en Detección y AstropartÃculas (CNEA, CONICET,UNSAM) [ITeDA] +- Instituto Nacional de AstrofÃsica, Óptica y Electrónica [INAOE] +- Universidad Autónoma de Chiapas [UNACH] +- Universidad de La Serena [US] +- Universidad de Pamplona [UP] +- Universidad de San Carlos [USAC] +- Universidad de ValparaÃso [UV] +- Universidad de Viña del Mar [UVM] +- Universidad del Valle de Guatemala [UVG] +- Universidad Industrial de Santander [UIS] +- Universidad Mayor de San Andrés [UMSA] +- Universidad Michoacana de San Nicolás de Hidalgo [UNICH] +- Universidad Nacional de IngenierÃa [UNI] +- Universidad San Francisco de Quito [USFQ] +- Universidade Estadual de Campinas [IFGW] +- Universidade Federal de Campina Grande [UFCG] +- Universidade Federal do ABC [UFABC] +- Universidade Federal do Recôncavo da Bahia [UFRB] +- Instituto Antártico Argentino/DNA +- Departamento FÃsica, Facultad de Ciencias Exactas y Naturales, Universidad de Buenos Aires, Argentina diff --git a/docs/about/sites.md b/docs/about/sites.md new file mode 100644 index 0000000000000000000000000000000000000000..34f368c166d24a81316362981b33127175407e0c --- /dev/null +++ b/docs/about/sites.md @@ -0,0 +1,11 @@ +# LAGO sites + +The LAGO projects has detectors in many different sites: + +- Mount Chacaltaya (Bolivia) +- Sierra Negra (Mexico) +- Pico Espejo (Venezuela) +- Marcapomacocha (Peru) +- And low altitude detectors in Argentina, Colombia, Guatemala and Ecuador + +## Geographical Distribution and Altitudes of LAGO Water Cherenkov Detectors diff --git a/docs/activities/calendar.md b/docs/activities/calendar.md new file mode 100644 index 0000000000000000000000000000000000000000..25cab66793c932443eded3b90589e0c05c29ce6f --- /dev/null +++ b/docs/activities/calendar.md @@ -0,0 +1,3 @@ +# LAGO Calendar + +<iframe src="https://calendar.google.com/calendar/embed?height=600&wkst=2&bgcolor=%23ffffff&ctz=UTC&mode=WEEK&showTitle=0&showPrint=0&showCalendars=0&src=bzk2NjRjZGw5NGc0ZzluODhzYm1pYmczcTRAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&color=%237CB342" style="border:solid 1px #777" scrolling="no" width="800" height="600" frameborder="0"></iframe> diff --git a/docs/activities/detectors.md b/docs/activities/detectors.md new file mode 100644 index 0000000000000000000000000000000000000000..ab97440a1b744593861a86aea3ad6e92786fc084 --- /dev/null +++ b/docs/activities/detectors.md @@ -0,0 +1,39 @@ +# Detectors + +## Water Cherenkov Detectors + +### Cherenkov effect + +While the speed of light in vacuum (c) is a constant, this speed is reduced in material, to 0.75c in water, for example. This means that particles can go through a material at a speed larger than the speed of light in that material (but always smaller than c). + +When a particle goes through a medium at such a speed, it produces a cone of light just like a plane produces a supersonic bang upon crossing the speed of sound, or a boat (or a duck) produces a "V" behind him becauses it moves faster than the waves propagate. + +This light was discovered by a russian physicist named Cherenkov in 1934, and is the responsible for the typical blue glow of water in nuclear reactors. It is used frequently in particle detectors, as a high energy particle going through a water volume will produce this caracteristic light. + +### Photomultiplier tubes + +Photomultiplier tubes (PMTs) are extremely sensitive light detectors, usually in ultraviolet and blue. A glass vacuum tube houses a photocathode, several dynodes, and an anode. Incident photons strike the photocathode covering the glass and electrons are produced by the photoelectric effect. High voltage between each dynode provoque an avalanche of secondary electrons, literally multiplying the signal. Typical gains of 106 mean a million electrons are detected on the anode for a single photon hitting the glass. + +These detectors can therefore detect single photons, but would be destroyed if turned on in ambient light. They are usually used in light-tight environments, to detect minimum amounts of light. + +### Water Cherenkov tanks + +Water Cherenkov tanks are detectors based on the Cherenkov effect. A simple plastic (or metal, fiberglass...) tank is filled with water and closed, in order to be light-tight. Photomultipler tubes are installed inside the detector, looking at the water volume. When a particle crosses the water volume, it will emit light in a Cherenkov cone. The light is then uniformized in the water volume by diffusion on the walls of the tank (usually covered by a highly diffusive material), and finally collected on the photomultiplier tubes. + +#### WCD calibration + +WCD are easy to calibrate due to their particular signal response to different particles: + +- Electrons usually drop all their energy in the detector, giving a signal proportionnal to their energy +- Photons usually convert into an electron-positron pair within the water volume, and then the secondaries radiate all their energy. In the end, the signal is again proportionnal to the energy of the incoming particle +- Muons on the other hand go through the detector without loosing all their energy (expect in the rare muon decay cases). The signal is then proportionnal to the track lenght in the detector, and no longer to the particle energy + +Given the fact that energy distribution for electrons and photons fall off as power law, the signals from these particules in a WCD will also fall off as a power law. On the other hand, given the fact that the track length distribution for muons in a WCD is normally peaked at the height of the water volume (most muons are vertical), the signals of all muons will sum to give a kind of hump in a signal histogram. This hump is determined only by specific caracteristics of the detector (geometry, water purity...) and electronics (photomultiplier tube gain), and allows a precise calibration point. + +#### WCD response to GRB + +When a GRB occurs, a huge number of high energy photons reach the Earth's atmosphere. They impact the atmosphere and produce a cascade of particles. Out of all these cascades, some will be powerfull enough to provide a few particles at ground level. Of course, the higher in altitude one goes, the easier it will be for cascades to reach ground. + +Most of the secondary particules of these cascades are photons (about 90%). A good property of WCD is the fact they can detect photons through their conversion in the water volume. This makes WCD good GRB detectors. + +What one would expect is that WCD would see an increase in the photon flux when a GRB occurs. It is not easy to detect since there is a continuous high background of particles entering the WCD, but this is the challenge LAGO will try to overcome. diff --git a/docs/activities/teaching.md b/docs/activities/teaching.md new file mode 100644 index 0000000000000000000000000000000000000000..a010fbc209203f2ecf989d633f432dce21aaaf43 --- /dev/null +++ b/docs/activities/teaching.md @@ -0,0 +1,11 @@ +# Teaching Astroparticle Physics with LAGO + +A WCD is a low cost cosmic ray detector that can easily be built, and is therefore an excellent opportunity to initiate students to astroparticle and particle physics and detectors. + +The LAGO electronics allows the adquisition of all pulses produced by a detector at a rate of up to 30 000 pulses per second. This allows us to register the PMT trace for all events happening in the detector. + +The analysis of these events allow many different studies. One can observe the different signals produced by particles leaving all their energy in the WCD (electrons/positrons and gammas) and the ones going through the detector without stopping (muons), and use this difference to calibrate the WCD. + +Once the detector is calibrated, one of the most interesting studies that can be done with students is the observation of muon decays. By looking at time difference between pulses, one can search pulses happening in a short time window and look for the characteristic 2.2 microsecond life time of the muon. A simple explanation of this decay can be read here. + +Many other experiments are possible, and with 2 or 3 detectors one can also reproduce the original measurements of Pierre Auger in the 30's. diff --git a/docs/alternatives.md b/docs/alternatives.md deleted file mode 100644 index f3afe6dcbe2ffd66a24dd6b0285ceb141c930e9c..0000000000000000000000000000000000000000 --- a/docs/alternatives.md +++ /dev/null @@ -1,112 +0,0 @@ -# Alternatives - -There are tons of static site generators and themes out there and choosing the -right one for your tech stack is a tough decision. If you're unsure if Material -for MkDocs is the right solution for you, this section should help you evaluate -alternative solutions. - -## Docusaurus - -[Docusaurus] by Facebook is a very popular documentation generator and a good -choice if you or your company are already using [React] to build your site. -It will generate a [single page application] which is fundamentally different -from the site Material for MkDocs generates for you. - -__Advantages__ - -- Very powerful, customizable and extendable -- Provides many components that aid in technical writing -- Large and rich ecosystem, backed by Facebook - -__Challenges__ - -- High learning curve, JavaScript knowledge mandatory -- JavaScript ecosystem is very volatile, rather high maintenance -- More time needed to get up and running - -While [Docusaurus] is one of the best choices when it comes to documentation -sites that output a single page application, there are many more solutions, -including [Docz], [Gatsby], [Vuepress] and [Docsify] that approach -this problem similarily. - - [Docusaurus]: https://docusaurus.io/ - [React]: https://reactjs.org/ - [single page application]: https://en.wikipedia.org/wiki/Single-page_application - [Docz]: https://www.docz.site/ - [Gatsby]: https://www.gatsbyjs.com/ - [VuePress]: https://vuepress.vuejs.org/ - [Docsify]: https://docsify.js.org/ - -## Jekyll - -[Jekyll] is probably one of the most mature and widespread static site -generators and is written in [Ruby]. It is not specifically geared towards -technical project documentation and has many themes to choose from, which -can be challenging. - -__Advantages__ - -- Battle-tested, rich ecosystem, many themes to choose from -- Brings great capabilities for blogging (permalinks, tags, etc.) -- Generates a SEO-friendly site, similar to Material for MkDocs - -__Challenges__ - -- Not specifically geared towards technical project documentation -- Limited Markdown capabilities, not as advanced as Python Markdown -- More time needed to get up and running - - [Jekyll]: https://jekyllrb.com/ - [Ruby]: https://www.ruby-lang.org/de/ - -## Sphinx - -[Sphinx] is an alternative static site generator specifically geared towards -generating reference documentation, offering powerful capabilities that are -lacking in MkDocs. It uses [reStructured text], a format similar to Markdown, -which some users find harder to use. - -__Advantages__ - -- Very powerful, customizable and extendable -- Generates reference documentation from [Python docstrings] -- Large and rich ecosystem, used by many Python projects - -__Challenges__ - -- High learning curve, [reStructured text] syntax might be challenging -- Search is less powerful than the one provided by MkDocs -- More time needed to get up and running - -If you're considering using Sphinx because you need to generate reference -documentation, you should give [mkdocstrings] a try – an actively maintained -and popular framework building on top of MkDocs, implementing Sphinx-like -functionality. - - [Sphinx]: https://www.sphinx-doc.org/ - [reStructured text]: https://en.wikipedia.org/wiki/ReStructuredText - [Python docstrings]: https://www.python.org/dev/peps/pep-0257/ - [mkdocstrings]: https://github.com/mkdocstrings/mkdocstrings - -## GitBook - -[GitBook] offers a hosted documentation solution that generates a beautiful and -functional site from Markdown files in your GitHub repository. However, it was -once Open Source, but turned into a closed source solution some time ago. - -__Advantages__ - -- Hosted solution, minimal technical knowledge required -- Custom domains, authentication and other enterprise features -- Great collaboration features for teams - -__Challenges__ - -- Closed source, not free for proprietary projects -- Limited Markdown capabilities, not as advanced as Python Markdown -- Many Open Source projects moved away from GitBook - -Many users switched from [GitBook] to Material for MkDocs, as they want to keep -control and ownership of their documentation, favoring an Open Source solution. - - [GitBook]: https://www.gitbook.com/ diff --git a/docs/assets/favicon.png b/docs/assets/favicon.png index 89d127b149589b34f4a60672928e8677e230ab08..0fda6f72cf84885bf7ba75c4aedfecc556cc8dff 100644 Binary files a/docs/assets/favicon.png and b/docs/assets/favicon.png differ diff --git a/docs/assets/images/zelda-dark-world.png b/docs/assets/images/zelda-dark-world.png deleted file mode 100644 index 275f85876fa6b9f3594c3bf8ec374b2a5a7a7340..0000000000000000000000000000000000000000 Binary files a/docs/assets/images/zelda-dark-world.png and /dev/null differ diff --git a/docs/assets/images/zelda-light-world.png b/docs/assets/images/zelda-light-world.png deleted file mode 100644 index aaf9f71199016132a5a0081c4e01b462bdc1d3c8..0000000000000000000000000000000000000000 Binary files a/docs/assets/images/zelda-light-world.png and /dev/null differ diff --git a/docs/assets/logo.png b/docs/assets/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..a393c25151f357668da44f7338e19a1129a933f3 Binary files /dev/null and b/docs/assets/logo.png differ diff --git a/docs/assets/screenshots/annotations.png b/docs/assets/screenshots/annotations.png deleted file mode 100644 index a4422bc0877d379d9cf67daf1e4b6ca9aee9b56e..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/annotations.png and /dev/null differ diff --git a/docs/assets/screenshots/back-to-top.png b/docs/assets/screenshots/back-to-top.png deleted file mode 100644 index 6771badd4294011404e1e9f06030e3f0fe0743b2..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/back-to-top.png and /dev/null differ diff --git a/docs/assets/screenshots/consent.png b/docs/assets/screenshots/consent.png deleted file mode 100644 index 2ab700af23a2aa6ccfee8f3ab3d4ab541011b921..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/consent.png and /dev/null differ diff --git a/docs/assets/screenshots/content-tabs-link.png b/docs/assets/screenshots/content-tabs-link.png deleted file mode 100644 index c0edb59f713b5943d2362c954531720309313d8f..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/content-tabs-link.png and /dev/null differ diff --git a/docs/assets/screenshots/content-tabs.png b/docs/assets/screenshots/content-tabs.png deleted file mode 100644 index 1c68d5b264a2de3261ec2fc659ac634cada3d7e4..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/content-tabs.png and /dev/null differ diff --git a/docs/assets/screenshots/creating-your-site.png b/docs/assets/screenshots/creating-your-site.png deleted file mode 100644 index 0243b619279206dde1d13022e417b60ffe7357b1..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/creating-your-site.png and /dev/null differ diff --git a/docs/assets/screenshots/feedback-report.png b/docs/assets/screenshots/feedback-report.png deleted file mode 100644 index eb7e3be49866bfc5f7726074b8e9f27f82d00319..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/feedback-report.png and /dev/null differ diff --git a/docs/assets/screenshots/hide-navigation-toc.png b/docs/assets/screenshots/hide-navigation-toc.png deleted file mode 100644 index 12fd440f4b50619acce350a7afb04030e5088293..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/hide-navigation-toc.png and /dev/null differ diff --git a/docs/assets/screenshots/hide-navigation.png b/docs/assets/screenshots/hide-navigation.png deleted file mode 100644 index e6c8b346202ca39b99959b2d91dd7c32c7a5afbd..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/hide-navigation.png and /dev/null differ diff --git a/docs/assets/screenshots/hide-toc.png b/docs/assets/screenshots/hide-toc.png deleted file mode 100644 index ab94778640c17979b9f517439e61a703f76d514e..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/hide-toc.png and /dev/null differ diff --git a/docs/assets/screenshots/language-selection.png b/docs/assets/screenshots/language-selection.png deleted file mode 100644 index 964c67193ec41b14ce638c2ed82cc0c47a4eaaf2..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/language-selection.png and /dev/null differ diff --git a/docs/assets/screenshots/navigation-expand.png b/docs/assets/screenshots/navigation-expand.png deleted file mode 100644 index a37c66a090ef9652d6d8733a9a16de5a9ce7be0e..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/navigation-expand.png and /dev/null differ diff --git a/docs/assets/screenshots/navigation-index-off.png b/docs/assets/screenshots/navigation-index-off.png deleted file mode 100644 index ab3751c4e9d7c2e5d7976dd84a6f48d068912a8b..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/navigation-index-off.png and /dev/null differ diff --git a/docs/assets/screenshots/navigation-index-on.png b/docs/assets/screenshots/navigation-index-on.png deleted file mode 100644 index 819069c81c2d5cd1b9ab3abc9c66c8a9fbfd919b..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/navigation-index-on.png and /dev/null differ diff --git a/docs/assets/screenshots/navigation-path-off.png b/docs/assets/screenshots/navigation-path-off.png deleted file mode 100644 index b212e7839cec34c96f4ec03997b7e8fdb091899f..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/navigation-path-off.png and /dev/null differ diff --git a/docs/assets/screenshots/navigation-path-on.png b/docs/assets/screenshots/navigation-path-on.png deleted file mode 100644 index 0afb80f677604b76af396248f3492383387fd145..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/navigation-path-on.png and /dev/null differ diff --git a/docs/assets/screenshots/navigation-sections.png b/docs/assets/screenshots/navigation-sections.png deleted file mode 100644 index b0edf5744981ee06811fa13291fb7845c719ad82..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/navigation-sections.png and /dev/null differ diff --git a/docs/assets/screenshots/navigation-tabs-collapsed.png b/docs/assets/screenshots/navigation-tabs-collapsed.png deleted file mode 100644 index 1c5d64e21d2cfe1ef21bf9056781ce72e3bb8630..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/navigation-tabs-collapsed.png and /dev/null differ diff --git a/docs/assets/screenshots/navigation-tabs-sticky.png b/docs/assets/screenshots/navigation-tabs-sticky.png deleted file mode 100644 index b8bd595698b08f1258f2d5b331ea6a2b15422d36..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/navigation-tabs-sticky.png and /dev/null differ diff --git a/docs/assets/screenshots/navigation-tabs.png b/docs/assets/screenshots/navigation-tabs.png deleted file mode 100644 index 96af83d513e1a9a1130b6407742c28f87b548865..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/navigation-tabs.png and /dev/null differ diff --git a/docs/assets/screenshots/navigation.png b/docs/assets/screenshots/navigation.png deleted file mode 100644 index 82864b525efedc9dd5ae6f1c3b528cf194af6d34..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/navigation.png and /dev/null differ diff --git a/docs/assets/screenshots/search-highlighting.png b/docs/assets/screenshots/search-highlighting.png deleted file mode 100644 index 69556e7c121b74cd2ab5613ef4a43d6267b9733b..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/search-highlighting.png and /dev/null differ diff --git a/docs/assets/screenshots/search-share.png b/docs/assets/screenshots/search-share.png deleted file mode 100644 index 0271ba1b0905ff154e94c7ce91d1494b1bbb7245..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/search-share.png and /dev/null differ diff --git a/docs/assets/screenshots/search-suggestions.png b/docs/assets/screenshots/search-suggestions.png deleted file mode 100644 index 20ccde9072862d4b9e0fda8a474ac6f5132ae036..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/search-suggestions.png and /dev/null differ diff --git a/docs/assets/screenshots/social-cards.png b/docs/assets/screenshots/social-cards.png deleted file mode 100644 index 3b348db345dad8aa5fc30d25d78b324636355c4e..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/social-cards.png and /dev/null differ diff --git a/docs/assets/screenshots/tags-index.png b/docs/assets/screenshots/tags-index.png deleted file mode 100644 index 35de44070d699ed5f9fbffb4028e037b88a47a8f..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/tags-index.png and /dev/null differ diff --git a/docs/assets/screenshots/tags-search.png b/docs/assets/screenshots/tags-search.png deleted file mode 100644 index 4bea8026388a6482490ae4fff4f6450e8eedc411..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/tags-search.png and /dev/null differ diff --git a/docs/assets/screenshots/tags.png b/docs/assets/screenshots/tags.png deleted file mode 100644 index 9e93a9cd50f6e9bbfb0d8a27f291517562c543b2..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/tags.png and /dev/null differ diff --git a/docs/assets/screenshots/toc-integrate.png b/docs/assets/screenshots/toc-integrate.png deleted file mode 100644 index 04fe87d5b324bbddbe01f77e612d71ead39823e0..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/toc-integrate.png and /dev/null differ diff --git a/docs/assets/screenshots/version-warning.png b/docs/assets/screenshots/version-warning.png deleted file mode 100644 index d7262c4d0aaa8a17ef99ca2f607b7c755b5a7f2e..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/version-warning.png and /dev/null differ diff --git a/docs/assets/screenshots/versioning.png b/docs/assets/screenshots/versioning.png deleted file mode 100644 index 114334c3754a299ea85d92a39e36722800199160..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/versioning.png and /dev/null differ diff --git a/docs/blog/posts/blog-support-just-landed.md b/docs/blog/posts/blog-support-just-landed.md deleted file mode 100644 index 6b65a70485810f960e8e781096723b4015b5fc1f..0000000000000000000000000000000000000000 --- a/docs/blog/posts/blog-support-just-landed.md +++ /dev/null @@ -1,247 +0,0 @@ ---- -date: 2022-09-12 -authors: [squidfunk] -description: > - Our new blog is built with the brand new built-in blog plugin. You can build - a blog alongside your documentation or standalone -categories: - - Blog -links: - - Getting started with Insiders: insiders/getting-started.md#requirements - - setup/setting-up-a-blog.md#built-in-blog-plugin ---- - -# Blog support just landed - -__Hey there! You're looking at our new blog, built with the brand new -[built-in blog plugin]. With this plugin, you can easily build a blog alongside -your documentation or standalone.__ - -Proper support for blogging, as requested by many users over the past few years, -was something that was desperately missing from Material for MkDocs' feature set. -While everybody agreed that blogging support was a blind spot, it was not -obvious whether MkDocs could be extended in a way to allow for blogging as we -know it from [Jekyll] and friends. The [built-in blog plugin] proves that it is, -after all, possible to build a blogging engine on top of MkDocs, in order to -create a technical blog alongside your documentation, or as the main thing. - -<!-- more --> - -_This article explains how to build a standalone blog with Material for MkDocs. -If you want to build a blog alongside your documentation, please refer to -[the plugin's documentation][built-in blog plugin]._ - - [built-in blog plugin]: ../../setup/setting-up-a-blog.md#built-in-blog-plugin - [Jekyll]: https://jekyllrb.com/ - -## Quick start - -### Setting up Insiders - -Before we can start bootstrapping a blog and [write our first post], we need to -set up [Insiders], since the [built-in blog plugin] is currently reserved to -sponsors. Without the funds this project receives through sponsorships, this -plugin wouldn't exist. Three steps are necessary: - -1. [Subscribe to a monthly sponsorship] -2. [Create a personal access token] -3. [Install Insiders] - - [write our first post]: #writing-your-first-post - [Insiders]: ../../insiders/index.md - [Subscribe to a monthly sponsorship]: ../../insiders/index.md#how-to-become-a-sponsor - [Create a personal access token]: ../../insiders/getting-started.md#requirements - [Install Insiders]: ../../insiders/getting-started.md#installation - -### Creating a standalone blog - -After Insiders is installed, you can bootstrap a new project using the `mkdocs` -executable: - -``` -mkdocs new . -``` - -This will create the following structure: - -``` { .sh .no-copy } -. -├─ docs/ -│ └─ index.md -└─ mkdocs.yml -``` - -#### Configuration - -In this article, we're going to build a standalone blog, which means that the -blog lives at the root of your project. For this reason, open `mkdocs.yml`, -and replace its contents with: - -``` yaml -site_name: My Blog -theme: - name: material - features: - - navigation.sections -plugins: - - meta - - blog: - blog_dir: . # (1)! - - search - - tags -nav: - - index.md -``` - -1. This is the important part – we're hosting the blog at the root of the - project, and not in a subdirectory. For more information, see the - [`blog_dir`][blog_dir] configuration option. - - [blog_dir]: ../../setup/setting-up-a-blog.md#+blog.blog_dir - -#### Blog setup - -The blog index page lives in `docs/index.md`. This page was pre-filled by -MkDocs with some content, so we're going to replace it with what we need to -bootstrap the blog: - -``` markdown -# Blog -``` - -That's it. - -### Writing your first post - -Now that we have set up the [built-in blog plugin], we can start writing our -first post. All blog posts are written with the [exact same Markdown flavor] as -already included with Material for MkDocs. First, create a folder called `posts` -with a file called `hello-world.md`: - -``` { .sh .no-copy } -. -├─ docs/ -│ ├─ posts/ -│ │ └─ hello-world.md # (1)! -│ └─ index.md -└─ mkdocs.yml -``` - -1. If you'd like to arrange posts differently, you're free to do so. The URLs - are built from the format specified in [`post_url_format`][post slugs] and - the titles and dates of posts, no matter how they are organized - inside the `posts` directory. - -Then, open up `hello-world.md`, and add the following lines: - -``` yaml ---- -draft: true # (1)! -date: 2022-01-31 -categories: - - Hello - - World ---- - -# Hello world! - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec -maximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula -erat, ut egestas tellus eros at risus. In hac habitasse platea dictumst. -Phasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris -Nam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in -sem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac -metus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet. - -<!-- more --> - -Donec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum -massa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam -tempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet -molestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus. - -Nunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat. -In auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc -pharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis -arcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue. -In velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque -tellus id elit ultricies, vel finibus erat cursus. -``` - -1. If you mark a post as a [draft], a red marker appears next to the post date - on index pages. When the site is built, drafts are not included in the - output. [This behavior can be changed], e.g. for rendering drafts when - building deploy previews. - -When you spin up the [live preview server], you should be greeted by your first -post! You'll also realize, that [archive] and [category] indexes have been -automatically generated for you: - - ![Blog] - -However, this is just the start. The [built-in blog plugin] packs a lot of -functionality needed in day-to-day blogging. Visit the documentation of the -plugin to learn about the following topics: - -<div class="mdx-columns" markdown> - -- [Adding an excerpt] -- [Adding authors] -- [Adding categories] -- [Adding tags] -- [Adding related links] -- [Linking from and to posts] -- [Setting the reading time] -- [Setting defaults] - -</div> - -Additionally, the [built-in blog plugin] has dozens of [configuration options] -which allow for fine-tuning the output. You can configure post slugs, general -behavior and much more. - - [exact same Markdown flavor]: ../../reference/index.md - [post slugs]: ../../setup/setting-up-a-blog.md#+blog.post_url_format - [draft]: ../../setup/setting-up-a-blog.md#drafts - [This behavior can be changed]: ../../setup/setting-up-a-blog.md#+blog.draft - [live preview server]: ../../creating-your-site.md#previewing-as-you-write - [archive]: ../../setup/setting-up-a-blog.md#archive - [category]: ../../setup/setting-up-a-blog.md#categories - [Blog]: blog-support-just-landed/blog.png - [Blog post]: blog-support-just-landed/blog-post.png - [Adding an excerpt]: ../../setup/setting-up-a-blog.md#adding-an-excerpt - [Adding authors]: ../../setup/setting-up-a-blog.md#adding-authors - [Adding categories]: ../../setup/setting-up-a-blog.md#adding-categories - [Adding tags]: ../../setup/setting-up-a-blog.md#adding-tags - [Adding related links]: ../../setup/setting-up-a-blog.md#adding-related-links - [Linking from and to posts]: ../../setup/setting-up-a-blog.md#linking-from-and-to-posts - [Setting the reading time]: ../../setup/setting-up-a-blog.md#setting-the-reading-time - [Setting defaults]: ../../setup/setting-up-a-blog.md#setting-defaults - [configuration options]: ../../setup/setting-up-a-blog.md#configuration - -## What's next? - -Getting basic blogging support out the door was quite a challenge – the -[built-in blog plugin] is probably the biggest release this year and already -packs a lot of functionality. However, Material for MkDocs is used in many -different contexts, which is why we'd expect to iterate, as always. - -Some ideas already proposed by users: - -- __Blog series__: Authors should be able to create so called blog series and - assign posts to a blog series using simple identifiers. For each post that is - part of a series, a list with links to all other posts should be included in - the post's content. - -- __Author indexes__: Besides [archive] and [category] indexes, authors should - be able to create per-author indexes, which list all posts linked to an - author. Additionally, a profile should be created for each author and linked - from posts. - -- __Social share buttons__: It should be easy to share blog posts via social - media or other ways. For this reason, it should be possible to automatically - include social sharing buttons with each post. - -What's still missing from the brand new [built-in blog plugin]? Feel free to -share your ideas in the comments. Together, we can build one of the best modern -engines for technical blogging! diff --git a/docs/blog/posts/blog-support-just-landed/blog.png b/docs/blog/posts/blog-support-just-landed/blog.png deleted file mode 100644 index a1ea1eaa05b8e805f450adc590b635f55bf1c73a..0000000000000000000000000000000000000000 Binary files a/docs/blog/posts/blog-support-just-landed/blog.png and /dev/null differ diff --git a/docs/blog/posts/chinese-search-support.md b/docs/blog/posts/chinese-search-support.md deleted file mode 100644 index cf675cd610dec4b96d96fc6c00367c2ce68c060d..0000000000000000000000000000000000000000 --- a/docs/blog/posts/chinese-search-support.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -date: 2022-05-05 -authors: [squidfunk] -title: Chinese search support -description: > - Insiders adds Chinese language support for the built-in search plugin – a - feature that has been requested many times -categories: - - Search -links: - - blog/posts/search-better-faster-smaller.md - - setup/setting-up-site-search.md#chinese-language-support - - insiders/index.md#how-to-become-a-sponsor ---- - -# Chinese search support – 䏿–‡æœç´¢â€‹æ”¯æŒ - -__Insiders adds experimental Chinese language support for the [built-in search -plugin] – a feature that has been requested for a long time given the large -number of Chinese users.__ - -After the United States and Germany, the third-largest country of origin of -Material for MkDocs users is China. For a long time, the [built-in search plugin] -didn't allow for proper segmentation of Chinese characters, mainly due to -missing support in [lunr-languages] which is used for search tokenization and -stemming. The latest Insiders release adds long-awaited Chinese language support -for the built-in search plugin, something that has been requested by many users. - -<!-- more --> - -_Material for MkDocs終於​支æŒâ€‹ä¸æ–‡â€‹äº†ï¼æ–‡æœ¬â€‹è¢«â€‹æ£ç¢ºâ€‹åˆ†å‰²â€‹ä¸¦ä¸”​更​容易​找到。_ -{ style="display: inline" } - -_This article explains how to set up Chinese language support for the built-in -search plugin in a few minutes._ -{ style="display: inline" } - - [built-in search plugin]: ../../setup/setting-up-site-search.md#built-in-search-plugin - [lunr-languages]: https://github.com/MihaiValentin/lunr-languages - -## Configuration - -Chinese language support for Material for MkDocs is provided by [jieba], an -excellent Chinese text segmentation library. If [jieba] is installed, the -built-in search plugin automatically detects Chinese characters and runs them -through the segmenter. You can install [jieba] with: - -``` -pip install jieba -``` - -The next step is only required if you specified the [`separator`][separator] -configuration in `mkdocs.yml`. Text is segmented with [zero-width whitespace] -characters, so it renders exactly the same in the search modal. Adjust -`mkdocs.yml` so that the [`separator`][separator] includes the `\u200b` -character: - -``` yaml -plugins: - - search: - separator: '[\s\u200b\-]' -``` - -That's all that is necessary. - -## Usage - -If you followed the instructions in the configuration guide, Chinese words will -now be tokenized using [jieba]. Try searching for -[:octicons-search-24: 支æŒ][q=支æŒ] to see how it integrates with the -built-in search plugin. - ---- - -Note that this is an experimental feature, and I, @squidfunk, am not -proficient in Chinese (yet?). If you find a bug or think something can be -improved, please [open an issue]. - - [jieba]: https://pypi.org/project/jieba/ - [zero-width whitespace]: https://en.wikipedia.org/wiki/Zero-width_space - [separator]: ../../setup/setting-up-site-search.md#separator - [q=支æŒ]: ?q=æ”¯æŒ - [open an issue]: https://github.com/squidfunk/mkdocs-material/issues/new/choose diff --git a/docs/blog/posts/excluding-content-from-search.md b/docs/blog/posts/excluding-content-from-search.md deleted file mode 100644 index 6c7b0d7b5b7136f3e0d1a1b680427734d6a4e479..0000000000000000000000000000000000000000 --- a/docs/blog/posts/excluding-content-from-search.md +++ /dev/null @@ -1,207 +0,0 @@ ---- -date: 2021-09-26 -authors: [squidfunk] -description: > - Three new simple ways to exclude dedicated parts of a document from the search - index, allowing for more fine-grained control -categories: - - Search -links: - - blog/posts/search-better-faster-smaller.md - - setup/setting-up-site-search.md#search-exclusion - - insiders/index.md#how-to-become-a-sponsor ---- - -# Excluding content from search - -__The latest Insiders release brings three new simple ways to exclude -dedicated parts of a document from the search index, allowing for more -fine-grained control.__ - -Two weeks ago, Material for MkDocs Insiders shipped a [brand new search -plugin], yielding [massive improvements in usability], but also in [speed -and size] of the search index. Interestingly, as discussed in the previous -blog article, we only scratched the surface of what's now possible. This -release brings some useful features that enhance the writing experience, -allowing for more fine-grained control of what pages, sections and blocks of a -Markdown file should be indexed by the built-in search functionality. - -<!-- more --> - -_The following section discusses existing solutions for excluding pages and -sections from the search index. If you immediately want to learn what's new, -skip to the [section just after that][what's new]._ - - [brand new search plugin]: search-better-faster-smaller.md - [massive improvements in usability]: search-better-faster-smaller.md#whats-new - [speed and size]: search-better-faster-smaller.md#benchmarks - [what's new]: #whats-new - -## Prior art - -MkDocs has a rich and thriving ecosystem of [plugins], and it comes as no -surprise that there's already a fantastic plugin by @chrieke to exclude specific -sections of a Markdown file – the [mkdocs-exclude-search] plugin. It can be -installed with: - -``` -pip install mkdocs-exclude-search -``` - -__How it works__: the plugin post-processes the `search_index.json` file that -is generated by the built-in search plugin, giving the author the ability to -exclude certain pages and sections by adding a few lines of configuration to -`mkdocs.yml`. An example: - -``` yaml -plugins: - - search - - exclude-search: - exclude: - - page.md - - page.md#section - - directory/* - - /*/page.md -``` - -It's easy to see that the plugin follows a configuration-centric approach, which -adds support for advanced filtering techniques like infix- and suffix-filtering -using wildcards. While this is a very powerful idea, it comes with some -downsides: - -1. __Exclusion patterns and content are not co-located__: exclusion patterns - need to be defined in `mkdocs.yml`, and not as part of the respective - document or section to be excluded. This might result in stale exclusion - patterns, leading to unintended behavior: - - - When a headline is changed, its slug (permalink) also changes, which might - suddenly match (or unmatch) a pattern, e.g., when an author fixes a typo - in a headline. - - - As exclusion patterns support the use of wildcards, different authors - might overwrite each other's patterns without any immediate feedback since - the plugin does only report the number of excluded documents – not _what_ - has been excluded.[^1] - - [^1]: - When the log level is set to `DEBUG`, the plugin will report exactly which - pages and sections have been excluded from the search index, but MkDocs will - now flood the terminal with debug output from its core and other plugins. - -2. __Exclusion control might be too coarse__: The [mkdocs-exclude-search] - plugin only allows for the exclusion of pages and sections. It's not - possible to exclude parts of a section, e.g., content that is irrelevant - to search but must be included as part of the documentation. - - [plugins]: https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins - [mkdocs-exclude-search]: https://github.com/chrieke/mkdocs-exclude-search - -## What's new? - -The latest Insiders release brings fine-grained control for [__excluding pages, -sections, and blocks__][search exclusion] from the search index, implemented -through front matter, as well as the [Attribute Lists]. Note that it doesn't -replace the [mkdocs-exclude-search] plugin but __complements__ it. - - [search exclusion]: ../../setup/setting-up-site-search.md#search-exclusion - [Attribute Lists]: ../../setup/extensions/python-markdown.md#attribute-lists - -### Excluding pages - -An entire page can be excluded from the search index by adding a simple -directive to the front matter of the respective Markdown file. The good thing -is that the author now only has to check the top of the document to learn -whether it is excluded or not: - -``` yaml ---- -search: - exclude: true ---- - -# Document title -... -``` - -### Excluding sections - -If a section should be excluded, the author can use the [Attribute Lists] -extension to add a __pragma__ called `data-search-exclude` at the end of a -heading. The pragma is not included in the final HTML, as search pragmas are -filtered by the search plugin before the page is rendered: - -=== ":octicons-file-code-16: `docs/page.md`" - - ``` markdown - # Document title - - ## Section 1 - - The content of this section is included - - ## Section 2 { data-search-exclude } - - The content of this section is excluded - ``` - -=== ":octicons-codescan-16: `search_index.json`" - - ``` json - { - ... - "docs": [ - { - "location":"page/", - "text":"", - "title":"Document title" - }, - { - "location":"page/#section-1", - "text":"<p>The content of this section is included</p>", - "title":"Section 1" - } - ] - } - ``` - -### Excluding blocks - -If even more fine-grained control is desired, the __pragma__ can be added to -any [block-level element] or [inline-level element] that is officially -supported by the [Attribute Lists] extension: - -=== ":octicons-file-code-16: `docs/page.md`" - - ``` markdown - # Document title - - The content of this block is included - - The content of this block is excluded - { data-search-exclude } - ``` - -=== ":octicons-codescan-16: `search_index.json`" - - ``` json - { - ... - "docs": [ - { - "location":"page/", - "text":"<p>The content of this block is included</p>", - "title":"Document title" - }, - ] - } - ``` - - [block-level element]: https://python-markdown.github.io/extensions/attr_list/#block-level - [inline-level element]: https://python-markdown.github.io/extensions/attr_list/#inline - -## Conclusion - -The latest release brings three simple ways to control more precisely what goes -into the search index and what doesn't. It complements the already very powerful -[mkdocs-exclude-search] plugin, allowing for new methods of shaping the -structure, size and content of the search index. diff --git a/docs/blog/posts/search-better-faster-smaller.md b/docs/blog/posts/search-better-faster-smaller.md deleted file mode 100644 index a6375d86796c0120f667ae2fda7c4df305a6c86b..0000000000000000000000000000000000000000 --- a/docs/blog/posts/search-better-faster-smaller.md +++ /dev/null @@ -1,637 +0,0 @@ ---- -date: 2021-09-13 -authors: [squidfunk] -readtime: 15 -description: > - How we rebuilt client-side search, delivering a better user experience while - making it faster and smaller at the same time -categories: - - Search - - Performance -links: - - setup/setting-up-site-search.md#built-in-search-plugin - - insiders/index.md#how-to-become-a-sponsor ---- - -# Search: better, faster, smaller - -__This is the story of how we managed to completely rebuild client-side search, -delivering a significantly better user experience while making it faster and -smaller at the same time.__ - -The [search] of Material for MkDocs is by far one of its best and most-loved -assets: [multilingual], [offline-capable], and most importantly: _all -client-side_. It provides a solution to empower the users of your documentation -to find what they're searching for instantly without the headache of managing -additional servers. However, even though several iterations have been made, -there's still some room for improvement, which is why we rebuilt the search -plugin and integration from the ground up. This article shines some light on the -internals of the new search, why it's much more powerful than the previous -version, and what's about to come. - -<!-- more --> - -_The next section discusses the architecture and issues of the current search -implementation. If you immediately want to learn what's new, skip to the -[section just after that][what's new]._ - - [search]: ../../setup/setting-up-site-search.md - [multilingual]: ../../setup/setting-up-site-search.md#lang - [offline-capable]: ../../setup/building-for-offline-usage.md - [what's new]: #whats-new - -## Architecture - -Material for MkDocs uses [lunr] together with [lunr-languages] to implement -its client-side search capabilities. When a documentation page is loaded and -JavaScript is available, the search index as generated by the -[built-in search plugin] during the build process is requested from the -server: - -``` ts -const index$ = document.forms.namedItem("search") - ? __search?.index || requestJSON<SearchIndex>( - new URL("search/search_index.json", config.base) - ) - : NEVER -``` - - [lunr]: https://lunrjs.com - [lunr-languages]: https://github.com/MihaiValentin/lunr-languages - [built-in search plugin]: ../../setup/setting-up-site-search.md#built-in-search-plugin - -### Search index - -The search index includes a stripped-down version of all pages. Let's take a -look at an example to understand precisely what the search index contains from -the original Markdown file: - -??? example "Expand to inspect example" - - === ":octicons-file-code-16: `docs/page.md`" - - ```` markdown - # Example - - ## Text - - It's very easy to make some words **bold** and other words *italic* - with Markdown. You can even add [links](#), or even `code`: - - ``` - if (isAwesome) { - return true - } - ``` - - ## Lists - - Sometimes you want numbered lists: - - 1. One - 2. Two - 3. Three - - Sometimes you want bullet points: - - * Start a line with a star - * Profit! - ```` - - === ":octicons-codescan-16: `search_index.json`" - - ``` json - { - "config": { - "indexing": "full", - "lang": [ - "en" - ], - "min_search_length": 3, - "prebuild_index": false, - "separator": "[\\s\\-]+" - }, - "docs": [ - { - "location": "page/", - "title": "Example", - "text": "Example Text It's very easy to make some words bold and other words italic with Markdown. You can even add links , or even code : if (isAwesome) { return true } Lists Sometimes you want numbered lists: One Two Three Sometimes you want bullet points: Start a line with a star Profit!" - }, - { - "location": "page/#example", - "title": "Example", - "text": "" - }, - { - "location": "page/#text", - "title": "Text", - "text": "It's very easy to make some words bold and other words italic with Markdown. You can even add links , or even code : if (isAwesome) { return true }" - }, - { - "location": "page/#lists", - "title": "Lists", - "text": "Sometimes you want numbered lists: One Two Three Sometimes you want bullet points: Start a line with a star Profit!" - } - ] - } - ``` - -If we inspect the search index, we immediately see several problems: - - 1. __All content is included twice__: the search index contains one entry - with the entire contents of the page, and one entry for each section of - the page, i.e., each block preceded by a headline or subheadline. This - significantly contributes to the size of the search index. - - 2. __All structure is lost__: when the search index is built, all structural - information like HTML tags and attributes are stripped from the content. - While this approach works well for paragraphs and inline formatting, it - might be problematic for lists and code blocks. An excerpt: - - ``` - … links , or even code : if (isAwesome) { … } Lists Sometimes you want … - ``` - - - __Context__: for an untrained eye, the result can look like gibberish, as - it's not immediately apparent what classifies as text and what as code. - Furthermore, it's not clear that `Lists` is a headline as it's merged - with the code block before and the paragraph after it. - - - __Punctuation__: inline elements like links that are immediately followed - by punctuation are separated by whitespace (see `,` and `:` in the - excerpt). This is because all extracted text is joined with a whitespace - character during the construction of the search index. - -It's not difficult to see that it can be quite challenging to implement a good -search experience for theme authors, which is why Material for MkDocs (up to -now) did some [monkey patching] to be able to render slightly more -meaningful search previews. - - [monkey patching]: https://github.com/squidfunk/mkdocs-material/blob/ec7ccd2b2d15dd033740f388912f7be7738feec2/src/assets/javascripts/integrations/search/document/index.ts#L68-L71 - -### Search worker - -The actual search functionality is implemented as part of a web worker[^1], -which creates and manages the [lunr] search index. When search is initialized, -the following steps are taken: - - [^1]: - Prior to :octicons-tag-24: 5.0.0, search was carried out in the main thread - which locked up the browser, rendering it unusable. This problem was first - reported in #904 and, after some back and forth, fixed and released in - :octicons-tag-24: 5.0.0. - -1. __Linking sections with pages__: The search index is parsed, and each - section is linked to its parent page. The parent page itself is _not - indexed_, as it would lead to duplicate results, so only the sections - remain. Linking is necessary, as search results are grouped by page. - -2. __Tokenization__: The `title` and `text` values of each section are split - into tokens by using the [`separator`][separator] as configured in - `mkdocs.yml`. Tokenization itself is carried out by - [lunr's default tokenizer][default tokenizer], which doesn't allow for - lookahead or separators spanning multiple characters. - - > Why is this important and a big deal? We will see later how much more we - > can achieve with a tokenizer that is capable of separating strings with - > lookahead. - -1. __Indexing__: As a final step, each section is indexed. When querying the - index, if a search query includes one of the tokens as returned by step 2., - the section is considered to be part of the search result and passed to the - main thread. - -Now, that's basically how the search worker operates. Sure, there's a little -more magic involved, e.g., search results are [post-processed] and [rescored] to -account for some shortcomings of [lunr], but in general, this is how data gets -into and out of the index. - - [separator]: ../../setup/setting-up-site-search.md#search-separator - [default tokenizer]: https://github.com/olivernn/lunr.js/blob/aa5a878f62a6bba1e8e5b95714899e17e8150b38/lunr.js#L413-L456 - [post-processed]: https://github.com/squidfunk/mkdocs-material/blob/ec7ccd2b2d15dd033740f388912f7be7738feec2/src/assets/javascripts/integrations/search/_/index.ts#L249-L272 - [rescored]: https://github.com/squidfunk/mkdocs-material/blob/ec7ccd2b2d15dd033740f388912f7be7738feec2/src/assets/javascripts/integrations/search/_/index.ts#L274-L275 - -### Search previews - -Users should be able to quickly scan and evaluate the relevance of a search -result in the given context, which is why a concise summary with highlighted -occurrences of the search terms found is an essential part of a great search -experience. - -This is where the current search preview generation falls short, as some of the -search previews appear not to include any occurrence of any of the search -terms. This was due to the fact that search previews were [truncated after a -maximum of 320 characters][truncated], as can be seen here: - -<figure markdown> - -![search preview] - - <figcaption markdown> - -The first two results look like they're not relevant, as they don't seem to -include the query string the user just searched for. Yet, they are. - - </figcaption> -</figure> - -A better solution to this problem has been on the roadmap for a very, very long -time, but in order to solve this once and for all, several factors need to be -carefully considered: - -1. __Word boundaries__: some themes[^2] for static site generators generate - search previews by expanding the text left and right next to an occurrence, - stopping at a whitespace character when enough words have been consumed. A - preview might look like this: - - ``` - … channels, e.g., or which can be configured via mkdocs.yml … - ``` - - While this may work for languages that use whitespace as a separator - between words, it breaks down for languages like Japanese or Chinese[^3], - as they have non-whitespace word boundaries and use dedicated segmenters to - split strings into tokens. - - [^2]: - At the time of writing, [Just the Docs] and [Docusaurus] use this method - for generating search previews. Note that the latter also integrates with - Algolia, which is a fully managed server-based solution. - - [^3]: - China and Japan are both within the top 5 countries of origin of users of - Material for MkDocs. - - [truncated]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/templates/search/index.tsx#L90 - [search preview]: search-better-faster-smaller/search-preview.png - [Just the Docs]: https://pmarsceill.github.io/just-the-docs/ - [Docusaurus]: https://github.com/lelouch77/docusaurus-lunr-search - -1. __Context-awareness__: Although whitespace doesn't work for all languages, - one could argue that it could be a good enough solution. Unfortunately, this - is not necessarily true for code blocks, as the removal of whitespace might - change meaning in some languages. - -3. __Structure__: Preserving structural information is not a must, but - apparently beneficial to build more meaningful search previews which allow - for a quick evaluation of relevance. If a word occurrence is part of a code - block, it should be rendered as a code block. - -## What's new? - -After we built a solid understanding of the problem space and before we dive -into the internals of our new search implementation to see which of the -problems it already solves, a quick overview of what features and improvements -it brings: - -- __Better__: support for [rich search previews], preserving the structural - information of code blocks, inline code, and lists, so they are rendered - as-is, as well as [lookahead tokenization], [more accurate highlighting], and - improved stability of typeahead. Also, a [slightly better UX]. -- __Faster__ and __smaller__: significant decrease in search index size of up - to 48% due to improved extraction and construction techniques, resulting in a - search experience that is up to 95% faster, which is particularly helpful for - large documentation projects. - - [rich search previews]: #rich-search-previews - [lookahead tokenization]: #tokenizer-lookahead - [more accurate highlighting]: #accurate-highlighting - [slightly better UX]: #user-interface - -### Rich search previews - -As we rebuilt the search plugin from scratch, we reworked the construction of -the search index to preserve the structural information of code blocks, inline -code, as well as unordered and ordered lists. Using the example from the -[search index] section, here's how it looks: - -=== "Now" - - ![search preview now] - -=== "Before" - - ![search preview before] - -Now, __code blocks are first-class citizens of search previews__, and even -inline code formatting is preserved. Let's take a look at the new structure of -the search index to understand why: - -??? example "Expand to inspect search index" - - === "Now" - - ``` json - { - ... - "docs": [ - { - "location": "page/", - "title": "Example", - "text": "" - }, - { - "location": "page/#text", - "title": "Text", - "text": "<p>It's very easy to make some words bold and other words italic with Markdown. You can even add links, or even <code>code</code>:</p> <pre><code>if (isAwesome){\n return true\n}\n</code></pre>" - }, - { - "location": "page/#lists", - "title": "Lists", - "text": "<p>Sometimes you want numbered lists:</p> <ol> <li>One</li> <li>Two</li> <li>Three</li> </ol> <p>Sometimes you want bullet points:</p> <ul> <li>Start a line with a star</li> <li>Profit!</li> </ul>" - } - ] - } - ``` - - === "Before" - - ``` json - { - ... - "docs": [ - { - "location": "page/", - "title": "Example", - "text": "Example Text It's very easy to make some words bold and other words italic with Markdown. You can even add links , or even code : if (isAwesome) { return true } Lists Sometimes you want numbered lists: One Two Three Sometimes you want bullet points: Start a line with a star Profit!" - }, - { - "location": "page/#example", - "title": "Example", - "text": "" - }, - { - "location": "page/#text", - "title": "Text", - "text": "It's very easy to make some words bold and other words italic with Markdown. You can even add links , or even code : if (isAwesome) { return true }" - }, - { - "location": "page/#lists", - "title": "Lists", - "text": "Sometimes you want numbered lists: One Two Three Sometimes you want bullet points: Start a line with a star Profit!" - } - ] - } - ``` - -If we inspect the search index again, we can see how the situation improved: - -1. __Content is included only once__: the search index does not include the - content of the page twice, as only the sections of a page are part of the - search index. This leads to a significant reduction in size, fewer bytes to - transfer, and a smaller search index. - -2. __Some structure is preserved__: each section of the search index includes - a small subset of HTML to provide the necessary structure to allow for more - sophisticated search previews. Revisiting our example from before, let's - look at an excerpt: - - === "Now" - - ``` html - … links, or even <code>code</code>:</p> <pre><code>if (isAwesome){ … }\n</code></pre> - ``` - - === "Before" - - ``` - … links , or even code : if (isAwesome) { … } - ``` - - The punctuation issue is gone, as no additional whitespace is inserted, and - the preserved markup yields additional context to make scanning search - results more effective. - -On to the next step in the process: __tokenization__. - - [search index]: #search-index - [search preview now]: search-better-faster-smaller/search-preview-now.png - [search preview before]: search-better-faster-smaller/search-preview-before.png - -### Tokenizer lookahead - -The [default tokenizer] of [lunr] uses a regular expression to split a given -string by matching each character against the [`separator`][separator] as -defined in `mkdocs.yml`. This doesn't allow for more complex separators based -on lookahead or multiple characters. - -Fortunately, __our new search implementation provides an advanced tokenizer__ -that doesn't have these shortcomings and supports more complex regular -expressions. As a result, Material for MkDocs just changed its own separator -configuration to the following value: - -``` -[\s\-,:!=\[\]()"/]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t; -``` - -While the first part up to the first `|` contains a list of single control -characters at which the string should be split, the following three sections -explain the remainder of the regular expression.[^4] - - [^4]: - As a fun fact: the [`separator`][separator] [default value] of the search - plugin being `[\s\-]+` always has been kind of irritating, as it suggests - that multiple characters can be considered being a separator. However, the - `+` is completely irrelevant, as regular expression groups involving - multiple characters were never supported by - [lunr's default tokenizer][default tokenizer]. - - [default value]: https://www.mkdocs.org/user-guide/configuration/#separator - -#### Case changes - -Many programming languages use `PascalCase` or `camelCase` naming conventions. -When a user searches for the term `case`, it's quite natural to expect for -`PascalCase` and `camelCase` to show up. By adding the following match group to -the separator, this can now be achieved with ease: - -``` -(?!\b)(?=[A-Z][a-z]) -``` - -This regular expression is a combination of a negative lookahead (`\b`, i.e., -not a word boundary) and a positive lookahead (`[A-Z][a-z]`, i.e., an uppercase -character followed by a lowercase character), and has the following behavior: - -- `PascalCase` :octicons-arrow-right-24: `Pascal`, `Case` -- `camelCase` :octicons-arrow-right-24: `camel`, `Case` -- `UPPERCASE` :octicons-arrow-right-24: `UPPERCASE` - -Searching for [:octicons-search-24: searchHighlight][q=searchHighlight] -now brings up the section discussing the `search.highlight` feature flag, which -also demonstrates that this now even works properly for search queries.[^5] - - [^5]: - Previously, the search query was not correctly tokenized due to the way - [lunr] treats wildcards, as it disables the pipeline for search terms that - contain wildcards. In order to provide a good typeahead experience, - Material for MkDocs adds wildcards to the end of each search term not - explicitly preceded with `+` or `-`, effectively disabling tokenization. - - [q=searchHighlight]: ?q=searchHighlight - -#### Version numbers - -Indexing version numbers is another problem that can be solved with a small -lookahead. Usually, `.` should be considered a separator to split words like -`search.highlight`. However, splitting version numbers at `.` will make them -undiscoverable. Thus, the following expression: - -``` -\.(?!\d) -``` - -This regular expression matches a `.` only if not immediately followed by a -digit `\d`, which leaves version numbers discoverable. Searching for -[:octicons-search-24: 7.2.6][q=7.2.6] brings up the [7.2.6] release notes. - - [q=7.2.6]: ?q=7.2.6 - [7.2.6]: ../../changelog/index.md#726-_-september-1-2021 - -#### HTML/XML tags - -If your documentation includes HTML/XML code examples, you may want to allow -users to find specific tag names. Unfortunately, the `<` and `>` control -characters are encoded in code blocks as `<` and `>`. Now, adding the -following expression to the separator allows for just that: - -``` -&[lg]t; -``` - -Searching for [:octicons-search-24: custom search worker script][q=script] -brings up the section on [custom search] and matches the `script` tag among the -other search terms discovered. - ---- - -_We've only just begun to scratch the surface of the new possibilities -tokenizer lookahead brings. If you found other useful expressions, you're -invited to share them in the comment section._ - - [q=script]: ?q=custom+search+worker+script - [custom search]: ../../setup/setting-up-site-search.md#custom-search - -### Accurate highlighting - -Highlighting is the last step in the process of search and involves the -highlighting of all search term occurrences in a given search result. For a -long time, highlighting was implemented through dynamically generated -[regular expressions].[^6] - -This approach has some problems with non-whitespace languages like Japanese or -Chinese[^3] since it only works if the highlighted term is at a word boundary. -However, Asian languages are tokenized using a [dedicated segmenter], which -cannot be modeled with regular expressions. - - [^6]: - Using the separator as defined in `mkdocs.yml`, a regular expression was - constructed that was trying to mimic the tokenizer. As an example, the - search query `search highlight` was transformed into the rather cumbersome - regular expression `(^|<separator>)(search|highlight)`, which only matches - at word boundaries. - -Now, as a direct result of the [new tokenization approach], __our new search -implementation uses token positions for highlighting__, making it exactly as -powerful as tokenization: - -1. __Word boundaries__: as the new highlighter uses token positions, word - boundaries are equal to token boundaries. This means that more complex cases - of tokenization (e.g., [case changes], [version numbers], [HTML/XML tags]), - are now all highlighted accurately. - -2. __Context-awareness__: as the new search index preserves some of the - structural information of the original document, the content of a section - is now divided into separate content blocks – paragraphs, code blocks, and - lists. - - Now, only the content blocks that actually contain occurrences of one of - the search terms are considered for inclusion into the search preview. If a - term only occurs in a code block, it's the code block that gets rendered, - see, for example, the results of - [:octicons-search-24: twitter][q=twitter]. - - [regular expressions]: https://github.com/squidfunk/mkdocs-material/blob/ec7ccd2b2d15dd033740f388912f7be7738feec2/src/assets/javascripts/integrations/search/highlighter/index.ts#L61-L91 - [dedicated segmenter]: http://chasen.org/~taku/software/TinySegmenter/ - [new tokenization approach]: #tokenizer-lookahead - [case changes]: #case-changes - [version numbers]: #version-numbers - [HTML/XML tags]: #htmlxml-tags - [q=twitter]: ?q=twitter - -### Benchmarks - -We conducted two benchmarks – one with the documentation of Material for MkDocs -itself, and one with a very massive corpus of Markdown files with more than -800,000 words – a size most documentation projects will likely never -reach: - -<figure markdown> - -| | Before | Now | Relative | -| ----------------------- | -------: | -------------: | -----------: | -| __Material for MkDocs__ | | | | -| Index size | 573 kB | __335 kB__ | __–42%__ | -| Index size (`gzip`) | 105 kB | __78 kB__ | __–27%__ | -| Indexing time[^7] | 265 ms | __177 ms__ | __–34%__ | -| __KJV Markdown[^8]__ | | | | -| Index size | 8.2 MB | __4.4 MB__ | __–47%__ | -| Index size (`gzip`) | 2.3 MB | __1.2 MB__ | __–48%__ | -| Indexing time | 2,700 ms | __1,390 ms__ | __–48%__ | - -<figcaption> - <p>Benchmark results</p> -</figcaption> - -</figure> - - [^7]: - Smallest value of ten distinct runs. - - [^8]: - We agnostically use [KJV Markdown] as a tool for testing to learn how - Material for MkDocs behaves on large corpora, as it's a very large set of - Markdown files with over 800k words. - -The results show that indexing time, which is the time that it takes to set up -the search when the page is loaded, has dropped by up to 48%, which means __the -new search is up to 95% faster__. This is a significant improvement, -particularly relevant for large documentation projects. - -While 1,3s still may sound like a long time, using the new client-side search -together with [instant loading] only creates the search index on the initial -page load. When navigating, the search index is preserved across pages, so the -cost does only have to be paid once. - - [KJV Markdown]: https://github.com/arleym/kjv-markdown - [instant loading]: ../../setup/setting-up-navigation.md#instant-loading - -### User interface - -Additionally, some small improvements have been made, most prominently the -__more results on this page__ button, which now sticks to the top of the search -result list when open. This enables the user to jump out of the list more -quickly. - -## What's next? - -Our new search implementation is a big improvement to Material for MkDocs. It -solves some long-standing issues which needed to be tackled for years. Yet, -it's only the start of a search experience that is going to get better and -better. Next up: - -- __Context-aware search summarization__: currently, the first two matching - content blocks are rendered as a search preview. With the new tokenization - technique, we laid the groundwork for more sophisticated shortening and - summarization methods, which we're tackling next. - -- __User interface improvements__: as we now gained full control over the - search plugin, we can now add meaningful metadata to provide more context and - a better experience. We'll explore some of those paths in the future. - -If you've made it this far, thank you for your time and interest in Material -for MkDocs! This is the first blog article that I decided to write after a -short [Twitter survey] made me to. You're invited to leave a comment -to share your experiences with the new search implementation. - - [Twitter survey]: https://twitter.com/squidfunk/status/1434477478823743488 diff --git a/docs/blog/posts/search-better-faster-smaller/search-preview-before.png b/docs/blog/posts/search-better-faster-smaller/search-preview-before.png deleted file mode 100644 index 7f6fcc8bd996f642585bf232aab090909a899d53..0000000000000000000000000000000000000000 Binary files a/docs/blog/posts/search-better-faster-smaller/search-preview-before.png and /dev/null differ diff --git a/docs/blog/posts/search-better-faster-smaller/search-preview-now.png b/docs/blog/posts/search-better-faster-smaller/search-preview-now.png deleted file mode 100644 index 0935166249ab46521fefa30a75a6a8ff872d9527..0000000000000000000000000000000000000000 Binary files a/docs/blog/posts/search-better-faster-smaller/search-preview-now.png and /dev/null differ diff --git a/docs/blog/posts/search-better-faster-smaller/search-preview.png b/docs/blog/posts/search-better-faster-smaller/search-preview.png deleted file mode 100644 index 7ca97e1cf3747bcd07a185f640789ff763566a1a..0000000000000000000000000000000000000000 Binary files a/docs/blog/posts/search-better-faster-smaller/search-preview.png and /dev/null differ diff --git a/docs/blog/posts/the-past-present-and-future.md b/docs/blog/posts/the-past-present-and-future.md deleted file mode 100644 index 2cd783f365a9c5f5033687f4650622adf64b51c7..0000000000000000000000000000000000000000 --- a/docs/blog/posts/the-past-present-and-future.md +++ /dev/null @@ -1,266 +0,0 @@ ---- -date: 2021-12-27 -authors: [squidfunk] -description: > - 2021 was a fantastic year for this project as we shipped many new awesome - features and made this project sustainable -categories: - - General ---- - -# The past, present and future - -__2021 was a fantastic year for this project as we shipped many new awesome -features, saw significant user growth and leveraged GitHub Sponsors to make the -project sustainable.__ - -Today, together, [MkDocs] and Material for MkDocs are among the most popular -options when it comes to choosing a static site generator and theme for your -technical documentation project. Material for MkDocs ensures that your -content is always perfectly presented to your audience, regardless of screen -resolution or device capabilities. It has evolved to a framework for technical -writing, offering many features, some of which are yet to be found in other -static site generators. However, we're far from the end, as 2022 is going to -bring some interesting new capabilities. - -<!-- more --> - -_This article showcases all features that were added in 2021 and gives an -outlook on what's going to drop in 2022. Additionally, it provides some context -on the history of the project._ - - [MkDocs]: https://www.mkdocs.org - -## A little history - -In 2015, albeit 10 years in the industry, I was still quite new in Open Source. -I wanted to release my latest Open Source project [protobluff], a zero-copy -Protocol Buffers implementation for C, which I've created as part of my former -startup. As the project has a significant degree of complexity, I quickly -realized that I was in need of good user documentation. - -After evaluating static site generators in general and Hugo, Sphinx and MkDocs -in particular, I quickly decided that MkDocs seemed a good choice, as it was -specifically aimed at technical project documentation and easy to use. -Unfortunately, all of the available themes looked dated and given that I'm a -very visual person, I just couldn't convince myself to call it a day. - -I _had_ to build a theme. - -Months later, in February 2016, I released [the first version] of Material for -MkDocs (and with it, [protobluff], the project I wanted to release in the first -place), and it looked like this: - -![Material for MkDocs 0.1.0][Material for MkDocs 0.1.0] - -It was already fully responsive and overall, well, quite okayish, but barely -customizable, as only the logo could be changed. Beyond that, it had no options: -No color or navigation options, no instant loading, etc. The search was very -rudimentary and only supported section titles: - -![Material for MkDocs 0.1.0 Search][Material for MkDocs 0.1.0 Search] - -It's important to know that at this point in time I've built Material for -MkDocs for [protobluff], the project I was really caring about. Almost 6 years -later, nobody knows protobluff, but this little side project has taken off. If -back in those days, you would've told me big organizations like AWS, -Microsoft and CERN, as well as extremely popular Open Source projects like -FastAPI and Kubernetes will be using this project in the future – I would've -declared you insane. - -I still find the success of this project quite surprising, as I thought that -themes exist in abundance and are very much a solved problem. There's no glory -in themes, no stars to earn (remember that I was new in Open Source, so this was -the metric I was optimizing for), as there are thousands and thousands of -options. However, as the years progressed, I learned that _execution matters_: -although Material for MkDocs solves a problem for which thousands of solutions -exist, it excels in a specific niche, and that niche is to be known as -_technical project documentation_. - -Today, this project is not only popular but funded by almost 300 individuals -and organizations, resulting in a yearly budget of more than $50,000. This -allows me to set aside enough time for the development of new features, -bug fixing, stability improvement, issue triage and general support and still -feels like a dream to me, as there are many failed stories of Open Source -funding and people telling you: _don't do Open Source, you'll be working for -free._ - -Making Open Source sustainable is, after all, possible in 2021. - - [the first version]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [Material for MkDocs 0.1.0]: the-past-present-and-future/mkdocs-material-0.1.0.png - [Material for MkDocs 0.1.0 Search]: the-past-present-and-future/mkdocs-material-0.1.0-search.png - [protobluff]: https://github.com/squidfunk/protobluff - -## 2021 in numbers - -2021 was an exciting year, as the project has seen significant growth. - -__166k people__ visited the official documentation in 2021, totalling in __1,6m -page views__ which is an increase of 83% when compared to 2020. The average -visitor spends __1,5min__ on the site. While mobile phones make up 12% of -visits, tablets only account for 0.6%. Visitors come from as many as __213 -countries__, which covers almost the whole world. - -### Features - -It's absolutely mind-blowing that __38 new features__ were added to Material -for MkDocs throughout 2021 – __that's a new feature every 9,6 days__ – -which was only possible because of the constantly improving funding situation. -Following is a list of all features shipped in alphabetical order, some of which -are still exclusively available to sponsors as part of [Insiders]: - -<div class="mdx-columns" markdown> - -- [Admonition inline blocks] -- [Advanced search highlighting] -- [Anchor tracking] -- [Back-to-top button] -- [Boosting pages in search] -- [Brand new search plugin] -- [Code annotations] -- [Code annotations: anchor links] -- [Code annotations: strip comments] -- [Code block titles] -- [Code block line anchors] -- [Color palette toggle] -- [Content tabs: improved support] -- [Content tabs: auto-linking] -- Content tabs: animated indicator -- [Cookie consent] -- [Custom admonition icons] -- [Dark mode support for images] -- [Dismissable announcement bar] -- [Excluding content from search] -- Latest release tag -- [Mermaid.js integration] -- [Navigation icons] -- [Remove generator notice] -- [Rich search previews] -- Stay on page when switching versions -- [Search highlighting] -- [Search sharing] -- [Search suggestions] -- [Section index pages] -- [Site language selection] -- [Social cards] -- [Sticky navigation tabs] -- [Tags with search integration] -- [Tokenizer with lookahead] -- [Versioning] -- [Version warning] -- [Was this page helpful?] - -</div> - -Additionally, a lot of bugs were fixed in the __1,000 commits__ that were pushed -to the repository this year. The [changelog] includes a list of all fixes. -Furthermore, a large amount of time was invested into refactoring the code base -to keep it in good shape. While the `mkdocs-material` package was released -__55__ times, `mkdocs-material-insiders` was shipped __72__ times. - - [Insiders]: ../../insiders/index.md - [Admonition inline blocks]: ../../reference/admonitions.md#inline-blocks - [Advanced search highlighting]: search-better-faster-smaller.md#accurate-highlighting - [Anchor tracking]: ../../setup/setting-up-navigation.md#anchor-tracking - [Back-to-top button]: ../../setup/setting-up-navigation.md#back-to-top-button - [Boosting pages in search]: ../../setup/setting-up-site-search.md#search-boosting - [Brand new search plugin]: search-better-faster-smaller.md - [Code annotations]: ../../reference/code-blocks.md#adding-annotations - [Code annotations: anchor links]: ../../reference/code-blocks.md#anchor-links - [Code annotations: strip comments]: ../../reference/code-blocks.md#stripping-comments - [Code block titles]: ../../reference/code-blocks.md#adding-a-title - [Code block line anchors]: ../../setup/extensions/python-markdown-extensions.md#anchor-linenums - [Color palette toggle]: ../../setup/changing-the-colors.md#color-palette-toggle - [Content tabs: improved support]: ../../reference/content-tabs.md - [Content tabs: auto-linking]: ../../reference/content-tabs.md#linked-content-tabs - [Cookie consent]: ../../setup/ensuring-data-privacy.md#cookie-consent - [Custom admonition icons]: ../../reference/admonitions.md#admonition-icons - [Dark mode support for images]: ../../reference/images.md#light-and-dark-mode - [Dismissable announcement bar]: ../../setup/setting-up-the-header.md#mark-as-read - [Excluding content from search]: ../../setup/setting-up-site-search.md#search-exclusion - [Mermaid.js integration]: ../../reference/diagrams.md - [Navigation icons]: ../../reference/index.md#setting-the-page-icon - [Remove generator notice]: ../../setup/setting-up-the-footer.md#generator-notice - [Rich search previews]: search-better-faster-smaller.md#rich-search-previews - [Search highlighting]: ../../setup/setting-up-site-search.md#search-highlighting - [Search sharing]: ../../setup/setting-up-site-search.md#search-sharing - [Search suggestions]: ../../setup/setting-up-site-search.md#search-suggestions - [Section index pages]: ../../setup/setting-up-navigation.md#section-index-pages - [Site language selection]: ../../setup/changing-the-language.md#site-language-selector - [Social cards]: ../../setup/setting-up-social-cards.md - [Sticky navigation tabs]: ../../setup/setting-up-navigation.md#sticky-navigation-tabs - [Tags with search integration]: ../../setup/setting-up-tags.md - [Tokenizer with lookahead]: search-better-faster-smaller.md#tokenizer-lookahead - [Versioning]: ../../setup/setting-up-versioning.md#versioning - [Version warning]: ../../setup/setting-up-versioning.md#version-warning - [Was this page helpful?]: ../../setup/setting-up-site-analytics.md#was-this-page-helpful - [changelog]: ../../changelog/index.md - -### Funding - -In 2021, monthly funding increased from $1,050 in the beginning of January to -more than $4,300 (Dec 27, 2021), totaling in a yearly budget of more than -$50,000. Compared to last year, __revenue from funding has increased by 617%__ -– which is absolutely unbelievable: - -![Funding] - - [Funding]: the-past-present-and-future/funding.png - -I'm solely providing these numbers to fulfill the transparency pledge I'm giving -to my [awesome sponsors], and to show that it's possible to make existing Open -Source projects sustainable by following a well-designed release strategy. - -You can learn about the strategy in the [Insiders] guide. - - [awesome sponsors]: ../../insiders/index.md#how-to-become-a-sponsor - -## 2022 - -Standing at the verge of the next year, it's safe to say that the project will -continue to prosper and evolve, yielding many awesome features that will make -technical writing more comfortable and flexible. Here's an excerpt of the -features that will see the light of day in 2022: - -- __Instant previews__: [instant previews] will render a specific page section - inside a tooltip when hovering an internal link, which will allow to implement - things like glossaries. Further support for improving glossary functionality - will also be investigated. - -- __Text annotations__: as a logical progression of [code annotations] which - were added in 2021, authors will be able to add annotations to plain text, - yielding excellent opportunities for side content. Of course, text annotations - will be as easy to use as code annotations. - -- __Navigation pruning__: to optimize large documentation projects, Material - for MkDocs will introduce a new feature flag called `navigation.prune` that - will lead to significantly smaller HTML files for documentation projects with - huge navigation hierarchies. - -- __Navigation status badge__: as an addition to the recently added - [navigation icon][Navigation icons] support, a status will be attributable to - each page, allowing to mark a page in the navigation tree with an icon as - :material-alert-decagram: __new__ or :material-trash-can: __deprecated__. - Custom status types will also be supported. - -- __Card grids__: as a further component in the toolkit of technical writing, - [card grids] will allow arranging content in grids, which is especially - useful for overview pages. They will allow to arrange arbitrary content, - including code blocks, admonitions, etc. - -- __Blog support__: blogging support is still [under investigation] and expected - to be one of the major additions in 2022. Blogging will perfectly integrate - with writing documentation, allowing to use all components available in - Material for MkDocs. - -This list is incomplete. Additionally, many new smaller features will be added -next year, just as in 2021. You can follow [@squidfunk on Twitter] to stay -updated. - -__Happy new year!__ :tada: - - [Instant previews]: https://twitter.com/squidfunk/status/1466794654213492743 - [card grids]: https://github.com/squidfunk/mkdocs-material/issues/3018 - [under investigation]: https://github.com/squidfunk/mkdocs-material/issues/3353 - [@squidfunk on Twitter]: https://twitter.com/squidfunk diff --git a/docs/blog/posts/the-past-present-and-future/funding.png b/docs/blog/posts/the-past-present-and-future/funding.png deleted file mode 100644 index d6cf2193ef2b102473ea2843f12bbff027046c19..0000000000000000000000000000000000000000 Binary files a/docs/blog/posts/the-past-present-and-future/funding.png and /dev/null differ diff --git a/docs/blog/posts/the-past-present-and-future/mkdocs-material-0.1.0-search.png b/docs/blog/posts/the-past-present-and-future/mkdocs-material-0.1.0-search.png deleted file mode 100644 index 22ab1042bb12bbfeba7079cb00d2b73185054a83..0000000000000000000000000000000000000000 Binary files a/docs/blog/posts/the-past-present-and-future/mkdocs-material-0.1.0-search.png and /dev/null differ diff --git a/docs/blog/posts/the-past-present-and-future/mkdocs-material-0.1.0.png b/docs/blog/posts/the-past-present-and-future/mkdocs-material-0.1.0.png deleted file mode 100644 index d00c6852033d92ce1befdea0fb5727a973ffcb57..0000000000000000000000000000000000000000 Binary files a/docs/blog/posts/the-past-present-and-future/mkdocs-material-0.1.0.png and /dev/null differ diff --git a/docs/browser-support.md b/docs/browser-support.md deleted file mode 100644 index e5e3cece8a27f018ff36bc8b5439edf6b03a207c..0000000000000000000000000000000000000000 --- a/docs/browser-support.md +++ /dev/null @@ -1,67 +0,0 @@ -# Browser support - -Material for MkDocs goes at great lengths to support the largest possible range -of browsers while retaining the simplemost possibilities for customization via -modern CSS features like [custom properties] and [mask images]. - - [custom properties]: https://caniuse.com/css-variables - [mask images]: https://caniuse.com/mdn-css_properties_mask-image - -## Supported browsers - -The following table lists all browsers for which Material for MkDocs offers full -support, so it can be assumed that all features work without degradation. If you -find that something doesn't look right in a browser which is in the supported -version range, please [open an issue]: - -<figure markdown> - -| Browser | Version | Release date | | | Usage | -| ------------------------------------ | ------: | -----------: | ------: | -----: | ---------: | -| | | | desktop | mobile | overall | -| :fontawesome-brands-chrome: Chrome | 49+ | 03/2016 | 25.65% | 38.33% | 63.98% | -| :fontawesome-brands-safari: Safari | 10+ | 09/2016 | 4.63% | 14.96% | 19.59% | -| :fontawesome-brands-edge: Edge | 79+ | 01/2020 | 3.95% | n/a | 3.95% | -| :fontawesome-brands-firefox: Firefox | 53+ | 04/2017 | 3.40% | .30% | 3.70% | -| :fontawesome-brands-opera: Opera | 36+ | 03/2016 | 1.44% | .01% | 1.45% | -| | | | | | __92.67%__ | - - <figcaption markdown> - -Browser support matrix sourced from [caniuse.com].[^1] - - </figcaption> -</figure> - - [^1]: - The data was collected from [caniuse.com] in January 2022, and is primarily - based on browser support for [custom properties], [mask images] and the - [:is pseudo selector] which are not entirely polyfillable. Browsers with a - cumulated market share of less than 1% were not considered, but might still - be fully or partially supported. - -Note that the usage data is based on global browser market share, so it could -in fact be entirely different for your target demographic. It's a good idea to -check the distribution of browser types and versions among your users. - - [open an issue]: https://github.com/squidfunk/mkdocs-material/issues/new/choose - [caniuse.com]: https://caniuse.com/ - [:is pseudo selector]: https://caniuse.com/css-matches-pseudo - -## Other browsers - -Albeit your site might not look as perfect as when viewed with a modern browser, -the following older browser versions might work with some additional effort: - -- :fontawesome-brands-firefox: __Firefox 31-52__ – icons will render as little - boxes due to missing support for [mask images]. While this cannot be - polyfilled, it might be mitigated by hiding the icons altogether. -- :fontawesome-brands-edge: __Edge 16-18__ – the spacing of some elements might - be a little off due to missing support for the [:is pseudo selector], which - can be mitigated with some additional effort. -- :fontawesome-brands-internet-explorer: __Internet Explorer__ - no support, - mainly due to missing support for [custom properties]. The last version of - Material for MkDocs to support Internet Explorer is - [:octicons-tag-24: 4.6.3][IE support]. - - [IE support]: https://github.com/squidfunk/mkdocs-material/releases/tag/4.6.3 diff --git a/docs/changelog/index.md b/docs/changelog/index.md deleted file mode 100644 index 4d1d61b0ed6afb49f7052b7b62bd8de363da80c5..0000000000000000000000000000000000000000 --- a/docs/changelog/index.md +++ /dev/null @@ -1,1816 +0,0 @@ -# Changelog - -## Material for MkDocs - -### 9.0.11 <small>February 3, 2023</small> { id="9.0.11" } - -- Added Mastodon verification for social links (`rel=me`) -- Updated Italian translations - -### 9.0.10 <small>February 2, 2023</small> { id="9.0.10" } - -- Updated Arabic translations -- Updated Korean translations -- Updated Hungarian translations -- Updated Russian translations -- Fixed #4977: Improved accessibility for content tabs -- Fixed #4960: Sometimes anchor following doesn't bring last item into view - -### 9.0.9 <small>January 30, 2023</small> { id="9.0.9" } - -- Updated Bulgarian translations -- Updated Chinese (Simplified) translations -- Updated Dutch translations -- Updated Hindi translations -- Updated Japanese translations -- Updated Polish translations - -### 9.0.8 <small>January 29, 2023</small> { id="9.0.8" } - -- Updated Croatian translations -- Updated French translations -- Updated Hungarian translations -- Updated Portuguese (Brasilian) translations -- Updated Spanish translations -- Updated Ukrainian translations -- Updated Urdu translations -- Updated Vietnamese translations - -### 9.0.7 <small>January 28, 2023</small> { id="9.0.7" } - -- Improved accessibility of sidebar navigation -- Moved all translations into community edition -- Updated Polish and Portuguese (Brasilian) translations -- Fixed info plugin terminating on subsequent reload when serving -- Fixed #4910: Sidebar navigation labels have invalid ARIA roles -- Fixed #4884: Search query terms can't be separated by colons - -### 9.0.6 <small>January 19, 2023</small> { id="9.0.6" } - -- Fixed #4883: Automatically disable info plugin when serving -- Fixed #4885: Search plugin crashes in some exotic cases (9.0.3 regression) - -### 9.0.5 <small>January 14, 2023</small> { id="9.0.5" } - -- Fixed #4842: Improved accessibility of search result list - -### 9.0.4 <small>January 12, 2023</small> { id="9.0.4" } - -- Fixed #4823: Improved contrast ratio in footer (9.0.2 regression) -- Fixed #4832: Set navigation items back to black (9.0.3 regression) -- Fixed #4843: Emojis broken due to maxcdn.com shutting down -- Upgraded Python Markdown Extensions to 9.9.1 - -### 9.0.3 <small>January 8, 2023</small> { id="9.0.3" } - -- Improved discernability of section index pages in navigation -- Improved collapsing of adjacent whitespace in search plugin -- Updated Indonesian translations -- Fixed view source of this page button when edit URL points to blob -- Fixed #4829: Search overlay does not close for active anchor result -- Fixed #4824: Search plugin crashes for `h[1-6]` contained in other elements -- Fixed #4804: Nested navigation items not expandable with keyboard -- Fixed #4689: anchor tracking not working for anchors in tables -- Upgraded to Mermaid 9.3.0 - -### 9.0.2 <small>January 4, 2023</small> { id="9.0.2" } - -- Fixed #4823: Improved contrast ratio in footer to meet WCAG guidelines -- Fixed #4819: Social plugin crashes when card generation is disabled -- Fixed #4817: Search plugin crashes on numeric page titles in `nav` - -### 9.0.1 <small>January 3, 2023</small> { id="9.0.1" } - -- Removed `pipdeptree` dependency for built-in info plugin -- Fixed appearance of linked tags when hovered (9.0.0 regression) -- Fixed #4810: Abbreviations run out of screen on touch devices -- Fixed #4813: View source and edit button links are the same - -### 9.0.0 <small>January 2, 2023</small> { id="9.0.0" } - -__Additions and improvements__ - -- Added support for rich search previews -- Added support for tokenizer lookahead -- Added support for better search highlighting -- Added support for excluding content from search -- Added support for configurable search pipeline -- Added support for offline search via offline plugin -- Added support for multiple instances of built-in tags plugin -- Added support for removing copy-to-clipboard button -- Added support for removing footer navigation -- Added support for button to view the source of a page -- Improved readability of query string for search sharing -- Improved stability of search plugin when using `--dirtyreload` -- Improved search result group button, now sticky and stable -- Updated Norwegian translations -- Updated MkDocs to 1.4.2 - -__Removals__ - -- Removed deprecated alternative admonition qualifiers -- Removed `:is()` selectors (in output) for easier overriding -- Removed `.title` suffix on translations -- Removed legacy method for providing page title in feedback URL -- Removed support for indexing only titles in search -- Removed support for custom search transforms -- Removed support for custom search workers -- Removed temporary snow feature (easter egg) - -__Fixes__ - -- Fixed Norwegian and Korean language code -- Fixed detection of composition events in search interface -- Fixed search plugin not using title set via front matter -- Fixed search highlighting of tags -- Fixed search sharing URL using post transformed string -- Fixed theme-color meta tag getting out-of-sync with palette toggle -- Fixed prev/next page keyboard navigation when footer is not present -- Fixed overflowing navigation tabs not being scrollable -- Fixed inclusion of code block line numbers from search - ---- - -### 8.5.11 <small>November 30, 2022</small> { id="8.5.11" } - -- Let it snow, see https://twitter.com/squidfunk/status/1597939243090788352 - -### 8.5.10 <small>November 11, 2022</small> { id="8.5.10" } - -- Adjusted CSS to better allow for custom primary and accent colors -- Fixed #4620: Primary color is not applied (8.5.9 regression) - -### 8.5.9 <small>November 8, 2022</small> { id="8.5.9" } - -- Fixed #4600: Illegible link colors for black and white primary colors -- Fixed #4594: Need to set schema to change link color - -### 8.5.8 <small>November 3, 2022</small> { id="8.5.8" } - -- Added support for always showing settings in cookie consent -- Fixed #4571: Buttons invisible if primary color is `white` or `black` -- Fixed #4517: Illegible note in sequence diagram when using `slate` scheme - -### 8.5.7 <small>October 22, 2022</small> { id="8.5.7" } - -- Deprecated additional admonition qualifiers to reduce size of CSS -- Fixed #4511: Search boost does not apply to sections - -### 8.5.6 <small>October 2, 2022</small> { id="8.5.6" } - -- Modernized appearance of admonitions (with fallback, see docs) -- Improved appearance of inline code blocks in admonition titles - -### 8.5.5 <small>October 1, 2022</small> { id="8.5.5" } - -- Updated MkDocs to 1.4 -- Fixed compatibility issues with MkDocs 1.4 -- Fixed #4430: build error when enabling consent without repository URL - -### 8.5.4 <small>September 30, 2022</small> { id="8.5.4" } - -- Fixed expand icons shift on sidebar overflow (using `scrollbar-gutter`) -- Fixed #4429: Text in sequence diagrams overflows in Firefox - -### 8.5.3 <small>September 20, 2022</small> { id="8.5.3" } - -- Fixed build error when enabling cookie consent without analytics -- Fixed #4381: Code blocks render ligatures for some fonts - -### 8.5.2 <small>September 18, 2022</small> { id="8.5.2" } - -- Updated Mermaid.js to version 9.1.7 -- Fixed overly large headlines in search results (8.5.0 regression) -- Fixed #4358: Navigation sections appear as clickable (8.5.0 regression) -- Fixed #4356: GitHub repository statistics fetched before cookie consent - -### 8.5.1 <small>September 15, 2022</small> { id="8.5.1" } - -- Fixed #4366: Removed dependencies with native extensions - -### 8.5.0 <small>September 13, 2022</small> { id="8.5.0" } - -- Added support for social cards -- Added support for code annotation anchor links (deep linking) -- Added support for code annotation comment stripping (syntax modifier) -- Added support for sidebars scrolling automatically to active item -- Added support for anchor following table of contents (= auto scroll) -- Added support for tag icons - -### 8.4.4 <small>September 12, 2022</small> { id="8.4.4" } - -- Moved comments integration to separate partial (`comments.html`) - -### 8.4.3 <small>September 7, 2022</small> { id="8.4.3" } - -- Added Simple Icons to bundled icons (+2,300 icons) -- Added support for changing edit icon -- Moved page actions to separate partial (`actions.html`) -- Fixed #4291: Version switching doesn't stay on page when anchors are used -- Fixed #4327: Links in data tables do not receive link styling - -### 8.4.2 <small>August 27, 2022</small> { id="8.4.2" } - -- Updated Slovenian translations -- Fixed #4277: Feedback widget hidden after navigation with instant loading -- Fixed numeric tags in front matter breaking search functionality - -### 8.4.1 <small>August 21, 2022</small> { id="8.4.1" } - -- Updated Croatian and Hebrew translations - -### 8.4.0 <small>August 13, 2022</small> { id="8.4.0" } - -- Added support for cookie consent -- Added support for feedback widget (Was this page helpful?) -- Added support for dismissable announcement bar -- Added Armenian, Lithuanian, Tagalog, and Urdu translations - -### 8.3.9 <small>July 4, 2022</small> { id="8.3.9" } - -- Updated Taiwanese translations for search -- Allow ids for content tabs with special characters (for mkdocstrings) -- Fixed #4083: home not clickable when using versioning (8.3.5 regression) - -### 8.3.8 <small>June 24, 2022</small> { id="8.3.8" } - -- Fixed #4053: Limit width of videos to content area -- Fixed empty tags in front matter breaking search - -### 8.3.7 <small>June 22, 2022</small> { id="8.3.7" } - -- Fixed search being stuck initializing when using tags (8.3.4 regression) - -### 8.3.6 <small>June 16, 2022</small> { id="8.3.6" } - -- Fixed #4028: Links not clickable when using versioning (8.3.5 regression) - -### 8.3.5 <small>June 14, 2022</small> { id="8.3.5" } - -- Fixed #4012: Stay on page not working for alias of active version - -### 8.3.4 <small>June 11, 2022</small> { id="8.3.4" } - -- Fixed #4004: Tags with multiple words not searchable - -### 8.3.3 <small>June 7, 2022</small> { id="8.3.3" } - -- Fixed #4000: Mermaid diagrams too dark in dark mode (8.3.0 regression) - -### 8.3.2 <small>June 5, 2022</small> { id="8.3.2" } - -- Fixed #3987: Custom admonition icons don't work when defining color palette - -### 8.3.1 <small>June 4, 2022</small> { id="8.3.1" } - -- Bump required Jinja version to 3.0.2 -- Removed unnecessary conditions in templates -- Fixed scroll offset when content tabs are brought into view -- Fixed #3977: Content tabs snapping oddly in Firefox -- Fixed #3983: Missing condition in footer partial (8.3.0 regression) - -### 8.3.0 <small>June 2, 2022</small> { id="8.3.0" } - -- Added support for custom admonition icons -- Added support for linking of content tabs -- Added support for boosting pages in search -- Added support for hiding footer navigation -- Added previous/next indicators to content tabs -- Improved typeset link colors in light and dark modes - -### 8.2.16 <small>May 28, 2022</small> { id="8.2.16" } - -- Fixed #3957: Only animate code annotations when visible (save CPU cycles) - -### 8.2.15 <small>May 14, 2022</small> { id="8.2.15" } - -- Added Uzbek translations -- Fixed spacing for code block results in content tabs - -### 8.2.14 <small>May 8, 2022</small> { id="8.2.14" } - -- Fixed missing top right rounded border on admonition -- Fixed #3886: `4xx` status codes not handled when using instant loading - -### 8.2.13 <small>May 2, 2022</small> { id="8.2.13" } - -- Fixed #3865: Tags index links to tagged pages 404 on Windows -- Fixed #3866: Bump required Python version from 3.6+ to 3.7+ - -### 8.2.12 <small>April 30, 2022</small> { id="8.2.12" } - -- Added support for GitHub-style hash fragments for dark/light images -- Improved rendering of nested code blocks in content tabs and annotations -- Fixed #3862: Upgraded to latest Pygments and Python Markdown Extensions - -### 8.2.11 <small>April 25, 2022</small> { id="8.2.11" } - -- Temporarily pinned Pygments to `<2.12` -- Temporarily pinned Python Markdown Extensions to `<9.4` -- Improved rendering of code annotation markers - -### 8.2.10 <small>April 24, 2022</small> { id="8.2.10" } - -- Added Macedonian translations -- Updated Mermaid.js to version 9.0.1 -- Switched sidebar title in mobile navigation to bold font -- Fixed color of arrows in class and state diagrams for dark mode -- Fixed #3836: Inline admonitions overlayed by code block titles - -### 8.2.9 <small>April 8, 2022</small> { id="8.2.9" } - -- Mitigate flicker on color palette switch by disabling all transitions -- Fixed search suggestions not triggered when following deep link -- Fixed incorrectly computed header height when using instant loading -- Fixed #3782: Admonition titles have extra pixels on wide screens in Firefox -- Fixed #3802: Always render table of contents container (except when hidden) - -### 8.2.8 <small>March 27, 2022</small> { id="8.2.8" } - -- Bumped MkDocs version to 1.3.0 to mitigate breaking changes in Jinja -- Reverted Jinja version range limitation (added in 8.2.7) -- Improved styling of annotations and fixed borders of code blocks in tabs -- Added background color to code blocks in focused/hovered links -- Added check in tags plugin whether tags overview page exists -- Fixed #3744: Content tab indicator on wrong position when using back button - -### 8.2.7 <small>March 24, 2022</small> { id="8.2.7" } - -- Temporarily limit Jinja version range to < 3.1 due to breaking changes - -### 8.2.6 <small>March 23, 2022</small> { id="8.2.6" } - -- Fixed #3695: Deprecation warning for unescaped backslashes in templates -- Fixed #3696: Annotations not mounted in some Terraform code blocks -- Fixed #3698: Annotations not mounted in long code blocks (8.2.5 regression) - -### 8.2.5 <small>March 6, 2022</small> { id="8.2.5" } - -- Fixed #3596: Mermaid not working when headline with name 'Mermaid' present -- Fixed #3643: Reduce time to render pages with thousands of code blocks -- Fixed #3665: Missing styles for Mermaid.js flowcharts cluster labels - -### 8.2.4 <small>March 2, 2022</small> { id="8.2.4" } - -- Fixed malformed Google Fonts URL when a font setting was omitted -- Fixed #3648: Fixed specificity issue with admonitions in lists -- Fixed #3653: Invalid outdated version banner URL when using instant loading - -### 8.2.3 <small>February 27, 2022</small> { id="8.2.3" } - -- Fixed #3578: Active element in table of contents off-by-one on large screens - -### 8.2.2 <small>February 26, 2022</small> { id="8.2.2" } - -- Added automatic removal of query parameter when search is closed -- Fixed #3599: Anchors always overriden when using navigation tracking - -### 8.2.1 <small>February 17, 2022</small> { id="8.2.1" } - -- Fixed module `material.plugins` not being found (8.2.0 regression) - -### 8.2.0 <small>February 17, 2022</small> { id="8.2.0" } - -- Added native support for Mermaid.js diagrams -- Added native support for tags (with search integration) -- Added support for staying on page when switching versions - -### 8.1.11 <small>February 10, 2022</small> { id="8.1.11" } - -- Added Portuguese (Brasilian) translations -- Updated FontAwesome to v6 – [check which icons were renamed here] -- Fixed #3545: Color palette toggle and search overlaying version selector - - [check which icons were renamed here]: https://fontawesome.com/docs/web/setup/upgrade/whats-changed#icons-renamed-in-version-6 - -### 8.1.10 <small>February 6, 2022</small> { id="8.1.10" } - -- Fixed cutoff of very wide logos in the sidebar on mobile - -### 8.1.9 <small>January 30, 2022</small> { id="8.1.9" } - -- [Added support for `mkdocs.yml` validation and auto-complete][validation] -- Fixed errors in Latvian translations - - [validation]: ../creating-your-site.md#minimal-configuration - -### 8.1.8 <small>January 23, 2022</small> { id="8.1.8" } - -- Added Latvian translations -- Updated Giscus example integration with dynamic theme change support -- Fixed #3479: Back-to-top button not hidden when using sticky navigation tabs -- Fixed #3491: Logo in header and drawer doesn't honor aspect ratio - -### 8.1.7 <small>January 16, 2022</small> { id="8.1.7" } - -- Improved back-to-top button behavior - now not shown on anchor jump - -### 8.1.6 <small>January 11, 2022</small> { id="8.1.6" } - -- Fixed spacing of blockquotes (8.1.5 regression) -- Fixed edge cases for rounded corners on code blocks (8.1.5 regression) -- Fixed issues with code annotation line heights - -### 8.1.5 <small>January 9, 2022</small> { id="8.1.5" } - -- Improved browser support: Chrome 49+, Safari 10+, Firefox 53+, Edge 79+ -- Improved rendering of inline code blocks in headlines -- Added Bahasa Malaysian translations -- Fixed #3354: MathJax formulas show vertical scrollbar - -### 8.1.4 <small>January 2, 2022</small> { id="8.1.4" } - -- Added indicator to navigation expander icon -- Improved support for reduced motion preference -- Fixed jitter of active content tab indicator - -### 8.1.3 <small>December 19, 2021</small> { id="8.1.3" } - -- Added animation to active content tab indicator -- Fixed #3360: Highlighted lines add blank lines in copied text -- Fixed usage of subsequent index files when using section index pages - -### 8.1.2 <small>December 15, 2021</small> { id="8.1.2" } - -- Switched CSS sources to logical properties -- Added transformation of logical properties to `ltr`/`rtl` equivalents -- Fixed spacing for admonitions inside lists (8.1.1 regression) - -### 8.1.1 <small>December 13, 2021</small> { id="8.1.1" } - -- Added support for `#only-light` and `#only-dark` image hash fragments -- Fixed copy-to-clipboard adding blank lines when using line anchors -- Fixed code annotation directionality for right-to-left languages -- Fixed header title positioning for right-to-left languages -- Fixed admonition borders for right-to-left languages (8.0.0 regression) -- Fixed footer navigation link positioning (8.0.0 regression) -- Fixed footer navigation title breaking out of container when too long -- Fixed shrinking arrow in navigation title when too long -- Fixed #3343: Filtered stopwords appear as missing search terms -- Fixed #3346: Site unusable due to usage of `:not()` (Firefox 78 ESR) - -### 8.1.0 <small>December 10, 2021</small> { id="8.1.0" } - -- Added basic support for code block line anchors -- Switched code annotation markers to `+` signs to improve usability -- Switched main site title to bold font -- Improved admonition icon positioning to align when `font-size` is increased -- Improved and simplified footnotes CSS -- Improved and simplified code annotation positioning -- Fixed syntax error in Russian translations - -### 8.0.5 <small>December 6, 2021</small> { id="8.0.5" } - -- Fixed #3302: Footer refactoring induced ellipsis in some browsers -- Fixed #3313: Details always rendered closed on load (8.0.4 regression) - -### 8.0.4 <small>December 4, 2021</small> { id="8.0.4" } - -- Improved support for deeply nested code annotations -- Improved code annotation and copy-to-clipboard interop -- Improved styling for code annotations inside admonitions -- Fixed #3274: Invalid anchor positioning when using instant loading -- Fixed #3294: Lists after code blocks without code annotations disappearing -- Fixed several positioning issues for code annotations -- Fixed JavaScript source map roots - -### 8.0.3 <small>December 2, 2021</small> { id="8.0.3" } - -- Removed deprecated `google_analytics` setting (was forgotten in 8.0.0) -- Fixed syntax error in Swedish and Polish translations -- Fixed #3283: Invalid back-to-top button position with sticky navigation tabs -- Fixed #3285: Default details marker showing due to Safari bug - -### 8.0.2 <small>November 30, 2021</small> { id="8.0.2" } - -- Fixed #3275: Code annotations always disappear on click - -### 8.0.1 <small>November 28, 2021</small> { id="8.0.1" } - -- Improved rendering of code annotation markers -- Fixed #3265: Wrong margin on nested admonitions -- Fixed wrong `box-sizing` for code annotations in details - -### 8.0.0 <small>November 28, 2021</small> { id="8.0.0" } - -- Added support for code annotations -- Added support for anchor tracking -- Added support for version warning -- Added `copyright` partial for easier override -- Removed deprecated content tabs legacy implementation -- Removed deprecated `seealso` admonition type -- Removed deprecated `site_keywords` setting (unsupported by MkDocs) -- Removed deprecated prebuilt search index support -- Removed deprecated web app manifest – use customization -- Removed `extracopyright` variable – use new `copyright` partial -- Removed Disqus integation – use customization -- Switched to `:is()` selectors for simple selector lists -- Switched autoprefixer from `last 4 years` to `last 2 years` -- Improved CSS overall to match modern standards -- Improved CSS variable semantics for fonts -- Improved extensibility by restructuring partials -- Improved handling of `details` when printing -- Improved keyboard navigation for footnotes -- Fixed #3214: Search highlighting breaks site when empty - ---- - -### 7.3.6 <small>October 30, 2021</small> { id="7.3.6" } - -- Added support for adding titles to code blocks - -### 7.3.5 <small>October 27, 2021</small> { id="7.3.5" } - -- Added support for setting table of contents title via `mkdocs.yml` -- Fixed back-to-top button position for right-to-left languages - -### 7.3.4 <small>October 17, 2021</small> { id="7.3.4" } - -- Bumped MkDocs version to 1.2.3 to mitigate [CVE-2021-40978] -- Fixed spacing issues when using integrate table of contents with tabs -- Fixed some spacings issues for right-to-left languages -- Fixed race condition in search initialization - - [CVE-2021-40978]: https://nvd.nist.gov/vuln/detail/CVE-2021-40978 - -### 7.3.3 <small>October 11, 2021</small> { id="7.3.3" } - -- Rewrite of entire documentation -- Adjusted height of new content tabs to match single line code blocks -- Fixed new content tabs missing right padding in some browsers on overflow -- Fixed new content tabs bleeding out of flex container on overflow -- Fixed new content tabs overflow scrolling bugs on some browsers -- Fixed new content tabs stealing keyboard access when active -- Fixed some spacings issues for right-to-left languages - -### 7.3.2 <small>October 6, 2021</small> { id="7.3.2" } - -- Deprecated prebuilding of search index -- Improved graceful handling of broken search for `file://` -- Added minimum Jinja version to list of requirements -- Fixed #3071: Section index pages render empty directories -- Fixed margin issues when using navigation tabs (7.3.1 regression) -- Fixed search placeholder sometimes being shown too early - -### 7.3.1 <small>October 2, 2021</small> { id="7.3.1" } - -- Added new experimental content tabs implementation -- Fixed #3069: GitHub stats broken for users/orgs (7.1.0 regression) -- Fixed #3070: Sections not linking to index page -- Fixed title not linking to index page when using tabs -- Fixed Disqus integration when using instant loading -- Fixed some spacing issues for right-to-left languages -- Fixed syntax error in Serbian translations - -### 7.3.0 <small>September 23, 2021</small> { id="7.3.0" } - -- Added support for sticky navigation tabs -- Added support for section index pages -- Added support for removing generator notice - -### 7.2.8 <small>September 20, 2021</small> { id="7.2.8" } - -- Fixed #3039: Search modal overlays menu on mobile (7.2.7 regression) - -### 7.2.7 <small>September 19, 2021</small> { id="7.2.7" } - -- Updated Serbian and Serbo-Croatian translations -- Improved appearance of outline on details -- Fixed #2934: Scrollbar when header is hidden on some mobile browsers -- Fixed #3032: Anchor in details doesn't open on load (7.0.0 regression) -- Fixed back-to-top button being focusable when invisible -- Fixed broken admonition icons (removed in upstream) - -### 7.2.6 <small>September 1, 2021</small> { id="7.2.6" } - -- Fixed rendering of `blockquote` elements (7.0.0 regression) -- Fixed #2973: Custom search worker setting ignored - -### 7.2.5 <small>August 25, 2021</small> { id="7.2.5" } - -- Updated Portuguese translations -- Fixed execution of RxJS teardown logic (7.2.3 regression) -- Fixed #2970: Search results show escaped characters (7.2.2 regression) - -### 7.2.4 <small>August 11, 2021</small> { id="7.2.4" } - -- Fixed #2926: Version selector not working (7.2.3 regression) -- Fixed #2929: Missing CSS class for banner (consistency with Insiders) - -### 7.2.3 <small>August 9, 2021</small> { id="7.2.3" } - -- Slight facelift of data tables, now closer to Material Design -- Fixed instant loading not respecting clicks on search results -- Fixed #2881: Invalid anchor offsets when using instant loading - -### 7.2.2 <small>July 31, 2021</small> { id="7.2.2" } - -- Updated Korean translations -- Fixed #2879: Search highlighting does not properly escape HTML - -### 7.2.1 <small>July 25, 2021</small> { id="7.2.1" } - -- Fixed #2862: Back-to-top button overlays active search bar - -### 7.2.0 <small>July 21, 2021</small> { id="7.2.0" } - -- Added support for search suggestions to save keystrokes -- Added support for search highlighting -- Added support for search sharing (i.e. deep linking) - -### 7.1.11 <small>July 18, 2021</small> { id="7.1.11" } - -- Updated Spanish and Galician translations - -### 7.1.10 <small>July 10, 2021</small> { id="7.1.10" } - -- Refactored appearance of back-to-top button -- Fixed graceful handling of search when browsing locally - -### 7.1.9 <small>June 25, 2021</small> { id="7.1.9" } - -- Improved search language support for Thai and Hindi -- Fixed #2761: License comments lined up at end of file - -### 7.1.8 <small>June 12, 2021</small> { id="7.1.8" } - -- Refactored analytics integration (because of MkDocs 1.2) -- Added support for Google Analytics 4 (`gtag.js`) -- Fixed missing escape for `aria-label` in footer links - -### 7.1.7 <small>June 6, 2021</small> { id="7.1.7" } - -- Improved screen reader support - -### 7.1.6 <small>May 30, 2021</small> { id="7.1.6" } - -- Deprecated `seealso` admonition qualifier -- Added Mongolian and updated Chinese translations -- Fixed #2429: Version selector not touch-friendly on Android devices -- Fixed #2703: Printed 'Initializing search' albeit ready on mobile - -### 7.1.5 <small>May 19, 2021</small> { id="7.1.5" } - -- Fixed #2655: Details breaking page margins on print - -### 7.1.4 <small>May 6, 2021</small> { id="7.1.4" } - -- Added support for git-revision-date-localized plugin creation date -- Improved footnote styles on `:target` and `:focus` - -### 7.1.3 <small>April 24, 2021</small> { id="7.1.3" } - -- Fixed #2586: Empty table of contents shown (7.1.2 regression) - -### 7.1.2 <small>April 18, 2021</small> { id="7.1.2" } - -- Fixed #2554: List markers sometimes overlap floated elements -- Fixed #2563: Adding a class to a `h1` breaks the table of contents -- Fixed #2566: Back-to-top button clickable when invisible - -### 7.1.1 <small>April 10, 2021</small> { id="7.1.1" } - -- Fixed #2501: Nested definition lists compound bottom margin -- Fixed #2508: Switch `extracopyright` block to template variable -- Fixed #2533: Search (and other parts) not working in Safari <14 -- Fixed #2538: Visual quirk when opening language selector - -### 7.1.0 <small>March 29, 2021</small> { id="7.1.0" } - -- Added support for back-to-top button -- Added support for color palette toggle -- Added latest release to repository info (GitHub) -- Slight facelift of repository info (lighter fonts, spacing and icons) - -### 7.0.7 <small>March 28, 2021</small> { id="7.0.7" } - -- Updated Hungarian translations -- Fixed #2466: Docker image not based on latest Python and Alpine -- Fixed #2488: Inconsistent header shadow behavior -- Fixed #2492: Inline code blocks in admonition titles missing background - -### 7.0.6 <small>March 14, 2021</small> { id="7.0.6" } - -- Added trailing slash to version selector URL -- Added support for out-of-order anchors in table of contents -- Added `extra.homepage` option to link logo to arbitrary URL -- Improved security of Docker image (always update apk) -- Fixed horizontal spacing for nested inline admonitions -- Fixed text color of nested code blocks inside links -- Fixed version selector to always use version title -- Fixed logo link when using versioning with instant loading - -### 7.0.5 <small>March 7, 2021</small> { id="7.0.5" } - -- Added `extracopyright` block to allow for custom copyright info -- Fixed evaluation of third-party scripts when using instant loading -- Fixed edge cases when using instant loading without directory URLs -- Fixed handling of version selector when using instant loading -- Fixed regression with header title not being updated correctly -- Fixed expanded sections not opening on first click (7.0.4 regression) - -### 7.0.4 <small>March 4, 2021</small> { id="7.0.4" } - -- Added Icelandic translations -- Fixed #2386: Section close requires two clicks (navigation expansion) -- Fixed console error when search is disabled (7.0.0 regression) -- Fixed localsearch integration (7.0.0 regression) - -### 7.0.3 <small>February 26, 2021</small> { id="7.0.3" } - -- Fixed JavaScript errors in older browsers (target ES2020 -> ES2015) - -### 7.0.2 <small>February 25, 2021</small> { id="7.0.2" } - -- Fixed #2343: Invalid source map URLs for JS and CSS files -- Fixed #2347: Version selector missing when using versioning - -### 7.0.1 <small>February 24, 2021</small> { id="7.0.1" } - -- Fixed #2334: Google Analytics triggers page view twice (7.0.0 regression) -- Fixed #2336: Details bleed into inline admonitions -- Fixed #2337: Images don't align correctly (7.0.0 regression) - -### 7.0.0 <small>February 22, 2021</small> { id="7.0.0" } - -- Added support for deploying multiple versions -- Added support for integrating a language selector -- Added support for rendering admonitions as inline blocks -- Rewrite of the underlying reactive architecture -- Removed Webpack in favor of reactive build strategy (-480 dependencies) -- Fixed keyboard navigation for code blocks after content tabs switch - -### 6.2.8 <small>February 4, 2021</small> { id="6.2.8" } - -- Updated Japanese and Polish translations -- Fixed #2261: Print dialog auto-closing when using instant loading - -### 6.2.7 <small>January 31, 2021</small> { id="6.2.7" } - -- Fixed #2251: Updated Docker image to latest Alpine Linux - -### 6.2.6 <small>January 26, 2021</small> { id="6.2.6" } - -- Added Bulgarian translations -- Fixed #2233: Search not shown when using header autohiding - -### 6.2.5 <small>January 17, 2021</small> { id="6.2.5" } - -- Fixed syntax error in Swedish translations -- Optimized navigation partials to improve build speed for huge docs - -### 6.2.4 <small>January 9, 2021</small> { id="6.2.4" } - -- Fixed #2156: Missing syntax highlighting for binary numbers -- Fixed #2186: Disqus showing on 404 page - -### 6.2.3 <small>December 27, 2020</small> { id="6.2.3" } - -- Added back hidden overflow on root container -- Fixed #2142: MathJax formulas sometimes have vertical scrollbars - -### 6.2.2 <small>December 22, 2020</small> { id="6.2.2" } - -- Removed Markdown version range limit (6.2.0 regression) - -### 6.2.1 <small>December 22, 2020</small> { id="6.2.1" } - -- Fixed all import and asset paths in templates (6.2.0 regression) -- Downgraded webpack-asset-manifest-plugin - broke all asset paths - -### 6.2.0 <small>December 22, 2020</small> { id="6.2.0" } - -- Added support for navigation sections -- Added support for navigation expansion -- Added support for integrating table of contents into navigation -- Added support for autohiding header on scroll -- Added support for hiding navigation and table of contents per page -- Added support for arbitrary items in navigation tabs -- Refactored navigation tabs to simplify grouping behavior -- Fixed anchor offset for permalinks in Safari (partial revert) -- Fixed #2098: Active tab sometimes not highlighted correctly -- Improved appearance for horizontal rulers -- Improved Spanish and Swedish translations - -### 6.1.7 <small>December 6, 2020</small> { id="6.1.7" } - -- Fixed #2081: Fixed stats for private GitHub repositories -- Fixed alignment for admonition icon alignment for right-to-left languages - -### 6.1.6 <small>November 22, 2020</small> { id="6.1.6" } - -- Fixed #2048: Math formulas show scrollbars (Windows) - -### 6.1.5 <small>November 15, 2020</small> { id="6.1.5" } - -- Fixed search reset button not showing/hiding correctly - -### 6.1.4 <small>November 7, 2020</small> { id="6.1.4" } - -- Fixed sidebar jitter when scrolling footer into view - -### 6.1.3 <small>November 5, 2020</small> { id="6.1.3" } - -- Added support for keywords `meta` tag -- Fixed #2027: Line numbers don't scale with smaller font size -- Fixed link colors for black and white on `slate` color scheme -- Removed focus outline on scrolling code blocks for pointer devices - -### 6.1.2 <small>October 31, 2020</small> { id="6.1.2" } - -- Fixed sizing of icons in admonitions, task lists, etc. (6.1.1 regression) - -### 6.1.1 <small>October 31, 2020</small> { id="6.1.1" } - -- Fixed #2019: Page title not correctly updated when using instant loading - -### 6.1.0 <small>October 17, 2020</small> { id="6.1.0" } - -- Fixed #1973: Added support for printing in dark mode -- Fixed #1974: Added support for printing content tabs -- Fixed #1995: Improved customizability of details extension - -### 6.0.2 <small>October 4, 2020</small> { id="6.0.2" } - -- Added Georgian translations -- Added escaping for link `title` attributes where necessary -- Fixed #1956: Pages with whitespace in names have invalid links in search -- Removed unnecessary (duplicated) link `title` attributes - -### 6.0.1 <small>September 26, 2020</small> { id="6.0.1" } - -- Fixed stemmer support for `file://` protocol through `iframe-worker` -- Fixed details marker showing for search result in Firefox -- Fixed tabbing behavior when search query is not empty -- Switched TypeScript compilation target to ES2015 -- Reduced size of JavaScript by 30% (`176kb` → `124kb`) -- Removed `mkdocs` and `readthedocs` themes from Docker image - -### 6.0.0 <small>September 25, 2020</small> { id="6.0.0" } - -- Improved search result look and feel -- Improved search result stability while typing -- Improved search result grouping (pages + headings) -- Improved search result relevance and scoring -- Added display of missing query terms to search results -- Reduced size of vendor bundle by 25% (`84kb` → `67kb`) -- Reduced size of the Docker image to improve CI build performance -- Removed hero partial in favor of custom implementation -- Removed deprecated front matter features - ---- - -### 5.5.14 <small>September 23, 2020</small> { id="5.5.14" } - -- Improved spacing around image captions -- Fixed #1939: Long tables cause header overlap in print view - -### 5.5.13 <small>September 19, 2020</small> { id="5.5.13" } - -- Improved abbreviations on touch devices - -### 5.5.12 <small>August 31, 2020</small> { id="5.5.12" } - -- Fixed #1638: occasional `404` for images when using instant loading - -### 5.5.11 <small>August 28, 2020</small> { id="5.5.11" } - -- Fixed Disqus integration, as the minifier killed the config - -### 5.5.10 <small>August 28, 2020</small> { id="5.5.10" } - -- Improved rendering by moving Disqus integration after page load -- Fixed #1887: Moved navigation icons to CSS to reduce size of HTML - -### 5.5.9 <small>August 26, 2020</small> { id="5.5.9" } - -- Added Esperanto translations -- Fixed #1884: External links not included in navigation tabs - -### 5.5.8 <small>August 23, 2020</small> { id="5.5.8" } - -- Removed focus outline on `details` and content tabs for pointer devices -- Improved accessibility of content tabs (now navigable via arrow keys) -- Fixed #1877: `404` on search index when search is disabled -- Fixed some memleaks in observable subscriptions -- Fixed color definitions for `theme-color` meta tag - -### 5.5.7 <small>August 16, 2020</small> { id="5.5.7" } - -- Improved contrast ratio to 4.5:1 for syntax highlighting -- Improved contrast ratio to 4.5:1 for table of contents - -### 5.5.6 <small>August 12, 2020</small> { id="5.5.6" } - -- Switched base template for `404.html` to `main.html` -- Fixed #1864: GitHub organisation stats not loading - -### 5.5.5 <small>August 11, 2020</small> { id="5.5.5" } - -- Fixed missing vendor and worker distribution files - -### 5.5.4 <small>August 11, 2020</small> { id="5.5.4" } - -- Added support for sortable data tables - -### 5.5.3 <small>August 4, 2020</small> { id="5.5.3" } - -- Fixed search for languages other than English (5.5.1 regression) - -### 5.5.2 <small>August 3, 2020</small> { id="5.5.2" } - -- Improved highlight colors and spacing for `ins`, `del` and `mark` -- Changed some keyboard symbols for better equivalents -- Removed focus `outline` for details and code blocks on touch devices -- Fixed margins for admonitions (5.5.1 regression) -- Fixed too small content tab labels (5.5.1 regression) -- Fixed icon repeating for custom admonition icons - -### 5.5.1 <small>August 1, 2020</small> { id="5.5.1" } - -- Improved typesetting by basing `font-size` and spacings on `em` -- Improved print view by slightly scaling down `font-size` -- Changed custom site title (metadata) to be suffixed with site name -- Fixed top- and bottom spacing of paragraphs inside table cells - -### 5.5.0 <small>July 24, 2020</small> { id="5.5.0" } - -- Rewrite of entire documentation -- Rewrite of syntax highlighting to be customizable with CSS variables -- Improved syntax highlighting to work with light and dark theme -- Improved `slate` color scheme to be more customizable and easier on the eyes -- Added licenses of icon sets to distribution files -- Fixed stale document titles in Google Analytics when using instant loading -- Fixed width of previous and next footer links for tablet and above -- Fixed issues with top scroll margin for footnotes -- Fixed top margin for tabbed content when using a JavaScript highlighter -- Deprecated metadata-based redirects, source links and heroes - -### 5.4.0 <small>June 29, 2020</small> { id="5.4.0" } - -- Added support to wrap searches in quotes to switch from `OR` to `AND` -- Fixed highlighting of numbers in search results - -### 5.3.3 <small>June 24, 2020</small> { id="5.3.3" } - -- Added Bengali translations -- Fixed #1773: Search for numbers does not return any result (regression) - -### 5.3.2 <small>June 21, 2020</small> { id="5.3.2" } - -- Improved search typeahead experience with non-Latin characters -- Fixed #1753: Japanese search doesn't work anymore - -### 5.3.1 <small>June 20, 2020</small> { id="5.3.1" } - -- Fixed #1761: Duplication of search worker when subscribing to observable - -### 5.3.0 <small>June 15, 2020</small> { id="5.3.0" } - -- Added support for color schemes based on user preference -- Fixed #1755: Tokenizer separator setting ignored - -### 5.2.3 <small>June 6, 2020</small> { id="5.2.3" } - -- Improved search typeahead behavior for some languages (`de`, `fr`, ...) -- Improved styles for scrollbars on Firefox -- Fixed #1741: Removed `preconnect` hint for Google Analytics - -### 5.2.2 <small>May 26, 2020</small> { id="5.2.2" } - -- Fixed #1728: Legacy Edge doesn't support `deg` values in `hsla` colors - -### 5.2.1 <small>May 22, 2020</small> { id="5.2.1" } - -- Fixed color of links in table headers, e.g. footnotes -- Fixed color scheme not being applied without primary or accent color -- Fixed hover delay for links inside code blocks - -### 5.2.0 <small>May 18, 2020</small> { id="5.2.0" } - -- Added color schemes implementation + dark mode -- Fixed #1583: Missing option for separate link colors - -### 5.1.7 <small>May 16, 2020</small> { id="5.1.7" } - -- Added keyboard focus support for overflowing code blocks -- Fixed #1696: Infinite loop in some cases when using instant loading - -### 5.1.6 <small>May 9, 2020</small> { id="5.1.6" } - -- Added Burmese translations -- Added general anchor offset solution using `scroll-margin-top` -- Fixed #1653: Instant loading shouldn't intercept links to `*.html` files - -### 5.1.5 <small>May 3, 2020</small> { id="5.1.5" } - -- Added `name` attribute for social links to set link `title` -- Fixed #1623: Allow arbitrary links in social links -- Fixed #1664: Height of `iframe` is not adjustable -- Fixed #1667: Sidebars are scrolled to bottom on load (bug in Chrome 81+) - -### 5.1.4 <small>April 30, 2020</small> { id="5.1.4" } - -- Switched to [@mdi/svg] Material Design icon package -- Fixed #1655: Navigation may disappear after switching viewports -- Fixed #1659: Unnecessary scrollbar for search results on Windows -- Fixed occasional distortions for images with explicit dimensions -- Fixed errors in German translations - - [@mdi/svg]: https://github.com/Templarian/MaterialDesign-SVG - -### 5.1.3 <small>April 26, 2020</small> { id="5.1.3" } - -- Fixed overflowing content area after switch to flexbox - -### 5.1.2 <small>April 26, 2020</small> { id="5.1.2" } - -- Added status information to search observable -- Added status information to search modal -- Removed announcement bar from print media -- Removed media query packing logic due to race conditions -- Fixed #1520: Gracefully disable search on `file://` if Worker fails -- Fixed re-submission of query after search is initialized -- Fixed jitter of sidebars on all browsers by switching to `sticky` - -### 5.1.1 <small>April 17, 2020</small> { id="5.1.1" } - -- Added new FontAwesome icons -- Fixed #1609: Instant loading doesn't honor `target=_blank` -- Fixed GitHub stars count rounding errors -- Fixed GitLab stars count retrieval - -### 5.1.0 <small>April 12, 2020</small> { id="5.1.0" } - -- Added support for icons from Markdown through [mkdocs-material-extensions] - - [mkdocs-material-extensions]: https://github.com/facelessuser/mkdocs-material-extensions - -### 5.0.2 <small>April 10, 2020</small> { id="5.0.2" } - -- Added CSS source maps to distribution files -- Fixed errors in Chinese (Traditional) translations -- Fixed creation of stale directory on installation from git -- Improved overflow scrolling behavior on iOS (reduced bundle size by `4kb`) - -### 5.0.1 <small>April 7, 2020</small> { id="5.0.1" } - -- Fixed syntax error in Spanish translation - -### 5.0.0 <small>April 7, 2020</small> { id="5.0.0" } - -- Reactive architecture – try `app.dialog$.next("Hi!")` in the console -- Instant loading – make Material behave like a Single Page Application -- Improved CSS customization with CSS variables – set your brand's colors -- Improved CSS resilience, e.g. proper sidebar locking for customized headers -- Improved icon integration and configuration – now including over 5k icons -- Added possibility to use any icon for logo, repository and social links -- Search UI does not freeze anymore (moved to web worker) -- Search index built only once when using instant loading -- Improved extensible keyboard handling -- Support for prebuilt search indexes -- Support for displaying stars and forks for GitLab repositories -- Support for scroll snapping of sidebars and search results -- Reduced HTML and CSS footprint due to deprecation of Internet Explorer support -- Slight facelifting of some UI elements (admonitions, tables, ...) - -### 4.6.3 <small>February 14, 2020</small> { id="4.6.3" } - -- Removed optional third-party plugins from `requirements.txt` -- Updated Docker image to contain all supported third-party plugins - -### 4.6.2 <small>February 8, 2020</small> { id="4.6.2" } - -- Added Romanian translations -- Fixed #1451: Inconsistent spacing for fenced code blocks - -### 4.6.1 <small>February 8, 2020</small> { id="4.6.1" } - -- Fixed #1324: Metadata author only rendering first character -- Fixed #1393: Set `tabindex` to `0` for skip to content link -- Fixed code blocks after Markdown 3.2 release -- Fixed errors in Japanese translations -- Improved Google Lighthouse score - -### 4.6.0 <small>December 11, 2019</small> { id="4.6.0" } - -- Added support for [git-revision-date-localized-plugin] -- Fixed invalid character in Google Fonts URL - - [git-revision-date-localized-plugin]: https://github.com/timvink/mkdocs-git-revision-date-localized-plugin - -### 4.5.1 <small>December 2, 2019</small> { id="4.5.1" } - -- Added Thai translations -- Fixed missing assets in GitHub release `.zip` and `.tar.gz` - -### 4.5.0 <small>November 16, 2019</small> { id="4.5.0" } - -- Fixed #1330: Upgraded EmojiOne to Tweomji due to licensing issues -- Fixed #1339: Temporarily pinned PyMdown and Markdown due to -- Fixed errors in Greek translations -- Improved GitHub statistics retrieval - -### 4.4.3 <small>October 3, 2019</small> { id="4.4.3" } - -- Added Estonian translations -- Fixed removal of copyright banners in minified JavaScript -- Removed unnecessary title attributes from links in table of contents - -### 4.4.2 <small>August 27, 2019</small> { id="4.4.2" } - -- Added Afrikaans translations -- Fixed broken page title when `h1` contained HTML tags -- Improved accessibility for IE users -- Removed unnecessary `title` attributes from links in navigation - -### 4.4.1 <small>August 22, 2019</small> { id="4.4.1" } - -- Added support for `black` as a primary color -- Fixed broken footer bar when `h1` contained HTML tags - -### 4.4.0 <small>June 15, 2019</small> { id="4.4.0" } - -- Added Slovenian translations -- Reverted template minification in favor of `mkdocs-minify-plugin` -- Fixed #1114: Tabs don't reappear when default `font-size` is smaller than `16` - -### 4.3.1 <small>May 23, 2019</small> { id="4.3.1" } - -- Fixed spelling error in Danish translations - -### 4.3.0 <small>May 17, 2019</small> { id="4.3.0" } - -- Added support for changing header through metadata title property -- Added `font-display: swap` to Google Font loading logic -- Removed whitespace from templates, saving `4kb` (`.7kb` gzipped) per request -- Fixed alignment of repository icons on tablet and desktop - -### 4.2.0 <small>April 28, 2019</small> { id="4.2.0" } - -- Added Norwegian (Nynorsk) translations -- Fixed loss of focus in non-form input elements due to search hotkeys -- Fixed #1067: Search hotkeys not working for mobile/tablet screensize -- Fixed #1068: Search not correctly aligned for tablet screensize - -### 4.1.2 <small>April 16, 2019</small> { id="4.1.2" } - -- Fixed #1072: HTML tags appearing in navigation link titles - -### 4.1.1 <small>March 28, 2019</small> { id="4.1.1" } - -- Fixed minor CSS errors detected during validation - -### 4.1.0 <small>March 22, 2019</small> { id="4.1.0" } - -- Fixed #1023: Search for Asian languages broken after Lunr.js update -- Fixed #1026: contenteditable elements loose focus on hotkeys - -### 4.0.2 <small>March 1, 2019</small> { id="4.0.2" } - -- Fixed #1012: HTML character entities appear in search result titles - -### 4.0.1 <small>February 13, 2019</small> { id="4.0.1" } - -- Fixed #762, #816: Glitch in sidebar when collapsing items -- Fixed #869: Automatically expand details before printing - -### 4.0.0 <small>February 13, 2019</small> { id="4.0.0" } - -- Added background on hover for table rows -- Removed Google Tag Manager and reverted to Google Analytics -- Removed blocks in partials - Jinja doesn't support them -- Fixed #911: Chrome breaks layout if system language is Chinese (**BREAKING**) -- Fixed #976: Removed FastClick - ---- - -### 3.3.0 <small>January 29, 2019</small> { id="3.3.0" } - -- Moved Google Analytics integration into `head` using Google Tag Manager -- Fixed #972: Unicode slugifier breaks table of contents blur on scroll -- Fixed #974: Additional links in table of contents break blur on scroll - -### 3.2.0 <small>December 28, 2018</small> { id="3.2.0" } - -- Added support for redirects using metadata refresh -- Fixed #921: Load Google Analytics snippet asynchronously - -### 3.1.0 <small>November 17, 2018</small> { id="3.1.0" } - -- Added support for Progressive Web App Manifest -- Fixed #915: Search bug in Safari (upgraded Lunr.js) - -### 3.0.6 <small>October 26, 2018</small> { id="3.0.6" } - -- Added Taiwanese translations -- Fixed #906: JavaScript code blocks evaluated in search results - -### 3.0.5 <small>October 23, 2018</small> { id="3.0.5" } - -- Added Croatian and Indonesian translations -- Fixed #899: Skip-to-content link invalid from 2nd level on -- Fixed #902: Missing URL filter in footer for FontAwesome link - -### 3.0.4 <small>September 3, 2018</small> { id="3.0.4" } - -- Updated Dutch translations -- Fixed #856: Removed preconnect meta tag if Google Fonts are disabled - -### 3.0.3 <small>August 7, 2018</small> { id="3.0.3" } - -- Fixed #841: Additional path levels for extra CSS and JS - -### 3.0.2 <small>August 6, 2018</small> { id="3.0.2" } - -- Fixed #839: Lunr.js stemmer imports incorrect - -### 3.0.1 <small>August 5, 2018</small> { id="3.0.1" } - -- Fixed #838: Search result links incorrect - -### 3.0.0 <small>August 5, 2018</small> { id="3.0.0" } - -- Upgraded MkDocs to 1.0 (**BREAKING**) -- Upgraded Python in official Docker image to 3.6 -- Added Serbian and Serbo-Croatian translations - ---- - -### 2.9.4 <small>July 29, 2018</small> { id="2.9.4" } - -- Fixed build error after MkDocs upgrade - -### 2.9.3 <small>July 29, 2018</small> { id="2.9.3" } - -- Added link to home for logo in drawer -- Fixed dependency problems between MkDocs and Tornado - -### 2.9.2 <small>June 29, 2018</small> { id="2.9.2" } - -- Added Hindi and Czech translations - -### 2.9.1 <small>June 18, 2018</small> { id="2.9.1" } - -- Added support for different spellings for theme color -- Fixed #799: Added support for webfont minification in production -- Fixed #800: Added `.highlighttable` as an alias for `.codehilitetable` - -### 2.9.0 <small>June 13, 2018</small> { id="2.9.0" } - -- Added support for theme color on Android -- Fixed #796: Rendering of nested tabbed code blocks - -### 2.8.0 <small>June 10, 2018</small> { id="2.8.0" } - -- Added support for grouping code blocks with tabs -- Added Material and FontAwesome icon fonts to distribution files (GDPR) -- Added note on compliance with GDPR -- Added Slovak translations -- Fixed #790: Prefixed `id` attributes with `__` to avoid name clashes - -### 2.7.3 <small>April 26, 2018</small> { id="2.7.3" } - -- Added Finnish translations - -### 2.7.2 <small>April 9, 2018</small> { id="2.7.2" } - -- Fixed rendering issue for `details` on Edge - -### 2.7.1 <small>March 21, 2018</small> { id="2.7.1" } - -- Added Galician translations -- Fixed #730: Scroll chasing error on home page if Disqus is enabled -- Fixed #736: Reset drawer and search upon back button invocation - -### 2.7.0 <small>March 6, 2018</small> { id="2.7.0" } - -- Added ability to set absolute URL for logo -- Added Hebrew translations - -### 2.6.6 <small>February 22, 2018</small> { id="2.6.6" } - -- Added preconnect for Google Fonts for faster loading -- Fixed #710: With tabs sidebar disappears if JavaScript is not available - -### 2.6.5 <small>February 22, 2018</small> { id="2.6.5" } - -- Reverted `--dev-addr` flag removal from `Dockerfile` - -### 2.6.4 <small>February 21, 2018</small> { id="2.6.4" } - -- Added Catalan translations -- Fixed incorrect margins for buttons in Firefox and Safari -- Replaced package manager `yarn` with `npm 5.6` -- Reverted GitHub stars rounding method -- Removed `--dev-addr` flag from `Dockerfile` for Windows compatibility - -### 2.6.3 <small>February 18, 2018</small> { id="2.6.3" } - -- Added Vietnamese translations - -### 2.6.2 <small>February 12, 2018</small> { id="2.6.2" } - -- Added Arabic translations -- Fixed incorrect rounding of amount of GitHub stars -- Fixed double-layered borders for tables - -### 2.6.1 <small>February 11, 2018</small> { id="2.6.1" } - -- Added ability to override Disqus integration using metadata -- Fixed #690: Duplicate slashes in source file URLs -- Fixed #696: Active page highlight not working with default palette -- Adjusted German translations - -### 2.6.0 <small>February 2, 2018</small> { id="2.6.0" } - -- Moved default search configuration to default translation (English) -- Added support to automatically set text direction from translation -- Added support to disable search stop word filter in translation -- Added support to disable search trimmer in translation -- Added Persian translations -- Fixed support for Polish search -- Fixed disappearing GitHub, GitLab and Bitbucket repository icons - -### 2.5.5 <small>January 31, 2018</small> { id="2.5.5" } - -- Added Hungarian translations - -### 2.5.4 <small>January 29, 2018</small> { id="2.5.4" } - -- Fixed #683: `gh-deploy` fails inside Docker - -### 2.5.3 <small>January 25, 2018</small> { id="2.5.3" } - -- Added Ukrainian translations - -### 2.5.2 <small>January 22, 2018</small> { id="2.5.2" } - -- Added default search language mappings for all localizations -- Fixed #673: Error loading non-existent search language -- Fixed #675: Uncaught reference error when search plugin disabled - -### 2.5.1 <small>January 20, 2018</small> { id="2.5.1" } - -- Fixed permalink for main headline -- Improved missing translation handling with English as a fallback -- Improved accessibility with skip-to-content link - -### 2.5.0 <small>January 13, 2018</small> { id="2.5.0" } - -- Added support for right-to-left languages - -### 2.4.0 <small>January 11, 2018</small> { id="2.4.0" } - -- Added focus state for clipboard buttons -- Fixed #400: Search bar steals tab focus -- Fixed search not closing on ++enter++ when result is selected -- Fixed search not closing when losing focus due to ++tab++ -- Fixed collapsed navigation links getting focus -- Fixed `outline` being cut off on ++tab++ focus of navigation links -- Fixed bug with first search result navigation being ignored -- Removed search result navigation via ++tab++ (use ++up++ and ++down++) -- Removed `outline` resets for links -- Improved general tabbing behavior on desktop - -### 2.3.0 <small>January 9, 2018</small> { id="2.3.0" } - -- Added `example` (synonym: `snippet`) style for admonitions -- Added synonym `abstract` for `summary` style for admonitions - -### 2.2.6 <small>December 27, 2017</small> { id="2.2.6" } - -- Added Turkish translations -- Fixed unclickable area below header in case JavaScript is not available - -### 2.2.5 <small>December 18, 2017</small> { id="2.2.5" } - -- Fixed #639: Broken default favicon - -### 2.2.4 <small>December 18, 2017</small> { id="2.2.4" } - -- Fixed #638: Build breaks with Jinja < 2.9 - -### 2.2.3 <small>December 13, 2017</small> { id="2.2.3" } - -- Fixed #630: Admonition sets padding on any last child -- Adjusted Chinese (Traditional) translations - -### 2.2.2 <small>December 8, 2017</small> { id="2.2.2" } - -- Added Dutch translations -- Adjusted targeted link and footnote offsets -- Simplified admonition styles and fixed padding bug - -### 2.2.1 <small>December 2, 2017</small> { id="2.2.1" } - -- Fixed #616: Minor styling error with title-only admonitions -- Removed border for table of contents and improved spacing - -### 2.2.0 <small>November 22, 2017</small> { id="2.2.0" } - -- Added support for hero teaser -- Added Portuguese translations -- Fixed #586: Footnote backref target offset regression -- Fixed #605: Search stemmers not correctly loaded - -### 2.1.1 <small>November 21, 2017</small> { id="2.1.1" } - -- Replaced deprecated `babel-preset-es2015` with `babel-preset-env` -- Refactored Gulp build pipeline with Webpack -- Removed right border on sidebars -- Fixed broken color transition on header - -### 2.1.0 <small>November 19, 2017</small> { id="2.1.0" } - -- Added support for `white` as a primary color -- Added support for sliding site name and title -- Fixed redundant clipboard button when using line numbers on code blocks -- Improved header appearance by making it taller -- Improved tabs appearance -- Improved CSS customizability by leveraging inheritance -- Removed scroll shadows via `background-attachment` - -### 2.0.4 <small>November 5, 2017</small> { id="2.0.4" } - -- Fixed `details` not opening with footnote reference - -### 2.0.3 <small>November 5, 2017</small> { id="2.0.3" } - -- Added Japanese translations -- Fixed #540: Jumping to anchor inside `details` doesn't open it -- Fixed active link colors in footer - -### 2.0.2 <small>November 1, 2017</small> { id="2.0.2" } - -- Added Russian translations -- Fixed #542: Horizontal scrollbar between `1220px` and `1234px` -- Fixed #553: Metadata values only rendering first character -- Fixed #558: Flash of unstyled content -- Fixed favicon regression caused by deprecation upstream - -### 2.0.1 <small>October 31, 2017</small> { id="2.0.1" } - -- Fixed error when initializing search -- Fixed styles for link to edit the current page -- Fixed styles on nested admonition in details - -### 2.0.0 <small>October 31, 2017</small> { id="2.0.0" } - -- Upgraded MkDocs to 0.17.1 (__BREAKING__) -- Added support for easier configuration of search tokenizer -- Added support to disable search -- Added Korean translations - ---- - -### 1.12.2 <small>October 26, 2017</small> { id="1.12.2" } - -- Added Italian, Norwegian, French and Chinese translations - -### 1.12.1 <small>October 22, 2017</small> { id="1.12.1" } - -- Added Polish, Swedish and Spanish translations -- Improved downward compatibility with custom partials -- Temporarily pinned MkDocs version within Docker image to 0.16.3 -- Fixed #519: Missing theme configuration file - -### 1.12.0 <small>October 20, 2017</small> { id="1.12.0" } - -- Added support for setting language(s) via `mkdocs.yml` -- Added support for default localization -- Added German and Danish translations -- Fixed #374: Search bar misalignment on big screens - -### 1.11.0 <small>October 19, 2017</small> { id="1.11.0" } - -- Added localization to clipboard -- Refactored localization logic - -### 1.10.4 <small>October 18, 2017</small> { id="1.10.4" } - -- Improved print styles of code blocks -- Improved search UX (don't close on enter if no selection) -- Fixed #495: Vertical scrollbar on short pages - -### 1.10.3 <small>October 11, 2017</small> { id="1.10.3" } - -- Fixed #484: Vertical scrollbar on some MathJax formulas -- Fixed #483: Footnote backref target offset regression - -### 1.10.2 <small>October 6, 2017</small> { id="1.10.2" } - -- Fixed #468: Sidebar shows scrollbar if content is shorter (in Safari) - -### 1.10.1 <small>September 14, 2017</small> { id="1.10.1" } - -- Fixed #455: Bold code blocks rendered with normal font weight - -### 1.10.0 <small>September 1, 2017</small> { id="1.10.0" } - -- Added support to make logo default icon configurable -- Fixed uninitialized overflow scrolling on main pane for iOS -- Fixed error in mobile navigation in case JavaScript is not available -- Fixed incorrect color transition for nested panes in mobile navigation -- Improved checkbox styles for Tasklist from PyMdown Extension package - -### 1.9.0 <small>August 29, 2017</small> { id="1.9.0" } - -- Added `info` (synonym: `todo`) style for admonitions -- Added `question` (synonym: `help`, `faq`) style for admonitions -- Added support for Details from PyMdown Extensions package -- Improved admonition styles to match details -- Improved styles for social links in footer -- Replaced ligatures with Unicode code points to avoid broken layout -- Upgraded PyMdown Extensions package dependency to >= 3.4 - -### 1.8.1 <small>August 7, 2017</small> { id="1.8.1" } - -- Fixed #421: Missing pagination for GitHub API - -### 1.8.0 <small>August 2, 2017</small> { id="1.8.0" } - -- Added support for lazy-loading of search results for better performance -- Added support for customization of search tokenizer/separator -- Fixed #424: Search doesn't handle capital letters anymore -- Fixed #419: Search doesn't work on whole words - -### 1.7.5 <small>July 25, 2017</small> { id="1.7.5" } - -- Fixed #398: Forms broken due to search shortcuts -- Improved search overall user experience -- Improved search matching and highlighting -- Improved search accessibility - -### 1.7.4 <small>June 21, 2017</small> { id="1.7.4" } - -- Fixed functional link colors in table of contents for active palette -- Fixed #368: Compatibility issues with IE11 - -### 1.7.3 <small>June 7, 2017</small> { id="1.7.3" } - -- Fixed error when setting language to Japanese for site search - -### 1.7.2 <small>June 6, 2017</small> { id="1.7.2" } - -- Fixed offset of search box when `repo_url` is not set -- Fixed non-disappearing tooltip - -### 1.7.1 <small>June 1, 2017</small> { id="1.7.1" } - -- Fixed wrong `z-index` order of header, overlay and drawer -- Fixed wrong offset of targeted footnote back references - -### 1.7.0 <small>June 1, 2017</small> { id="1.7.0" } - -- Added "copy to clipboard" buttons to code blocks -- Added support for multilingual site search -- Fixed search term highlighting for non-latin languages - -### 1.6.4 <small>May 24, 2017</small> { id="1.6.4" } - -- Fixed #337: JavaScript error for GitHub organization URLs - -### 1.6.3 <small>May 16, 2017</small> { id="1.6.3" } - -- Fixed #329: Broken source stats for private or unknown GitHub repos - -### 1.6.2 <small>May 15, 2017</small> { id="1.6.2" } - -- Fixed #316: Fatal error for git clone on Windows -- Fixed #320: Chrome 58 creates double underline for `abbr` tags -- Fixed #323: Ligatures rendered inside code blocks -- Fixed miscalculated sidebar height due to missing margin collapse -- Changed deprecated MathJax CDN to Cloudflare - -### 1.6.1 <small>April 23, 2017</small> { id="1.6.1" } - -- Fixed following of active/focused element if search input is focused -- Fixed layer order of search component elements - -### 1.6.0 <small>April 22, 2017</small> { id="1.6.0" } - -- Added build test for Docker image on Travis -- Added search overlay for better user experience (focus) -- Added language from localizations to `html` tag -- Fixed #270: source links broken for absolute URLs -- Fixed missing top spacing for first targeted element in content -- Fixed too small footnote divider when using larger font sizes - -### 1.5.5 <small>April 20, 2017</small> { id="1.5.5" } - -- Fixed #282: Browser search (<kbd>Meta</kbd>+<kbd>F</kbd>) is hijacked - -### 1.5.4 <small>April 8, 2017</small> { id="1.5.4" } - -- Fixed broken highlighting for two or more search terms -- Fixed missing search results when only a `h1` is present -- Fixed unresponsive overlay on Android - -### 1.5.3 <small>April 7, 2017</small> { id="1.5.3" } - -- Fixed deprecated calls for template variables -- Fixed wrong palette color for focused search result -- Fixed JavaScript errors on 404 page -- Fixed missing top spacing on 404 page -- Fixed missing right spacing on overflow of source container - -### 1.5.2 <small>April 5, 2017</small> { id="1.5.2" } - -- Added requirements as explicit dependencies in `setup.py` -- Fixed non-synchronized transitions in search form - -### 1.5.1 <small>March 30, 2017</small> { id="1.5.1" } - -- Fixed rendering and offset of targeted footnotes -- Fixed #238: Link on logo is not set to `site_url` - -### 1.5.0 <small>March 24, 2017</small> { id="1.5.0" } - -- Added support for localization of search placeholder -- Added keyboard events for quick access of search -- Added keyboard events for search control -- Added opacity on hover for search buttons -- Added git hook to skip CI build on non-src changes -- Fixed non-resetting search placeholder when input is cleared -- Fixed error for unescaped parentheses in search term -- Fixed #229: Button to clear search missing -- Fixed #231: Escape key doesn't exit search -- Removed old-style figures from font feature settings - -### 1.4.1 <small>March 16, 2017</small> { id="1.4.1" } - -- Fixed invalid destructuring attempt on NodeList (in Safari, Edge, IE) - -### 1.4.0 <small>March 16, 2017</small> { id="1.4.0" } - -- Added support for grouping searched sections by documents -- Added support for highlighting of search terms -- Added support for localization of search results -- Fixed #216: table of contents icon doesn't show if `h1` is not present -- Reworked style and layout of search results for better usability - -### 1.3.0 <small>March 11, 2017</small> { id="1.3.0" } - -- Added support for page-specific title and description using metadata -- Added support for linking source files to documentation -- Fixed jitter and offset of sidebar when zooming browser -- Fixed incorrectly initialized tablet sidebar height -- Fixed regression for #1: GitHub stars break if `repo_url` ends with a `/` -- Fixed undesired white line below copyright footer due to base font scaling -- Fixed issue with whitespace in path for scripts -- Fixed #205: support non-fixed (static) header -- Refactored footnote references for better visibility -- Reduced repaints to a minimum for non-tabs configuration -- Reduced contrast of edit button (slightly) - -### 1.2.0 <small>March 3, 2017</small> { id="1.2.0" } - -- Added `quote` (synonym: `cite`) style for admonitions -- Added help message to build pipeline -- Fixed wrong navigation link colors when applying palette -- Fixed #197: Link missing in tabs navigation on deeply nested items -- Removed unnecessary dev dependencies - -### 1.1.1 <small>February 26, 2017</small> { id="1.1.1" } - -- Fixed incorrectly displayed nested lists when using tabs - -### 1.1.0 <small>February 26, 2017</small> { id="1.1.0" } - -- Added tabs navigation feature (optional) -- Added Disqus integration (optional) -- Added a high resolution Favicon with the new logo -- Added static type checking using Facebook's Flow -- Fixed #173: Dictionary elements have no bottom spacing -- Fixed #175: Tables cannot be set to 100% width -- Fixed race conditions in build related to asset revisioning -- Fixed accidentally re-introduced Permalink on top-level headline -- Fixed alignment of logo in drawer on IE11 -- Refactored styles related to tables -- Refactored and automated Docker build and PyPI release -- Refactored build scripts - -### 1.0.5 <small>February 18, 2017</small> { id="1.0.5" } - -- Fixed #153: Sidebar flows out of constrained area in Chrome 56 -- Fixed #159: Footer jitter due to JavaScript if content is short - -### 1.0.4 <small>February 16, 2017</small> { id="1.0.4" } - -- Fixed #142: Documentation build errors if `h1` is defined as raw HTML -- Fixed #164: PyPI release does not build and install -- Fixed offsets of targeted headlines -- Increased sidebar font size by `0.12rem` - -### 1.0.3 <small>January 22, 2017</small> { id="1.0.3" } - -- Fixed #117: Table of contents items don't blur on fast scrolling -- Refactored sidebar positioning logic -- Further reduction of repaints - -### 1.0.2 <small>January 15, 2017</small> { id="1.0.2" } - -- Fixed #108: Horizontal scrollbar in content area - -### 1.0.1 <small>January 14, 2017</small> { id="1.0.1" } - -- Fixed massive repaints happening when scrolling -- Fixed footer back reference positions in case of overflow -- Fixed header logo from showing when the menu icon is rendered -- Changed scrollbar behavior to only show when content overflows - -### 1.0.0 <small>January 13, 2017</small> { id="1.0.0" } - -- Introduced Webpack for more sophisticated JavaScript bundling -- Introduced ESLint and Stylelint for code style checks -- Introduced more accurate Material Design colors and shadows -- Introduced modular scales for harmonic font sizing -- Introduced git-hooks for better development workflow -- Rewrite of CSS using the BEM methodology and SassDoc guidelines -- Rewrite of JavaScript using ES6 and Babel as a transpiler -- Rewrite of Admonition, Permalinks and CodeHilite integration -- Rewrite of the complete typographical system -- Rewrite of Gulp asset pipeline in ES6 and separation of tasks -- Removed Bower as a dependency in favor of NPM -- Removed custom icon build in favor of the Material Design icon set -- Removed `_blank` targets on links due to vulnerability: http://bit.ly/1Mk2Rtw -- Removed unversioned assets from build directory -- Restructured templates into base templates and partials -- Added build and watch scripts in `package.json` -- Added support for Metadata and Footnotes Markdown extensions -- Added support for PyMdown Extensions package -- Added support for collapsible sections in navigation -- Added support for separate table of contents -- Added support for better accessibility through REM-based layout -- Added icons for GitHub, GitLab and BitBucket integrations -- Added more detailed documentation on specimen, extensions etc. -- Added a `404.html` error page for deployment on GitHub Pages -- Fixed live reload chain in watch mode when saving a template -- Fixed variable references to work with MkDocs 0.16 - ---- - -### 0.2.4 <small>June 26, 2016</small> { id="0.2.4" } - -- Fixed improperly set default favicon -- Fixed #33: Protocol relative URL for webfonts doesn't work with `file://` -- Fixed #34: IE11 on Windows 7 doesn't honor `max-width` on `main` tag -- Fixed #35: Add styling for blockquotes - -### 0.2.3 <small>May 16, 2016</small> { id="0.2.3" } - -- Fixed #25: Highlight inline fenced blocks -- Fixed #26: Better highlighting for keystrokes -- Fixed #30: Suboptimal syntax highlighting for PHP - -### 0.2.2 <small>March 20, 2016</small> { id="0.2.2" } - -- Fixed #15: Document Pygments dependency for CodeHilite -- Fixed #16: Favicon could not be set through `mkdocs.yml` -- Fixed #17: Put version into own container for styling -- Fixed #20: Fix rounded borders for tables - -### 0.2.1 <small>March 12, 2016</small> { id="0.2.1" } - -- Fixed #10: Invisible header after closing search bar with <kbd>ESC</kbd> key -- Fixed #13: Table cells don't wrap -- Fixed empty list in table of contents when no headline is defined -- Corrected wrong path for static asset monitoring in Gulpfile.js -- Set up tracking of site search for Google Analytics - -### 0.2.0 <small>February 24, 2016</small> { id="0.2.0" } - -- Fixed #6: Include multiple color palettes via `mkdocs.yml` -- Fixed #7: Better colors for links inside admonition notes and warnings -- Fixed #9: Text for prev/next footer navigation should be customizable -- Refactored templates (replaced `if`/`else` with modifiers where possible) - -### 0.1.3 <small>February 21, 2016</small> { id="0.1.3" } - -- Fixed #3: Ordered lists within an unordered list have `::before` content -- Fixed #4: Click on Logo/Title without Github-Repository: `"None"` -- Fixed #5: Page without headlines renders empty list in table of contents -- Moved Modernizr to top to ensure basic usability in IE8 - -### 0.1.2 <small>February 16, 2016</small> { id="0.1.2" } - -- Fixed styles for deep navigational hierarchies -- Fixed webfont delivery problem when hosted in subdirectories -- Fixed print styles in mobile/tablet configuration -- Added option to configure fonts in `mkdocs.yml` with fallbacks -- Changed styles for admonition notes and warnings -- Set download link to latest version if available -- Set up tracking of outgoing links and actions for Google Analytics - -### 0.1.1 <small>February 11, 2016</small> { id="0.1.1" } - -- Fixed #1: GitHub stars don't work if the repo_url ends with a `/` -- Updated NPM and Bower dependencies to most recent versions -- Changed footer/copyright link to Material theme to GitHub pages -- Made MkDocs building/serving in build process optional -- Set up continuous integration with Travis - -### 0.1.0 <small>February 9, 2016</small> { id="0.1.0" } - -- Initial release diff --git a/docs/contact.md b/docs/contact.md new file mode 100644 index 0000000000000000000000000000000000000000..e83b61da6554c925ca2ad52b0f2f335415bb902a --- /dev/null +++ b/docs/contact.md @@ -0,0 +1,3 @@ +# Contact LAGO Collaboration + +<iframe src="https://docs.google.com/forms/d/e/1FAIpQLScZGbWfcsFj6eTmF5Iurgw6wOO4Eo-XWCYUNRsWPDocPTMCAQ/viewform?embedded=true" marginheight="0" marginwidth="0" width="640" height="1000" frameborder="0">Loading…</iframe> diff --git a/docs/contributing/index.md b/docs/contributing/index.md deleted file mode 100644 index 11af1a9b48bd816fed22fae6de47f8b0fb802f53..0000000000000000000000000000000000000000 --- a/docs/contributing/index.md +++ /dev/null @@ -1,58 +0,0 @@ -# Contributing - -Material for MkDocs is an actively maintained and constantly improved project -that caters to a diverse user base with varying backgrounds and needs. In order -to effectively address the needs of all our users, evaluate requests, and fix -bugs, a lot of work from us maintainers is required. - -## How to contribute - -We have invested quite a lot of time in creating better templates for our -[issue tracker], optimizing the processes for our users to report bugs, request -features or changes, contribute to the project or exchange with our community. This section of -the documentation explains each process. - - [issue tracker]: https://github.com/squidfunk/mkdocs-material/issues - -### Creating an issue - -<div class="grid cards" markdown> - -- :material-bug:{ .lg .middle } __Something is not working?__ - - --- - - Report a bug in Material for MkDocs by creating an issue and a reproduction - - [:octicons-arrow-right-24: Report a bug][report a bug] - -- :material-file-document:{ .lg .middle } __Missing information in our docs?__ - - --- - - Report missing information or potential inconsistencies in our documentation - - [:octicons-arrow-right-24: Report a docs issue][report a docs issue] - -- :material-lightbulb-on:{ .lg .middle } __Want to submit an idea?__ - - --- - - Propose a change or feature request or suggest an improvement - - [:octicons-arrow-right-24: Request a change][request a change] - -- :material-chat-question:{ .lg .middle } __Have a question or need help?__ - - --- - - Ask questions on our discussion board and get in touch with our community - - [:octicons-arrow-right-24: Ask as question][ask a question] - -</div> - - [report a bug]: reporting-a-bug.md - [report a docs issue]: reporting-a-docs-issue.md - [request a change]: requesting-a-change.md - [ask a question]: https://github.com/squidfunk/mkdocs-material/discussions diff --git a/docs/contributing/reporting-a-bug.md b/docs/contributing/reporting-a-bug.md deleted file mode 100644 index acb6a933d15b1cbdcefceff63b3fd279c6f01229..0000000000000000000000000000000000000000 --- a/docs/contributing/reporting-a-bug.md +++ /dev/null @@ -1,314 +0,0 @@ -# Reporting a bug - -Material for MkDocs is an actively maintained project that we constantly strive -to improve. With a project of this size and complexity, bugs may occur. If you -think you have discovered a bug, you can help us by submitting an issue in our -public [issue tracker] by following this guide. - - [issue tracker]: https://github.com/squidfunk/mkdocs-material/issues - -## Before creating an issue - -With more than 20,000 users, issues are created every other day. The maintainers -of this project are trying very hard to keep the number of open issues down by -fixing bugs as fast as possible. By following this guide, you will know exactly -what information we need to help you quickly. - -__But first, please try the following things before creating an issue.__ - -### Upgrade to latest version - -Chances are that the bug you discovered was already fixed in a subsequent -version. Thus, before reporting an issue, ensure that you're running the -[latest version] of Material for MkDocs. Please consult our [upgrade guide] to -learn how to upgrade to the latest version. - -!!! warning "Bug fixes are not backported" - - Please understand that only bugs that occur in the latest version of - Material for MkDocs will be addressed. Also, to reduce duplicate efforts, - fixes cannot be backported to earlier versions. - -### Remove customizations - -If you're using [customizations] like [additional CSS], [JavaScript], or -[theme extension], please remove them from `mkdocs.yml` before reporting a bug. -We can't offer official support for bugs that might hide in your overrides, so -make sure to omit the following settings from `mkdocs.yml`: - - - [`theme.custom_dir`][theme.custom_dir] - - [`theme.hooks`][theme.hooks] - - [`extra_css`][extra_css] - - [`extra_javascript`][extra_javascript] - -If, after removing those settings, the bug is gone, the bug is likely caused by -your customizations. A good idea is to add them back gradually to narrow down -the root cause of the problem. If you did a major version upgrade, make sure you -adjusted all partials you have overridden. - -!!! warning "Customizations mentioned in our documentation" - - A handful of the features Material for MkDocs offers can only be implemented - with customizations. If you find a bug in any of the customizations [that - our documentation explicitly mentions], you are of course encouraged to - report it. - -__Don't be shy to ask on our [discussion board] for help if you run into -problems.__ - - [latest version]: ../changelog/index.md - [upgrade guide]: ../upgrade.md - [Customizations]: ../customization.md - [additional CSS]: ../customization.md#additional-css - [JavaScript]: ../customization.md#additional-javascript - [theme extension]: ../customization.md#extending-the-theme - [theme.custom_dir]: https://www.mkdocs.org/user-guide/configuration/#custom_dir - [theme.hooks]: https://www.mkdocs.org/user-guide/configuration/#hooks - [extra_css]: https://www.mkdocs.org/user-guide/configuration/#extra_css - [extra_javascript]: https://www.mkdocs.org/user-guide/configuration/#extra_javascript - [discussion board]: https://github.com/squidfunk/mkdocs-material/discussions - [StackOverflow]: https://stackoverflow.com - [that our documentation explicitly mentions]: ?q="extends+base" - -### Search for solutions - -At this stage, we know that the problem persists in the latest version and is -not caused by any of your customizations. However, the problem might result from -a small typo or a syntactical error in a configuration file, e.g. `mkdocs.yml`. - -Now, before you go through the trouble of creating a bug report that is answered -and closed right away with a link to the relevant documentation section or -another already reported or closed issue or discussion, you can save time for -us and yourself by doing some research: - -1. [Search our documentation] and look for the relevant sections that could - be related to your problem. If found, make sure that you configured - everything correctly.[^1] - - [^1]: - When adding lines to `mkdocs.yml`, make sure you are preserving the - indentation as mentioned in the documentation since YAML is a - whitespace-sensitive language. Many reported issues turn out to be - configuration errors. - -1. [Search our issue tracker][issue tracker], as another user might already - have reported the same problem, and there might even be a known workaround - or fix for it. Thus, no need to create a new issue. - -2. [Search our discussion board][discussion board] to learn if other users - are struggling with similar problems and work together with our great - community towards a solution. Many problems are solved here. - -__Keep track of all <u>search terms</u> and <u>relevant links</u>, you'll need -them in the bug report.__[^2] - - [^2]: - We might be using terminology in our documentation different from yours, - but mean the same. When you include the search terms and related links - in your bug report, you help us to adjust and improve the documentation. - ---- - -At this point, when you still haven't found a solution to your problem, we -encourage you to create an issue because it's now very likely that you -stumbled over something we don't know yet. Read the following section to learn -how to create a complete and helpful bug report. - - [Search our documentation]: ?q= - -## Issue template - -We have created a new issue template to make the bug reporting process as simple -as possible and more efficient for the community and us. It is the result of -our experience answering and fixing more than 1,600 issues (and counting) and -consists of the following parts: - -- [Title] -- [Context] <small>optional</small> -- [Description] -- [Related links] -- [Reproduction] -- [Steps to reproduce] -- [Browser] <small>optional</small> -- [Checklist] - - [Title]: #title - [Context]: #context - [Description]: #description - [Related links]: #related-links - [Reproduction]: #reproduction - [Steps to reproduce]: #steps-to-reproduce - [Browser]: #browser - [Checklist]: #checklist - -### Title - -A good title is short and descriptive. It should be a one-sentence executive -summary of the issue, so the impact and severity of the bug you want to report -can be inferred from the title. - -| <!-- --> | Example | -| -------- | -------- | -| :material-check:{ style="color: #4DB6AC" } __Clear__ | Built-in `typeset` plugin changes precedence of nav title over `h1` -| :material-close:{ style="color: #EF5350" } __Wordy__ | The built-in `typeset` plugin changes the precedence of the nav title over the document headline -| :material-close:{ style="color: #EF5350" } __Unclear__ | Title does not work -| :material-close:{ style="color: #EF5350" } __Generic__ | Please help - -### Context <small>optional</small> { #context } - -Before describing the bug, you can provide additional context for us to -understand what you are trying to achieve. Explain the circumstances -in which you're using Material for MkDocs, and what you _think_ might be -relevant. Don't write about the bug here. - -> __Why this might be helpful__: some errors only manifest in specific settings, -> environments or edge cases, for example, when your documentation contains -> thousands of documents. - -### Description - -Now, to the bug, you want to report. Provide a clear, focused, specific, and -concise summary of the bug you encountered. Explain why you think this is a bug -that should be reported to Material for MkDocs, and not to one of its -dependencies.[^3] Adhere to the following principles: - - [^3]: - Sometimes, users report bugs on our [issue tracker] that are caused by one - of our upstream dependencies, including [MkDocs], [Python Markdown], - [Python Markdown Extensions] or third-party plugins. A good rule of thumb is - to change the [`theme.name`][theme.name] to `mkdocs` or `readthedocs` and - check if the problem persists. If it does, the problem is likely not - related to Material for MkDocs and should be reported upstream. When in - doubt, use our [discussion board] to ask for help. - -- __Explain the <u>what</u>, not the <u>how</u>__ – don't explain - [how to reproduce the bug][Steps to reproduce] here, we're getting there. - Focus on articulating the problem and its impact as clearly as possible. - -- __Keep it short and concise__ – if the bug can be precisely explained in one - or two sentences, perfect. Don't inflate it – maintainers and future users - will be grateful for having to read less. - -- __One bug at a time__ – if you encountered several unrelated bugs, please - create separate issues for them. Don't report them in the same issue, as - this makes attribution difficult. - ---- - -:material-run-fast: __Stretch goal__ – if you found a workaround or a way to fix -the bug, you can help other users temporarily mitigate the problem before -we maintainers can fix the bug in our code base. - -> __Why we need this__: in order for us to understand the problem, we -> need a clear description of it and quantify its impact, which is essential -> for triage and prioritization. - - [MkDocs]: https://www.mkdocs.org - [Python Markdown]: https://python-markdown.github.io/extensions/ - [Python Markdown Extensions]: https://facelessuser.github.io/pymdown-extensions/ - [theme.name]: https://www.mkdocs.org/user-guide/configuration/#theme - -### Related links - -Of course, prior to reporting a bug, you have read our documentation and -[could not find a working solution][search for solutions]. Please share links -to all sections of our documentation that might be relevant to the bug, as it -helps us gradually improve it. - -Additionally, since you have searched our [issue tracker] and [discussion board] -before reporting an issue, and have possibly found several issues or -discussions, include those as well. Every link to an issue or discussion creates -a backlink, guiding us maintainers and other users in the future. - ---- - -:material-run-fast: __Stretch goal__ – if you also include the search terms you -used when [searching for a solution][search for solutions] to your problem, you -make it easier for us maintainers to improve the documentation. - -> __Why we need this__: related links help us better understand what you were -> trying to achieve and whether sections of our documentation need to be -> adjusted, extended, or overhauled. - - [search for solutions]: #search-for-solutions - -### Reproduction - -A minimal reproduction is at the heart of every well-written bug report, as -it allows us maintainers to quickly recreate the necessary conditions to inspect -the bug and quickly find its root cause. It's a proven fact that issues with -concise and small reproductions can be fixed much faster. - -[:material-bug: Create a reproduction][Create reproduction]{ .md-button .md-button--primary } - ---- - -After you have created the reproduction, you should have a .zip file, ideally not -larger than 1 MB. Just drag and drop the .zip file into this field, which will -automatically upload it to GitHub. - -> __Why we need this__: if an issue contains no minimal reproduction, or just -> a link to a repository with thousands of files, the maintainers would need to -> invest a lot of time into trying to recreate the right conditions to even -> inspect the bug, let alone fix it. - -!!! warning "Don't share links to repositories" - - While we know that it is a good practice among developers to include a link - to a repository with the bug report, we currently don't support those in our - process. The reason is that the reproduction which is automatically - produced by the [built-in info plugin] contains all of the necessary - environment information that is often forgotten to be included. - - Additionally, there are many non-technical users of Material for MkDocs that - have trouble creating repositories. - - [Create reproduction]: ../guides/creating-a-reproduction.md - [built-in info plugin]: ../guides/creating-a-reproduction.md#creating-a-zip-file - -### Steps to reproduce - -At this point, you provided us with enough information to understand the bug, -and you gave us a reproduction that we can run and inspect. However, when we -run your reproduction, it might not be immediately apparent how we can see -the bug in action. - -Next, please list the specific steps we should follow when running your -reproduction to observe the bug. Keep the steps short and concise, and make sure -not to leave anything out. Use simple language as you would explain it to a -five-year-old and focus on continuity. - -> __Why we need this__: we must know how to navigate your reproduction in order -> to observe the bug, as some bugs only occur at certain viewports or in -> specific conditions. - -### Browser <small>optional</small> { #browser } - -If you're reporting a bug that only happens in one or more _specific_ browsers, -we need to know which browsers are affected. This field is optional, as it is -only relevant when the bug you are reporting does not involve a crash when -[previewing] or [building] your site. - -> __Why we need this__: some bugs only occur in specific browsers or versions. -> Since now, almost all browsers are evergreen, we usually don't need to know the -> version in which it occurs, but we might ask for it later. When in doubt, add -> the browser version as the first step in the field above. - - [previewing]: http://localhost:8000/mkdocs-material/creating-your-site/#previewing-as-you-write - [building]: http://localhost:8000/mkdocs-material/creating-your-site/#building-your-site - -### Checklist - -Thanks for following the guide and creating a high-quality and complete bug -report – you are almost done. This section ensures that you have read this guide -and have worked to your best knowledge to provide us with everything we need to -know to help you. - -__We'll take it from here.__ - -## Incomplete issues - -Please understand that we reserve the right to close incomplete issues which -do not contain minimal reproductions or do not adhere to the quality standards -and requirements mentioned in this document. Issues can be reopened when the -missing information has been provided. diff --git a/docs/contributing/reporting-a-docs-issue.md b/docs/contributing/reporting-a-docs-issue.md deleted file mode 100644 index ce6cf853c4b56780b7b0992648a05c736a3c8fb6..0000000000000000000000000000000000000000 --- a/docs/contributing/reporting-a-docs-issue.md +++ /dev/null @@ -1,89 +0,0 @@ -# Reporting a docs issue - -In the past 7 years, our documentation has grown to more than 60 pages. With a -site being this large, inconsistencies can occur. If you found an inconsistency -or see room for clarification or improvement, please submit an issue to -our public [issue tracker] by following this guide. - - [issue tracker]: https://github.com/squidfunk/mkdocs-material/issues - -## Issue template - -Reporting a documentation issue is usually less involved than reporting a bug, -as we don't need a [reproduction]. Please thoroughly read the following guide -before creating a new documentation issue, and provide the following information -as part of the issue: - -- [Title] -- [Description] -- [Related links] -- [Proposed change] <small>optional</small> -- [Checklist] - - [reproduction]: ../guides/creating-a-reproduction.md - [Title]: #title - [Description]: #description - [Related links]: #related-links - [Proposed change]: #proposed-change - [Checklist]: #checklist - -### Title - -A good title should be a short, one-sentence description of the issue, contain -all relevant information and, in particular, keywords to simplify the search in -the issue tracker. - -| <!-- --> | Example | -| -------- | -------- | -| :material-check:{ style="color: #4DB6AC" } __Clear__ | Clarify social cards setup on Windows -| :material-close:{ style="color: #EF5350" } __Unclear__ | Missing information in the docs -| :material-close:{ style="color: #EF5350" } __Generic__ | Please help - -### Description - -Provide a clear and concise summary of the inconsistency or issue you -encountered in the documentation or the documentation section that needs -improvement. Explain why you think the documentation should be adjusted and -describe the severity of the issue: - -- __Keep it short and concise__ – if the inconsistency or issue can be - precisely explained in one or two sentences, perfect. Maintainers and - future users will be grateful for having to read less. - -- __One issue at a time__ – if you encountered several unrelated inconsistencies, - please create separate issues for them. Don't report them in the same issue – it makes attribution difficult. - -> __Why we need this__: in order for us to understand the problem, we need a -> clear description of it and quantify its impact, which is essential for triage -> and prioritization. - -### Related links - -After you described the documentation section that needs to be adjusted above, -we now ask you to share the link to this specific documentation section and -other possibly related sections. Make sure to use anchor links (permanent links) -where possible, as it simplifies discovery. - -> __Why we need this__: providing the links to the documentation help us -> understand which sections of our documentation need to be adjusted, extended, -> or overhauled. - -### Proposed change <small>optional</small> { #proposed-change } - -Now that you have provided us with the description and links to the -documentation sections, you can help us, maintainers, and the community by -proposing an improvement. You can sketch out rough ideas or write a concrete -proposal. This field is optional, but very helpful. - -> __Why we need this__: improvement proposal can be beneficial for other users -> who encounter the same issue, as they offer solutions before we maintainers -> can update the documentation. - -### Checklist - -Thanks for following the guide and creating a high-quality and complete issue -report – you are almost done. This section ensures that you have read this guide -and have worked to your best knowledge to provide us with every piece of -information we need to improve our documentation. - -__We'll take it from here.__ diff --git a/docs/contributing/requesting-a-change.md b/docs/contributing/requesting-a-change.md deleted file mode 100644 index cf4ba03f8306483b378d9137437449b7cd491ab3..0000000000000000000000000000000000000000 --- a/docs/contributing/requesting-a-change.md +++ /dev/null @@ -1,204 +0,0 @@ -# Requesting a change - -Material for MkDocs is a powerful tool to create beautiful and functional -project documentation. With more than 20,000 users, we understand that our -project serves a wide range of use cases, which is why we have created the -following guide. - ---- - -Put yourself in our shoes – with a project of this size, it can be challenging -to maintain existing functionality while constantly adding new features at the -same time. We highly value every idea or contribution from our community, and -we kindly ask you to take the time to read the following guidelines before -submitting your change request in our public [issue tracker]. This will help us -better understand the proposed change, and how it will benefit the community. - -This guide is our best effort to explain the criteria and reasoning behind our -decisions when evaluating change requests and considering them for -implementation. - - [issue tracker]: https://github.com/squidfunk/mkdocs-material/issues - -## Before creating an issue - -Before you invest your time to fill out and submit a change request, we kindly -ask you to do some preliminary work by answering some questions to determine if -your idea is a good fit for Material for MkDocs and matches the project's -[philosophy] and tone. - -__Please find answers to the following questions before creating an issue.__ - - [philosophy]: ../philosophy.md - -### It's not a bug, it's a feature - -Change requests are intended for suggesting minor adjustments, ideas for new -features, or to influence the project's direction and vision. It is important -to note that change requests are not intended for reporting bugs, as they're -missing essential information for debugging. - -If you want to report a bug, please refer to our [bug reporting guide] instead. - - [bug reporting guide]: reporting-a-bug.md - -### Source of inspiration - -If you have seen your idea implemented in another static site generator or -theme, make sure to collect enough information on its implementation before -submitting, as this allows us to evaluate potential fit more quickly. Explain -what you like and dislike about the implementation. - -### Benefit for the community - -Our [discussion board] is the best place to connect with our community. When -evaluating new ideas, it's essential to seek input from other users and consider -alternative viewpoints. This approach helps to implement new features in a way -that benefits a large number of users. - -[:octicons-comment-discussion-16: Start a discussion][Start a discussion]{ .md-button .md-button--primary } - - [discussion board]: https://github.com/squidfunk/mkdocs-material/discussions - [Start a discussion]: https://github.com/squidfunk/mkdocs-material/discussions - -## Issue template - -Now that you have taken the time to do the necessary preliminary work and ensure -that your idea meets our requirements, you are invited to create a change -request. The following guide will walk you through all necessary steps to help -you submit a comprehensive and useful issue: - -- [Title] -- [Context] <small>optional</small> -- [Description] -- [Related links] -- [Use cases] -- [Visuals] <small>optional</small> -- [Checklist] - - [Title]: #title - [Context]: #context - [Description]: #description - [Related links]: #related-links - [Use cases]: #use-cases - [Visuals]: #visuals - [Checklist]: #checklist - -### Title - -A good title is short and descriptive. It should be a one-sentence executive -summary of the idea, so the potential impact and benefit for the community can -be inferred from the title. - -| <!-- --> | Example | -| -------- | -------- | -| :material-check:{ style="color: #4DB6AC" } __Clear__ | Index custom front matter in search -| :material-close:{ style="color: #EF5350" } __Wordy__ | Add a feature where authors can define custom front matter to be indexed in search -| :material-close:{ style="color: #EF5350" } __Unclear__ | Improve search -| :material-close:{ style="color: #EF5350" } __Generic__ | Please help - -### Context <small>optional</small> { #context } - -Before describing your idea, you can provide additional context for us to -understand what you are trying to achieve. Explain the circumstances -in which you're using Material for MkDocs, and what you _think_ might be -relevant. Don't write about the change request here. - -> __Why this might be helpful__: some ideas might only benefit specific -> settings, environments or edge cases, for example, when your documentation -> contains thousands of documents. With a little context, change requests -> can be prioritized more accurately. - -### Description - -Next, provide a detailed and clear description of your idea. Explain why your -idea is relevant to Material for MkDocs and must be implemented here, and not -in one of its dependencies:[^1] - - [^1]: - Sometimes, users suggest ideas on our [issue tracker] that concern one of - our upstream dependencies, including [MkDocs], [Python Markdown], - [Python Markdown Extensions] or third-party plugins. It's a good idea to - think about whether your idea is beneficial to other themes, upstreaming - change requests for bigger impact. - -- __Explain the <u>what</u>, not the <u>why</u>__ – don't explain - [the benefits of your idea][Use cases] here, we're getting there. - Focus on describing the proposed change request as precisely as possible. - -- __Keep it short and concise__ – be brief and to the point when describing - your idea, there is no need to over-describe it. Maintainers and future - users will be grateful for having to read less. - -- __One idea at a time__ – if you have multiple ideas that don't belong -together, please open separate change requests for each of those ideas. - ---- - -:material-run-fast: __Stretch goal__ – if you have a customization or another -way to add the proposed change, you can help other users by sharing it here -before we maintainers can add it to our code base. - -> __Why we need this__: To understand and evaluate your proposed change, we -> need to have a clear understanding of your idea. By providing a detailed and -> precise description, you can help save you and us time spent discussing -> further clarification of your idea in the comments. - - [MkDocs]: https://www.mkdocs.org - [Python Markdown]: https://python-markdown.github.io/extensions/ - [Python Markdown Extensions]: https://facelessuser.github.io/pymdown-extensions/ - [theme.name]: https://www.mkdocs.org/user-guide/configuration/#theme - -### Related links - -Please provide any relevant links to issues, discussions, or documentation -sections related to your change request. If you (or someone else) already -discussed this idea with the community on our discussion board, please include -the link to the discussion as well. - -> __Why we need this__: Related links help us gain a comprehensive -> understanding of your change request by providing additional context. -> Additionally, linking to previous issues and discussions allows us -> to quickly evaluate the feedback and input already provided by the community. - -### Use cases - -Explain how your change request would work from an author's and user's -perspective – what's the expected impact and why does it not only benefit you, -but other users? How many of them? Furthermore, would it potentially break -existing functionality? - -> __Why we need this__: Understanding the use cases and benefits of an idea is -> crucial in evaluating its potential impact and usefulness for the project and -> its users. This information helps us to understand the expected value of the -> idea and how it aligns with the goals of the project. - -### Visuals <small>optional</small> { #visuals } - -We now have a clear and detailed description of your idea, including information -on its potential use cases and relevant links for context. If you have any -visuals, such as sketches, screenshots, mockups, or external assets, you may -present them in this section. - -__You can drag and drop the files here or include links to external assets.__ - -Additionally, if you have seen this change, feature, or improvement used in -other static site generators or themes, please provide an example by showcasing -it and describing how it was implemented and incorporated. - -> __Why we need this__: Illustrations and visuals can help us maintainers -> better understand and envision your idea. Screenshots, sketches, or mockups -> can create an additional level of detail and clarity that text alone may not -> be able to convey. Also, seeing how your idea has been implemented in other -> projects can help us understand its potential impact and feasibility in -> Material for MkDocs, which helps us maintainers evaluate and triage -> change requests. - -### Checklist - -Thanks for following the change request guide and creating a high-quality -change request. This section ensures that you have read this guide and have -worked to your best knowledge to provide us with every piece of information to -review your idea for Material for MkDocs. - -__We'll take it from here.__ diff --git a/docs/creating-your-site.md b/docs/creating-your-site.md deleted file mode 100644 index 0a9d141389ff25ac8a2190a1703cdd4e8338afa2..0000000000000000000000000000000000000000 --- a/docs/creating-your-site.md +++ /dev/null @@ -1,227 +0,0 @@ -# Creating your site - -After you've [installed] Material for MkDocs, you can bootstrap your project -documentation using the `mkdocs` executable. Go to the directory where you want -your project to be located and enter: - -``` -mkdocs new . -``` - -Alternatively, if you're running Material for MkDocs from within Docker, use: - -=== "Unix, Powershell" - - ``` - docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material new . - ``` - -=== "Windows" - - ``` - docker run --rm -it -v "%cd%":/docs squidfunk/mkdocs-material new . - ``` - -This will create the following structure: - -``` { .sh .no-copy } -. -├─ docs/ -│ └─ index.md -└─ mkdocs.yml -``` - - [installed]: getting-started.md - -## Configuration - -### Minimal configuration - -Simply add the following lines to `mkdocs.yml` to enable the theme: - -``` yaml -theme: - name: material -``` - - [installation methods]: getting-started.md#installation - -???+ tip "Recommended: [configuration validation and auto-complete]" - - In order to minimize friction and maximize productivity, Material for MkDocs - provides its own [schema.json][^1] for `mkdocs.yml`. If your editor supports - YAML schema validation, it's definitely recommended to set it up: - - === "Visual Studio Code" - - 1. Install [`vscode-yaml`][vscode-yaml] for YAML language support. - 2. Add the schema under the `yaml.schemas` key in your user or - workspace [`settings.json`][settings.json]: - - ``` json - { - "yaml.schemas": { - "https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml" - }, - "yaml.customTags": [ // (1)! - "!ENV scalar", - "!ENV sequence", - "tag:yaml.org,2002:python/name:materialx.emoji.to_svg", - "tag:yaml.org,2002:python/name:materialx.emoji.twemoji", - "tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format" - ] - } - ``` - - 1. This setting is necessary if you plan to use [icons and emojis], - or Visual Studio Code will show errors on certain lines. - - === "Other" - - 1. Ensure your editor of choice has support for YAML schema validation. - 2. Add the following lines at the top of `mkdocs.yml`: - - ``` yaml - # yaml-language-server: $schema=https://squidfunk.github.io/mkdocs-material/schema.json - ``` - - [^1]: - If you're a MkDocs plugin or Markdown extension author and your project - works with Material for MkDocs, you're very much invited to contribute a - schema for your [extension] or [plugin] as part of a pull request on GitHub. - If you already have a schema defined, or wish to self-host your schema to - reduce duplication, you can add it via [$ref]. - - [configuration validation and auto-complete]: https://twitter.com/squidfunk/status/1487746003692400642 - [schema.json]: schema.json - [vscode-yaml]: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml - [settings.json]: https://code.visualstudio.com/docs/getstarted/settings - [extension]: https://github.com/squidfunk/mkdocs-material/tree/master/docs/schema/extensions - [plugin]: https://github.com/squidfunk/mkdocs-material/tree/master/docs/schema/plugins - [$ref]: https://json-schema.org/understanding-json-schema/structuring.html#ref - [icons and emojis]: reference/icons-emojis.md - -### Advanced configuration - -Material for MkDocs comes with many configuration options. The setup section -explains in great detail how to configure and customize colors, fonts, icons -and much more: - -<div class="mdx-columns" markdown> - -- [Changing the colors] -- [Changing the fonts] -- [Changing the language] -- [Changing the logo and icons] -- [Ensuring data privacy] -- [Setting up navigation] -- [Setting up site search] -- [Setting up site analytics] -- [Setting up social cards] -- [Setting up a blog] -- [Setting up tags] -- [Setting up versioning] -- [Setting up the header] -- [Setting up the footer] -- [Adding a git repository] -- [Adding a comment system] -- [Building an optimized site] -- [Building for offline usage] - -</div> - -Furthermore, see the list of supported [Markdown extensions] that are natively -integrated with Material for MkDocs, delivering an unprecedented low-effort -technical writing experience. - - [Changing the colors]: setup/changing-the-colors.md - [Changing the fonts]: setup/changing-the-fonts.md - [Changing the language]: setup/changing-the-language.md - [Changing the logo and icons]: setup/changing-the-logo-and-icons.md - [Ensuring data privacy]: setup/ensuring-data-privacy.md - [Setting up navigation]: setup/setting-up-navigation.md - [Setting up site search]: setup/setting-up-site-search.md - [Setting up site analytics]: setup/setting-up-site-analytics.md - [Setting up social cards]: setup/setting-up-social-cards.md - [Setting up a blog]: setup/setting-up-a-blog.md - [Setting up tags]: setup/setting-up-tags.md - [Setting up versioning]: setup/setting-up-versioning.md - [Setting up the header]: setup/setting-up-the-header.md - [Setting up the footer]: setup/setting-up-the-footer.md - [Adding a git repository]: setup/adding-a-git-repository.md - [Adding a comment system]: setup/adding-a-comment-system.md - [Building for offline usage]: setup/building-for-offline-usage.md - [Building an optimized site]: setup/building-an-optimized-site.md - [Markdown extensions]: setup/extensions/index.md - -## Previewing as you write - -MkDocs includes a live preview server, so you can preview your changes as you -write your documentation. The server will automatically rebuild the site upon -saving. Start it with: - -``` sh -mkdocs serve # (1)! -``` - -1. If you have a large documentation project, it might take minutes until - MkDocs has rebuilt all pages for you to preview. If you're only interested - in the current page, the [`--dirtyreload`][--dirtyreload] flag will make - rebuilds much faster: - - ``` - mkdocs serve --dirtyreload - ``` - -If you're running Material for MkDocs from within Docker, use: - -=== "Unix, Powershell" - - ``` - docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material - ``` - -=== "Windows" - - ``` - docker run --rm -it -p 8000:8000 -v "%cd%":/docs squidfunk/mkdocs-material - ``` - -Point your browser to [localhost:8000][live preview] and you should see: - -[![Creating your site]][Creating your site] - - [--dirtyreload]: https://www.mkdocs.org/about/release-notes/#support-for-dirty-builds-990 - [live preview]: http://localhost:8000 - [Creating your site]: assets/screenshots/creating-your-site.png - -## Building your site - -When you're finished editing, you can build a static site from your Markdown -files with: - -``` -mkdocs build -``` - -If you're running Material for MkDocs from within Docker, use: - -=== "Unix, Powershell" - - ``` - docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material build - ``` - -=== "Windows" - - ``` - docker run --rm -it -v "%cd%":/docs squidfunk/mkdocs-material build - ``` - -The contents of this directory make up your project documentation. There's no -need for operating a database or server, as it is completely self-contained. -The site can be hosted on [GitHub Pages], [GitLab Pages], a CDN of your choice -or your private web space. - - [GitHub Pages]: publishing-your-site.md#github-pages - [GitLab pages]: publishing-your-site.md#gitlab-pages diff --git a/docs/customization.md b/docs/customization.md deleted file mode 100644 index 720889dfa190af45759254e71d244c7d29649d28..0000000000000000000000000000000000000000 --- a/docs/customization.md +++ /dev/null @@ -1,305 +0,0 @@ -# Customization - -Project documentation is as diverse as the projects themselves and Material for -MkDocs is a great starting point for making it look beautiful. However, as you -write your documentation, you may reach a point where small adjustments are -necessary to preserve your brand's style. - -## Adding assets - -[MkDocs] provides several ways to customize a theme. In order to make a few -small tweaks to Material for MkDocs, you can just add CSS and JavaScript files to -the `docs` directory. - - [MkDocs]: https://www.mkdocs.org - -### Additional CSS - -If you want to tweak some colors or change the spacing of certain elements, -you can do this in a separate style sheet. The easiest way is by creating a -new style sheet file in the `docs` directory: - -``` { .sh .no-copy } -. -├─ docs/ -│ └─ stylesheets/ -│ └─ extra.css -└─ mkdocs.yml -``` - -Then, add the following lines to `mkdocs.yml`: - -``` yaml -extra_css: - - stylesheets/extra.css -``` - -### Additional JavaScript - -If you want to integrate another syntax highlighter or add some custom logic to -your theme, create a new JavaScript file in the `docs` directory: - -``` { .sh .no-copy } -. -├─ docs/ -│ └─ javascripts/ -│ └─ extra.js -└─ mkdocs.yml -``` - -Then, add the following lines to `mkdocs.yml`: - -``` yaml -extra_javascript: - - javascripts/extra.js -``` - -## Extending the theme - -If you want to alter the HTML source (e.g. add or remove some parts), you can -extend the theme. MkDocs supports [theme extension], an easy way to override -parts of Material for MkDocs without forking from git. This ensures that you -can update to the latest version more easily. - - [theme extension]: https://www.mkdocs.org/user-guide/styling-your-docs/#using-the-theme-custom_dir - -### Setup and theme structure - -Enable Material for MkDocs as usual in `mkdocs.yml`, and create a new folder -for `overrides` which you then reference using the [`custom_dir`][custom_dir] -setting: - -``` yaml -theme: - name: material - custom_dir: overrides -``` - -!!! warning "Theme extension prerequisites" - - As the [`custom_dir`][custom_dir] setting is used for the theme extension - process, Material for MkDocs needs to be installed via `pip` and referenced - with the [`name`][name] setting in `mkdocs.yml`. It will not work when - cloning from `git`. - -The structure in the `overrides` directory must mirror the directory structure -of the original theme, as any file in the `overrides` directory will replace the -file with the same name which is part of the original theme. Besides, further -assets may also be put in the `overrides` directory: - -``` { .sh .no-copy } -. -├─ .icons/ # Bundled icon sets -├─ assets/ -│ ├─ images/ # Images and icons -│ ├─ javascripts/ # JavaScript files -│ └─ stylesheets/ # Style sheets -├─ partials/ -│ ├─ integrations/ # Third-party integrations -│ │ ├─ analytics/ # Analytics integrations -│ │ └─ analytics.html # Analytics setup -│ ├─ languages/ # Translation languages -│ ├─ actions.html # Actions -│ ├─ comments.html # Comment system (empty by default) -│ ├─ consent.html # Consent -│ ├─ content.html # Page content -│ ├─ copyright.html # Copyright and theme information -│ ├─ feedback.html # Was this page helpful? -│ ├─ footer.html # Footer bar -│ ├─ header.html # Header bar -│ ├─ icons.html # Custom icons -│ ├─ language.html # Translation setup -│ ├─ logo.html # Logo in header and sidebar -│ ├─ nav.html # Main navigation -│ ├─ nav-item.html # Main navigation item -│ ├─ pagination.html # Pagination (used for blog) -│ ├─ post.html # Blog post excerpt -│ ├─ search.html # Search interface -│ ├─ social.html # Social links -│ ├─ source.html # Repository information -│ ├─ source-file.html # Source file information -│ ├─ tabs.html # Tabs navigation -│ ├─ tabs-item.html # Tabs navigation item -│ ├─ tags.html # Tags -│ ├─ toc.html # Table of contents -│ └─ toc-item.html # Table of contents item -├─ 404.html # 404 error page -├─ base.html # Base template -├─ blog.html # Blog index page -├─ blog-archive.html # Blog archive index page -├─ blog-category.html # Blog category index page -├─ blog-post.html # Blog post page -└─ main.html # Default page -``` - - [custom_dir]: https://www.mkdocs.org/user-guide/configuration/#custom_dir - [name]: https://www.mkdocs.org/user-guide/configuration/#name - -### Overriding partials - -In order to override a partial, we can replace it with a file of the same name -and location in the `overrides` directory. For example, to replace the original -`footer.html` partial, create a new `footer.html` partial in the `overrides` -directory: - -``` { .sh .no-copy } -. -├─ overrides/ -│ └─ partials/ -│ └─ footer.html -└─ mkdocs.yml -``` - -MkDocs will now use the new partial when rendering the theme. This can be done -with any file. - -### Overriding blocks <small>recommended</small> { #overriding-blocks data-toc-label="Overriding blocks" } - -Besides overriding partials, it's also possible to override (and extend) -template blocks, which are defined inside the templates and wrap specific -features. In order to set up block overrides, create a `main.html` file inside -the `overrides` directory: - -``` { .sh .no-copy } -. -├─ overrides/ -│ └─ main.html -└─ mkdocs.yml -``` - -Then, e.g. to override the site title, add the following lines to `main.html`: - -``` html -{% extends "base.html" %} - -{% block htmltitle %} - <title>Lorem ipsum dolor sit amet</title> -{% endblock %} -``` - -If you intend to __add__ something to a block rather than to replace it -altogether with new content, use `{{ super() }}` inside the block to include the -original block content. This is particularly useful when adding third-party -scripts to your docs, e.g. - -``` html -{% extends "base.html" %} - -{% block scripts %} - <!-- Add scripts that need to run before here --> - {{ super() }} - <!-- Add scripts that need to run afterwards here --> -{% endblock %} -``` - -The following template blocks are provided by the theme: - -| Block name | Purpose | -| :---------------- | :---------------------------------------------- | -| `analytics` | Wraps the Google Analytics integration | -| `announce` | Wraps the announcement bar | -| `config` | Wraps the JavaScript application config | -| `container` | Wraps the main content container | -| `content` | Wraps the main content | -| `extrahead` | Empty block to add custom meta tags | -| `fonts` | Wraps the font definitions | -| `footer` | Wraps the footer with navigation and copyright | -| `header` | Wraps the fixed header bar | -| `hero` | Wraps the hero teaser (if available) | -| `htmltitle` | Wraps the `<title>` tag | -| `libs` | Wraps the JavaScript libraries (header) | -| `outdated` | Wraps the version warning | -| `scripts` | Wraps the JavaScript application (footer) | -| `site_meta` | Wraps the meta tags in the document head | -| `site_nav` | Wraps the site navigation and table of contents | -| `styles` | Wraps the style sheets (also extra sources) | -| `tabs` | Wraps the tabs navigation (if available) | - -## Theme development - -Material for MkDocs is built on top of [TypeScript], [RxJS] and [SASS], and -uses a lean, custom build process to put everything together.[^1] If you want -to make more fundamental changes, it may be necessary to make the adjustments -directly in the source of the theme and recompile it. - - [^1]: - Prior to :octicons-tag-24: 7.0.0 the build was based on Webpack, resulting - in occasional broken builds due to incompatibilities with loaders and - plugins. Therefore, we decided to swap Webpack for a leaner solution which - is now based on [RxJS] as the application itself. This allowed for the - pruning of more than 500 dependencies (~30% less). - - [TypeScript]: https://www.typescriptlang.org/ - [RxJS]: https://github.com/ReactiveX/rxjs - [SASS]: https://sass-lang.com - -### Environment setup - -In order to start development on Material for MkDocs, a [Node.js] version of -at least 14 is required. First, clone the repository: - -``` -git clone https://github.com/squidfunk/mkdocs-material -``` - -Next, all dependencies need to be installed, which is done with: - -``` -cd mkdocs-material -pip install -e . -pip install mkdocs-minify-plugin -pip install mkdocs-redirects -npm install -``` - - [Node.js]: https://nodejs.org - -### Development mode - -Start the watcher with: - -``` -npm start -``` - -Then, in a second terminal window, start the MkDocs live preview server with: - -``` -mkdocs serve --watch-theme -``` - -Point your browser to [localhost:8000][live preview] and you should see this -very documentation in front of you. - -!!! warning "Automatically generated files" - - Never make any changes in the `material` directory, as the contents of this - directory are automatically generated from the `src` directory and will be - overwritten when the theme is built. - - [live preview]: http://localhost:8000 - -### Building the theme - -When you're finished making your changes, you can build the theme by invoking: - -``` sh -npm run build # (1)! -``` - -1. While this command will build all theme files, it will skip the overrides - used in Material for MkDocs' own documentation which are not distributed - with the theme. If you forked the theme and want to build the overrides - as well, use: - - ``` - npm run build:all - ``` - - This will take longer, as now the icon search index, schema files, as - well as additional style sheet and JavaScript files are built. - -This triggers the production-level compilation and minification of all style -sheets and JavaScript files. After the command exits, the compiled files are -located in the `material` directory. When running `mkdocs build`, you should -now see your changes to the original theme. diff --git a/docs/getting-started.md b/docs/getting-started.md deleted file mode 100644 index bb8a41f5e50062c9d5e164d24aa8b21c6d9146bf..0000000000000000000000000000000000000000 --- a/docs/getting-started.md +++ /dev/null @@ -1,156 +0,0 @@ -# Getting started - -Material for MkDocs is a theme for [MkDocs], a static site generator geared -towards (technical) project documentation. If you're familiar with Python, you -can install Material for MkDocs with [`pip`][pip], the Python package manager. -If not, we recommend using [`docker`][docker]. - - [MkDocs]: https://www.mkdocs.org - [pip]: #with-pip - [docker]: #with-docker - -## Installation - -### with pip <small>recommended</small> { #with-pip data-toc-label="with pip" } - -Material for MkDocs is published as a [Python package] and can be installed with -`pip`, ideally by using a [virtual environment]. Open up a terminal and install -Material for MkDocs with: - -=== "Latest" - - ``` sh - pip install mkdocs-material - ``` - -=== "9.x" - - ``` sh - pip install mkdocs-material=="9.*" # (1)! - ``` - - 1. Material for MkDocs uses [semantic versioning][^1], which is why it's a - good idea to limit upgrades to the current major version. - - This will make sure that you don't accidentally [upgrade to the next - major version], which may include breaking changes that silently corrupt - your site. Additionally, you can use `pip freeze` to create a lockfile, - so builds are reproducible at all times: - - ``` - pip freeze > requirements.txt - ``` - - Now, the lockfile can be used for installation: - - ``` - pip install -r requirements.txt - ``` - - [^1]: - Note that improvements of existing features are sometimes released as - patch releases, like for example improved rendering of content tabs, as - they're not considered to be new features. - -This will automatically install compatible versions of all dependencies: -[MkDocs], [Markdown], [Pygments] and [Python Markdown Extensions]. Material for -MkDocs always strives to support the latest versions, so there's no need to -install those packages separately. - ---- - -__Tip__: If you don't have prior experience with Python, we recommend reading -[Using Python's pip to Manage Your Projects' Dependencies], which is a really -good introduction on the mechanics of Python package management and helps you -troubleshoot if you run into errors. - - [Python package]: https://pypi.org/project/mkdocs-material/ - [virtual environment]: https://realpython.com/what-is-pip/#using-pip-in-a-python-virtual-environment - [semantic versioning]: https://semver.org/ - [upgrade to the next major version]: upgrade.md - [Markdown]: https://python-markdown.github.io/ - [Pygments]: https://pygments.org/ - [Python Markdown Extensions]: https://facelessuser.github.io/pymdown-extensions/ - [Using Python's pip to Manage Your Projects' Dependencies]: https://realpython.com/what-is-pip/ - -### with docker - -The official [Docker image] is a great way to get up and running in a few -minutes, as it comes with all dependencies pre-installed. Open up a terminal -and pull the image with: - -=== "Latest" - - ``` - docker pull squidfunk/mkdocs-material - ``` - -=== "9.x" - - ``` - docker pull squidfunk/mkdocs-material:9 - ``` - -The `mkdocs` executable is provided as an entry point and `serve` is the -default command. If you're not familiar with Docker don't worry, we have you -covered in the following sections. - -The following plugins are bundled with the Docker image: - -- [mkdocs-minify-plugin] -- [mkdocs-redirects] - - [Docker image]: https://hub.docker.com/r/squidfunk/mkdocs-material/ - [mkdocs-minify-plugin]: https://github.com/byrnereese/mkdocs-minify-plugin - [mkdocs-redirects]: https://github.com/datarobot/mkdocs-redirects - -??? question "How to add plugins to the Docker image?" - - Material for MkDocs only bundles selected plugins in order to keep the size - of the official image small. If the plugin you want to use is not included, - create a new `Dockerfile` and extend the official Docker image: - - ``` Dockerfile - FROM squidfunk/mkdocs-material - RUN pip install ... - ``` - - Next, you can build the image with the following command: - - ``` - docker build -t squidfunk/mkdocs-material . - ``` - - The new image can be used exactly like the official image. - -!!! info ":material-apple: Apple Silicon (M1) and :fontawesome-brands-raspberry-pi: Raspberry Pi" - - The official Docker image is only available for `linux/amd64`. We recommend - the [third-party image] by @afritzler if you want to run Material for MkDocs - via Docker on `arm64` or `armv7`, as it is automatically built on every - release: - - ``` - docker pull ghcr.io/afritzler/mkdocs-material - ``` - - [third-party image]: https://github.com/afritzler/mkdocs-material - -### with git - -Material for MkDocs can be directly used from [GitHub] by cloning the -repository into a subfolder of your project root which might be useful if you -want to use the very latest version: - -``` -git clone https://github.com/squidfunk/mkdocs-material.git -``` - -The theme will reside in the folder `mkdocs-material/material`. After cloning -from `git`, you must install all required dependencies with: - -``` -pip install -e mkdocs-material -``` - - [GitHub]: https://github.com/squidfunk/mkdocs-material diff --git a/docs/guides/creating-a-reproduction.md b/docs/guides/creating-a-reproduction.md deleted file mode 100644 index 70a1830958940e9a257f99037d1b289fe804a0d2..0000000000000000000000000000000000000000 --- a/docs/guides/creating-a-reproduction.md +++ /dev/null @@ -1,109 +0,0 @@ -# Creating a reproduction - -A reproduction is a simplified version of a bug that demonstrates the specific -scenario in which the bug occurred. It includes all necessary minimal settings -and instructions and should be as simple as possible while still demonstrating -the issue. - -## Guide - -### Environment <small>optional</small> { #environment } - -We recommend using a [virtual environment], which is an isolated Python runtime. -If you are in a virtual environment, any packages that you install or upgrade -will be local to the environment. If you run into problems, you can -just delete and recreate the environment. It's trivial to set up: - -- Create a new virtual environment with: - - ``` - python3 -m venv venv - ``` - -- Activate the environment with: - - ``` sh - . venv/bin/activate # (1)! - ``` - - 1. Your terminal should now print `(venv)` before the prompt, which is - how you know that you are inside an environment. - -- Exit the environment with: - - ``` - deactivate - ``` - - [virtual environment]: https://realpython.com/what-is-pip/#using-pip-in-a-python-virtual-environment - -### Minimal reproduction - -Following the instructions below, you will set up a skeleton project to create -a reproduction. As mentioned above, we recommend using a [virtual environment], -so create a new folder in your working directory and a a new virtual environment -inside it. Next: - -1. As mentioned in our [bug reporting guide], ensure that you're running the - latest version of Material for MkDocs, which might already include a fix for - the bug: - - ``` - pip install --upgrade --force-reinstall mkdocs-material - ``` - -2. Bootstrap a new documentation project using the `mkdocs` executable, - which you use as a basis for the reproduction. It's essential to create a - new, empty project for this: - - ``` - mkdocs new . - ``` - - Start by adding the [minimal configuration] in `mkdocs.yml`: - - ``` yaml - theme: - name: material - ``` - -3. Now, only add the necessary settings to `mkdocs.yml` to keep the - reproduction minimal. If you are creating a reproduction for a rendering - bug, create only the necessary amount of Markdown documents. __Repeat this - step until the bug you want to report can be observed.__ - -4. As a last step, before packing everything into a .zip file, double-check - all settings and documents if they are essential to the reproduction, which - means that the bug does not occur when they are omitted. Remove all - non-essential lines and files. - - [bug reporting guide]: ../contributing/reporting-a-bug.md#upgrade-to-latest-version - [minimal configuration]: ../../creating-your-site/#minimal-configuration - -### Creating a .zip file - -Material for MkDocs 9.0.0 includes a new plugin solely intended to create -reproductions for bug reports. When the built-in info plugin is enabled, MkDocs -will add all relevant files to a .zip, print a summary to the terminal and -exit. Add the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - info -``` - -Now, when running `mkdocs build`, a file called `example.zip` is automatically -created, containing the minimal reproduction you can directly attach to your bug -report. - -``` -INFO - Started archive creation for bug report -INFO - Archive successfully created: - - example/.dependencies.json 859.0 B - example/.versions.log 83.0 B - example/docs/index.md 282.0 B - example/mkdocs.yml 56.0 B - - example.zip 1.8 kB -``` diff --git a/docs/insiders/changelog.md b/docs/insiders/changelog.md deleted file mode 100644 index a697205e6202450ec900fd929fdac2d2fc3b3924..0000000000000000000000000000000000000000 --- a/docs/insiders/changelog.md +++ /dev/null @@ -1,710 +0,0 @@ -# Changelog - -## Material for MkDocs Insiders - -### 4.30.0 <small>February 6, 2023</small> { id="4.30.0" } - -- Rewrite of privacy plugin for concurrency, now twice as fast -- Added support for explicit inclusion for privacy plugin -- Added optimization support for privacy plugin (+ optimize plugin) - -### 4.29.0 <small>January 21, 2023</small> { id="4.29.0" } - -- Added built-in optimize plugin for automatically compressing images -- Switched reporting in built-in privacy plugin to `info` level - -### 4.28.1 <small>January 17, 2023</small> { id="4.28.1" } - -- Fixed built-in info plugin erroring for Insiders on version check -- Fixed #4865: Navigation paths render bug when there's no top-level section -- Fixed #4875: Added support for hiding navigation paths -- Improved navigation path to not render for a single item - -### 4.28.0 <small>January 14, 2023</small> { id="4.28.0" } - -- Added support for navigation path (breadcrumbs) - -### 4.27.1 <small>December 20, 2022</small> { id="4.27.1" } - -- Fixed rendering of succeeding navigation items in typeset plugin -- Fixed #4795: Built-in typeset plugin changes MkDocs' title precedence -- Fixed #4724: Blog plugin not rendering integrate table of contents - -### 4.27.0 <small>December 20, 2022</small> { id="4.27.0" } - -- Added built-in typeset plugin to preserve formatting in sidebars -- Added URL and table of contents support for blog categories - -### 4.26.6 <small>November 28, 2022</small> { id="4.26.6" } - -- Fixed #4683: Tags plugin crashes when a tag is empty - -### 4.26.5 <small>November 27, 2022</small> { id="4.26.5" } - -- Fixed #4632: Post excerpt title link doesn't point to top of the page - -### 4.26.4 <small>November 27, 2022</small> { id="4.26.4" } - -- Fixed redundant file extension when using privacy plugin - -### 4.26.3 <small>November 15, 2022</small> { id="4.26.3" } - -- Fixed #4637: Attachments w/o titles in related links error in blog plugin -- Fixed #4631: Remote favicons not downloaded and inlined by privacy plugin - -### 4.26.2 <small>November 3, 2022</small> { id="4.26.2" } - -- Updated MkDocs to 1.4.2 -- Added support for tag compare functions when sorting on index pages -- Fixed footnotes being rendered in post excerpts without separators -- Fixed error in blog plugin when `toc` extension is not enabled -- Fixed issues with invalid asset paths and linked post titles -- Fixed #4572: Privacy plugin fails when symlinks cannot be created -- Fixed #4545: Blog plugin doesn't automatically link headline to post -- Fixed #4542: Blog plugin doesn't allow for multiple instances -- Fixed #4532: Blog plugin doesn't allow for mixed use of date and datetime - -### 4.26.1 <small>October 22, 2022</small> { id="4.26.1" } - -- Improved reporting of configuration errors in tags plugin -- Fixed #4515: Privacy plugin fails when site URL is not defined -- Fixed #4514: Privacy plugin doesn't fetch Google fonts (4.26.0 regression) - -### 4.26.0 <small>October 18, 2022</small> { id="4.26.0" } - -- Refactored privacy plugin to prepare for new features -- Added support for `rel=noopener` links in privacy plugin -- Resolve encoding issues with blog and privacy plugin - -### 4.25.5 <small>October 16, 2022</small> { id="4.25.5" } - -- Updated MkDocs to 1.4.1 -- Added namespace prefix to built-in plugins -- Updated `content` and `header` partial - -### 4.25.4 <small>October 9, 2022</small> { id="4.25.4" } - -- Fixed other path issues for standalone blogs (4.24.2 regression) - -### 4.25.3 <small>October 9, 2022</small> { id="4.25.3" } - -- Fixed #4457: Posts not collected for standalone blog (4.24.2 regression) - -### 4.25.2 <small>October 4, 2022</small> { id="4.25.2" } - -- Fixed #4452: Blog and tags plugin crash when specifying slugify function - -### 4.25.1 <small>October 3, 2022</small> { id="4.25.1" } - -- Updated `mkdocs-rss-plugin` in `Dockerfile` to fix MkDocs compat errors - -### 4.25.0 <small>October 2, 2022</small> { id="4.25.0" } - -- Added support for navigation subtitles -- Added support for defining an allow list for built-in tags plugin -- Added support for custom slugify functions for built-in tags plugin -- Improved stability of search plugin when using `--dirtyreload` - -### 4.24.2 <small>October 1, 2022</small> { id="4.24.2" } - -- Updated MkDocs to 1.4 -- Fixed compatibility issues with MkDocs 1.4 -- Fixed incorrectly generated paths in privacy plugin -- Fixed blog index page not showing navigation when using meta plugin - -### 4.24.1 <small>September 30, 2022</small> { id="4.24.1" } - -- Fixed #4430: build error when enabling consent without repository URL - -### 4.24.0 <small>September 27, 2022</small> { id="4.24.0" } - -- Added support for custom content on index pages (blog) -- Added support for keeping content on paginated index pages (blog) -- Added support for limiting categories in post excerpts (blog) -- Added support for simple override of templates via front matter (blog) -- Added icon in navigation for pages with encrypted content -- Fixed #4396: Front matter of index pages not inherited by pagination (blog) -- Improved performance by building post excerpts once (blog) - -### 4.23.6 <small>September 22, 2022</small> { id="4.23.6" } - -- Fixed #4389: Blog posts in first week of year in wrong archive -- Fixed (= switched) footer previous and next links for blog posts - -### 4.23.5 <small>September 18, 2022</small> { id="4.23.5" } - -- Fixed #4367: Improved blog plugin date handling for MultiMarkdown syntax -- Fixed #4374: Fixed invalid URLs of related links to other blog posts - -### 4.23.4 <small>September 14, 2022</small> { id="4.23.4" } - -- Fixed #4365: Recursion error in blog plugin due to `deepcopy` -- Fixed path errors for blog plugin on Windows -- Fixed publishing workflow in forked repositories - -### 4.23.3 <small>September 13, 2022</small> { id="4.23.3" } - -- Fixed previous and next page links for drafts of blog posts - -### 4.23.2 <small>September 13, 2022</small> { id="4.23.2" } - -- Fixed #4348: Blog plugin crashes on custom `nav` title -- Fixed blog plugin crashing when category contained only drafts -- Fixed rendering of content from blog index file - -### 4.23.1 <small>September 12, 2022</small> { id="4.23.1" } - -- Fixed #4345: Blog plugin errors with default settings - -### 4.23.0 <small>September 12, 2022</small> { id="4.23.0" } - -- Added blogging support via built-in blog plugin - -### 4.22.1 <small>September 7, 2022</small> { id="4.22.1" } - -- Fixed #4217: Tooltips in data tables render in wrong position - -### 4.22.0 <small>August 21, 2022</small> { id="4.22.0" } - -- Added support for navigation status - -### 4.21.1 <small>August 13, 2022</small> { id="4.21.1" } - -- Fixed #4176: Broken image when avatar is served by Gravatar -- Fixed #4212: Deferred search initialization for file:// locations - -### 4.21.0 <small>July 17, 2022</small> { id="4.21.0" } - -- Added meta plugin: set front matter for all pages in a folder -- Fixed #4114: Tags plugin fails if only `tags_extra_files` is set - -### 4.20.1 <small>July 11, 2022</small> { id="4.20.1" } - -- Fixed #4105: Tags plugin fails if `tags_file` is not set (4.20.0 regression) - -### 4.20.0 <small>July 7, 2022</small> { id="4.20.0" } - -- Added support for additional tags indexes -- Fixed #4100: Tag icons not shown in tags index - -### 4.19.2 <small>July 4, 2022</small> { id="4.19.2" } - -- Fixed #4051: Privacy plugin fails if symlinking isn't allowed on Windows - -### 4.19.1 <small>June 25, 2022</small> { id="4.19.1" } - -- Added `mkdocs-git-committers-plugin` to Dockerfile -- Added `mkdocs-git-revision-date-localized-plugin` to Dockerfile - -### 4.19.0 <small>June 24, 2022</small> { id="4.19.0" } - -- Added support for document contributors -- Updated French translations for cookie consent - -### 4.18.2 <small>June 16, 2022</small> { id="4.18.2" } - -- Fixed #4026: Fixed tooltips not mounted for nested navigation links - -### 4.18.1 <small>June 14, 2022</small> { id="4.18.1" } - -- Fixed #3990: Chinese search highlighting not working on non-boundaries - -### 4.18.0 <small>June 11, 2022</small> { id="4.18.0" } - -- Added support for automatic dark/light mode -- Fixed #4009: Privacy plugin uses invalid paths for file cache on Windows - -### 4.17.2 <small>June 5, 2022</small> { id="4.17.2" } - -- Added support for custom jieba dictionaries (Chinese search) - -### 4.17.1 <small>June 5, 2022</small> { id="4.17.1" } - -- Added support for cookie consent reject button -- Added support for cookie consent custom button ordering -- Fixed #3988: Content tab not focused after alternating anchor links - -### 4.17.0 <small>June 4, 2022</small> { id="4.17.0" } - -- Added support for content tabs anchor links (deep linking) -- Fixed #3975: Detect composition events in search interface (Chinese) -- Fixed #3980: Search plugin doesn't use title set via front matter - -### 4.16.2 <small>May 29, 2022</small> { id="4.16.2" } - -- Fixed #3961: Nested sections triggered build error for navigation tabs - -### 4.16.1 <small>May 28, 2022</small> { id="4.16.1" } - -- Switched feedback widget rating titles to tooltips -- Improved contrast of link colors for light/dark color schemes -- Fixed #3950: Sticky navigation tabs rendering broken (4.15.2 regression) -- Fixed #3958: Links invisible when using `white` primary color - -### 4.16.0 <small>May 25, 2022</small> { id="4.16.0" } - -- Added support for navigation pruning -- Fixed search results for non-segmented characters (4.15.2 regression) - -### 4.15.2 <small>May 22, 2022</small> { id="4.15.2" } - -- Removed workaround for `abbr` on touch devices (superseded by tooltips) -- Fixed #3915: Improved Chinese search query segmentation -- Fixed #3938: Fixed tooltips position for navigation titles with ellipsis - -### 4.15.1 <small>May 14, 2022</small> { id="4.15.1" } - -- Improved performance of element focus obervables -- Fixed #3531: Added prev/next buttons to content tabs -- Fixed tooltip positioning when host element is hidden - -### 4.15.0 <small>May 8, 2022</small> { id="4.15.0" } - -- Added support for improved tooltips -- Fixed #3785: Show tooltip on hover for overflowing navigation link - -### 4.14.0 <small>May 5, 2022</small> { id="4.14.0" } - -- Added Chinese language support to built-in search plugin -- Fixed all-numeric page titles raising error in social plugin - -### 4.13.2 <small>April 30, 2022</small> { id="4.13.2" } - -- Improved caching of downloaded resources in privacy plugin -- Fixed #3851: External images not downloaded by privacy plugin - -### 4.13.1 <small>April 25, 2022</small> { id="4.13.1" } - -- Fixed #3839: Tags plugin breaks without icons (4.13.0 regression) - -### 4.13.0 <small>April 24, 2022</small> { id="4.13.0" } - -- Added support for tag icons - -### 4.12.0 <small>March 27, 2022</small> { id="4.12.0" } - -- Added support for card grids and grid layouts -- Fixed #3685: Annotations sometimes broken when using instant loading -- Fixed #3742: Automatically add Mermaid.js when building for offline usage - -### 4.11.0 <small>March 6, 2022</small> { id="4.11.0" } - -- Added support for excluding external assets from privacy plugin - -### 4.10.1 <small>March 2, 2022</small> { id="4.10.1" } - -- Added missing build dependencies to Dockerfile -- Fixed encoding issues in privacy plugin, now forcing UTF-8 encoding -- Fixed #3624: Scroll to active navigation item unreliable in Firefox -- Fixed #3642: Privacy plugin errors when font setting was omitted - -### 4.10.0 <small>February 27, 2022</small> { id="4.10.0" } - -- Added support for offline plugin (supersedes offline search support) -- Improved built-in privacy plugin to download nested JavaScript assets -- Refactored configuration of built-in privacy plugin - -### 4.9.1 <small>February 21, 2022</small> { id="4.9.1" } - -- Fixed #3610: missing `lxml` dependency for privacy plugin -- Fixed error when charset is missing in `content-type` header - -### 4.9.0 <small>February 20, 2022</small> { id="4.9.0" } - -- Added privacy plugin: automatic downloading of external assets - -### 4.8.3 <small>February 13, 2022</small> { id="4.8.3" } - -- Fixed #3560: Mermaid diagrams don't render for `file://` locations - -### 4.8.2 <small>February 10, 2022</small> { id="4.8.2" } - -- Fixed #3559: Mermaid diagrams don't render inside closed `details` - -### 4.8.1 <small>February 6, 2022</small> { id="4.8.1" } - -- Fixed jump back to top on mobile when using anchor following - -### 4.8.0 <small>February 6, 2022</small> { id="4.8.0" } - -- Added support for anchor following table of contents (= auto scroll) - -### 4.7.2 <small>February 2, 2022</small> { id="4.7.2" } - -- Fixed #3526: Transparent sidebar title due to Safari bug -- Fixed #3528: Firefox sometimes clips text in flow chart diagrams - -### 4.7.1 <small>January 30, 2022</small> { id="4.7.1" } - -- Fixed #3506: Tags index not respecting title set via front matter - -### 4.7.0 <small>January 25, 2022</small> { id="4.7.0" } - -- Added native support for offline search - -### 4.6.1 <small>January 16, 2022</small> { id="4.6.1" } - -- Fixed #3459: Section index pages picking up wrong title - -### 4.6.0 <small>January 11, 2022</small> { id="4.6.0" } - -- Added support for annotations (outside of code blocks) - -### 4.5.2 <small>January 8, 2022</small> { id="4.5.2" } - -- Fixed #3440: Content tab indicator not moving when using linking -- Fixed #3445: Content tab switch flickers/jitters when using linking - -### 4.5.1 <small>January 2, 2022</small> { id="4.5.1" } - -- Added support for setting initial state of cookie consent -- Fixed #3396: Disappearing link in navigation due to Safari bug - -### 4.5.0 <small>December 16, 2021</small> { id="4.5.0" } - -- Added support for navigation icons - -### 4.4.0 <small>December 10, 2021</small> { id="4.4.0" } - -- Added support for code annotation anchor links (deep linking) -- Added new code annotation syntax modifier to strip comment -- Updated German translations for cookie consent - -### 4.3.0 <small>December 5, 2021</small> { id="4.3.0" } - -- Added support for custom fonts in social cards -- Fixed #3300: Announcement bar reappearing when using instant loading - -### 4.2.0 <small>December 2, 2021</small> { id="4.2.0" } - -- Added support for dismissable announcement bar -- Added support for named placeholders in feedback widget - -### 4.1.0 <small>November 30, 2021</small> { id="4.1.0" } - -- Added support for passing page title to feedback forms - -### 4.0.0 <small>November 28, 2021</small> { id="4.0.0" } - -- Removed deprecated content tabs legacy implementation -- Removed deprecated `seealso` admonition type -- Removed deprecated `site_keywords` setting (unsupported by MkDocs) -- Removed deprecated prebuilt search index support -- Removed deprecated web app manifest – use customization -- Removed `extracopyright` variable – use new `copyright` partial -- Removed Disqus integation – use customization -- Switched to `:is()` selectors for simple selector lists -- Switched autoprefixer from `last 4 years` to `last 2 years` -- Improved CSS overall to match modern standards -- Improved CSS variable semantics for fonts -- Improved extensibility by restructuring partials -- Improved handling of `details` when printing -- Improved keyboard navigation for footnotes -- Fixed #3214: Search highlighting breaks site when empty - -### 3.2.3 <small>November 20, 2021</small> { id="3.2.3" } - -- Updated Swedish and French translations -- Removed support for `.mermaid-experimental` class (now `.mermaid`) -- Fixed #3202: Cookie consent not dismissable on `file://` locations -- Fixed #3216: Cookie consent not dismissed when invoked via anchor -- Fixed #3232: Mermaid.js sometimes runs twice (race condition) - -### 3.2.2 <small>November 6, 2021</small> { id="3.2.2" } - -- Fixed always last feedback rating being sent -- Fixed #3145: Code annotations eat whole comment lines -- Fixed #3170: Feedback widget doesn't send data to GA4 - -### 3.2.1 <small>November 4, 2021</small> { id="3.2.1" } - -- Added support for custom Mermaid.js version via additional JavaScript -- Fixed some configuration edge cases for tags plugin (3.1.5 regression) -- Fixed feedback widget title not being centered in Firefox -- Fixed #3179: Safari doesn't send request for feedback widget - -### 3.2.0 <small>October 31, 2021</small> { id="3.2.0" } - -- Added support for feedback widget (Was this page helpful?) - -### 3.1.5 <small>October 28, 2021</small> { id="3.1.5" } - -- Fixed #3144: Rogue link when using tags with auto-populated navigation -- Fixed #3147: Code block line numbers appear in search results -- Fixed #3158: Social cards do not strip HTML tags from title - -### 3.1.4 <small>October 17, 2021</small> { id="3.1.4" } - -- Fixed #2974: Text cropped with other fonts than `Roboto` in social plugin -- Fixed #3099: Encoding problems with non-latin character in social plugin -- Fixed #3112: Japanese segmenter not executed as part of new tokenizer -- Fixed tags (front matter) appearing in search with disabled tags plugin - -### 3.1.3 <small>October 12, 2021</small> { id="3.1.3" } - -- Added warnings to search plugin for unsupported options and syntax -- Fixed #3503: Search sometimes returns entire page -- Fixed #3089: Single-line code annotations disappear when printing - -### 3.1.2 <small>October 6, 2021</small> { id="3.1.2" } - -- Fixed incorrect path separators for social cards on Windows - -### 3.1.1 <small>September 26, 2021</small> { id="3.1.1" } - -- Fixed ordering bug in search exclusion logic - -### 3.1.0 <small>September 26, 2021</small> { id="3.1.0" } - -- Added support for excluding pages, sections, and elements from search -- Fixed #2803: Code block annotations not visible when printing - -### 3.0.1 <small>September 19, 2021</small> { id="3.0.1" } - -- Added support for using literal `h1-6` tags for search plugin -- Fixed search plugin breaking on void elements without slashes -- Fixed search plugin filtering link contents from headlines -- Fixed search plugin handling of multiple `h1` headlines -- Fixed search plugin handling of missing `h1` headlines - -### 3.0.0 <small>September 13, 2021</small> { id="3.0.0" } - -- Rewrite of MkDocs' search plugin -- Added support for rich search previews -- Added support for tokenizer with lookahead -- Improved search indexing performance (twice as fast) -- Improved search highlighting - -### 2.13.3 <small>September 1, 2021</small> { id="2.13.3" } - -- Added support for disabling social card generation - -### 2.13.2 <small>August 25, 2021</small> { id="2.13.2" } - -- Fixed #2965: Social plugin error when primary color is not defined - -### 2.13.1 <small>August 21, 2021</small> { id="2.13.1" } - -- Fixed #2948: Social cards are not cached -- Fixed #2953: Mermaid.js diagrams can't be centered anymore - -### 2.13.0 <small>August 7, 2021</small> { id="2.13.0" } - -- Added support for custom colors in social cards - -### 2.12.2 <small>August 4, 2021</small> { id="2.12.2" } - -- Fixed #2891: Division by zero error in social plugin - -### 2.12.1 <small>July 26, 2021</small> { id="2.12.1" } - -- Fixed error in social plugin when `site_description` was not set -- Fixed error in social plugin for non-ASCII characters - -### 2.12.0 <small>July 25, 2021</small> { id="2.12.0" } - -- Added support for social cards - -### 2.11.1 <small>July 20, 2021</small> { id="2.11.1" } - -- Fixed order of tags index, now sorted alphabetically - -### 2.11.0 <small>July 18, 2021</small> { id="2.11.0" } - -- Improved Mermaid.js intergration, now stable -- Added support for sequence diagrams -- Added support for entity relationship diagrams -- Added support for cookie consent configuration -- Added feature flag to always enable annotations - -### 2.10.0 <small>July 10, 2021</small> { id="2.10.0" } - -- Added support for cookie consent -- Fixed #2807: Back-to-top button not hidden when using sticky tabs - -### 2.9.2 <small>May 30, 2021</small> { id="2.9.2" } - -- Moved tags to partial for easier customization -- Added support for hiding tags on any page - -### 2.9.1 <small>May 24, 2021</small> { id="2.9.1" } - -- Added missing guard for linking of content tabs - -### 2.9.0 <small>May 23, 2021</small> { id="2.9.0" } - -- Added support for linking of content tabs - -### 2.8.0 <small>May 12, 2021</small> { id="2.8.0" } - -- Added support for boosting pages in search - -### 2.7.2 <small>May 8, 2021</small> { id="2.7.2" } - -- Fixed #2638: Warnings shown when using `tags` plugin without directory URLs - -### 2.7.1 <small>May 3, 2021</small> { id="2.7.1" } - -- Fixed `git-revision-date-localized` plugin integration (2.7.0 regression) - -### 2.7.0 <small>May 1, 2021</small> { id="2.7.0" } - -- Added support for tags (with search integration) - -### 2.6.0 <small>April 11, 2021</small> { id="2.6.0" } - -- Stay on page when switching versions - -### 2.5.0 <small>March 28, 2021</small> { id="2.5.0" } - -- Added support for version warning - -### 2.4.0 <small>March 20, 2021</small> { id="2.4.0" } - -- Added support for custom admonition icons -- Fixed #2444: Code block annotations with extra comments have wrong index - -### 2.3.1 <small>March 14, 2021</small> { id="2.3.1" } - -- Fixed anchor offset for permalinks when using sticky navigation tabs - -### 2.3.0 <small>March 13, 2021</small> { id="2.3.0" } - -- Added support for back-to-top button - -### 2.2.1 <small>March 4, 2021</small> { id="2.2.1" } - -- Fixed #2382: Repository stats failing when no release tag is present - -### 2.2.0 <small>February 28, 2021</small> { id="2.2.0" } - -- Added support for code block annotations - -### 2.1.0 <small>February 26, 2021</small> { id="2.1.0" } - -- Added support for anchor tracking - -### 2.0.0 <small>February 24, 2021</small> { id="2.0.0" } - -- Migrated Insiders to the new architecture -- Swapped color palette toggle configuration - -### 1.17.0 <small>January 31, 2021</small> { id="1.17.0" } - -- Added support for section index pages - -### 1.16.1 <small>January 26, 2021</small> { id="1.16.1" } - -- Fixed #2249: Instant loading + sticky tabs result in invalid links -- Fixed #2248: Search highlighting URL parameter always added -- Fixed #2235: Version selector doesn't select current version for aliases - -### 1.16.0 <small>January 7, 2021</small> { id="1.16.0" } - -- Added latest release to repository info (GitHub) -- Slight facelift of repository info (lighter fonts, spacing and icons) - -### 1.15.0 <small>January 2, 2021</small> { id="1.15.0" } - -- Added support for native Mermaid.js integration - -### 1.14.0 <small>December 30, 2020</small> { id="1.14.0" } - -- Added support for sharing searches - -### 1.13.2 <small>December 22, 2020</small> { id="1.13.2" } - -- Fixed version selector + sticky tabs navigation rendering issues -- Fixed version selector wrapping - -### 1.13.1 <small>December 20, 2020</small> { id="1.13.1" } - -- Removed horizontal scrollbars on language and version selector -- Fixed type conversion in JavaScript config - -### 1.13.0 <small>December 13, 2020</small> { id="1.13.0" } - -- Refactored navigation tabs to simplify grouping behavior -- Added support for sticky navigation tabs -- Added support for arbitrary links in navigation tabs -- Fixed #2098: Subsequent active subsection not highlighted correctly - -### 1.12.1 <small>December 8, 2020</small> { id="1.12.1" } - -- Fixed empty language selector being shown - -### 1.12.0 <small>December 6, 2020</small> { id="1.12.0" } - -- Added support for adding a language selector - -### 1.11.2 <small>November 29, 2020</small> { id="1.11.2" } - -- Fixed #2068: Search highlight interprets code blocks as JavaScript - -### 1.11.1 <small>November 29, 2020</small> { id="1.11.1" } - -- Refactored styling to be more stable and easier to adjust -- Fixed some styling regressions from latest features - -### 1.11.0 <small>November 22, 2020</small> { id="1.11.0" } - -- Added support for rendering admonitions as inline blocks - -### 1.10.0 <small>November 15, 2020</small> { id="1.10.0" } - -- Added support for integrating table of contents into navigation - -### 1.9.0 <small>November 7, 2020</small> { id="1.9.0" } - -- Added support for hiding navigation and table of contents on any page -- Removed autohiding table of contents when empty - -### 1.8.0 <small>November 1, 2020</small> { id="1.8.0" } - -- Added support for navigation sections -- Fixed appearance of inactive search suggestions - -### 1.7.0 <small>October 25, 2020</small> { id="1.7.0" } - -- Added support for deploying multiple versions -- Fixed alignment of sidebar when content area is too small - -### 1.6.0 <small>October 11, 2020</small> { id="1.6.0" } - -- Added support for search suggestions to save keystrokes -- Added support for removing __Made with Material for MkDocs__ from footer -- Fixed #1915: search should go to first result by pressing ++enter++ - -### 1.5.1 <small>September 21, 2020</small> { id="1.5.1" } - -- Fixed content area stretching to whole width for long code blocks - -### 1.5.0 <small>September 19, 2020</small> { id="1.5.0" } - -- Added support for autohiding table of contents when empty - -### 1.4.1 <small>September 6, 2020</small> { id="1.4.1" } - -- Improved typeahead and search result relevance and scoring - -### 1.4.0 <small>August 30, 2020</small> { id="1.4.0" } - -- Added support for autohiding header on scroll - -### 1.3.0 <small>August 26, 2020</small> { id="1.3.0" } - -- Added support for user-selectable color palettes - -### 1.2.0 <small>August 11, 2020</small> { id="1.2.0" } - -- Added feature to expand navigation by default - -### 1.1.0 <small>August 3, 2020</small> { id="1.1.0" } - -- Added highlighting of search results - -### 1.0.0 <small>July 14, 2020</small> { id="1.0.0" } - -- Added grouping of search results -- Added missing query terms to search result -- Improved search result relevance and scoring diff --git a/docs/insiders/getting-started.md b/docs/insiders/getting-started.md deleted file mode 100644 index 8b8157dfe950ccd8d753ed4dcf9b352a2360de78..0000000000000000000000000000000000000000 --- a/docs/insiders/getting-started.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -title: Getting started with Insiders ---- - -# Getting started with Insiders - -Material for MkDocs Insiders is a compatible drop-in replacement for Material -for MkDocs, and can be installed similarily using [`pip`][pip], -[`docker`][docker] or [`git`][git]. Note that in order to access the Insiders -repository, you need to [become an eligible sponsor] of @squidfunk on GitHub. - - [pip]: #with-pip - [docker]: #with-docker - [git]: #with-git - [become an eligible sponsor]: index.md#how-to-become-a-sponsor - -## Requirements - -After you've been added to the list of collaborators and accepted the -repository invitation, the next step is to create a [personal access token] for -your GitHub account in order to access the Insiders repository programmatically -(from the command line or GitHub Actions workflows): - -1. Go to https://github.com/settings/tokens -2. Click on [Generate a new token] -3. Enter a name and select the [`repo`][scopes] scope -4. Generate the token and store it in a safe place - - [personal access token]: https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token - [Generate a new token]: https://github.com/settings/tokens/new - [scopes]: https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes - -## Installation - -### with pip - -Material for MkDocs Insiders can be installed with `pip`: - -``` sh -pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git -``` - -The `GH_TOKEN` environment variable must be set to the value of the personal -access token you generated in the previous step. Note that the personal access -token must be kept secret at all times, as it allows the owner to access your -private repositories. - -### with docker - -In case you want to use Material for MkDocs Insiders from within Docker, some -additional steps are necessary. While we cannot provide a hosted Docker image -for Insiders[^2], [GitHub Container Registry] allows for simple and -comfortable self-hosting: - -1. [Fork the Insiders repository] -2. Enable [GitHub Actions] on your fork[^3] -3. Create a new personal access token[^4] - 1. Go to https://github.com/settings/tokens - 2. Click on [Generate a new token] - 3. Enter a name and select the [`write:packages`][scopes] scope - 4. Generate the token and store it in a safe place -4. Add a [GitHub Actions secret] on your fork - 1. Set the name to `GHCR_TOKEN` - 2. Set the value to the personal access token created in the previous step -5. [Create a new release] to build and publish the Docker image -6. Install [Pull App] on your fork to stay in-sync with upstream - -The [`publish`][publish] workflow[^5] is automatically run when a new tag -(release) is created. When a new Insiders version is released on the upstream -repository, the [Pull App] will create a pull request with the changes and -pull in the new tag, which is picked up by the [`publish`][publish] workflow -that builds and publishes the Docker image automatically to your private -registry. - -Now, you should be able to pull the Docker image from your private registry: - -``` -docker login -u ${GH_USERNAME} -p ${GHCR_TOKEN} ghcr.io -docker pull ghcr.io/${GH_USERNAME}/mkdocs-material-insiders -``` - - [^2]: - Earlier, Insiders provided a dedicated Docker image which was available to - all sponsors. On March 21, 2021, the image was deprecated for the reasons - outlined and discussed in #2442. It was removed on June 1, 2021. - - [^3]: - When forking a repository, GitHub will disables all workflows. While this - is a reasonable default setting, you need to enable GitHub Actions to be - able to automatically build and publish a Docker image on - [GitHub Container Registry]. - - [^4]: - While you could just add the `write:packages` scope to the personal access - token created to access the Insiders repository, it's safer to create a - dedicated token which you'll only use for publishing the Docker image. - - [^5]: - The Insiders repository contains two GitHub Actions workflows: - - - `build.yml` – Build and lint the project (disabled on forks) - - `publish.yml` – Build and publish the Docker image - -### with git - -Of course, you can use Material for MkDocs Insiders directly from `git`: - -``` -git clone git@github.com:squidfunk/mkdocs-material-insiders.git mkdocs-material -``` - -The theme will reside in the folder `mkdocs-material/material`. When cloning -from `git`, the theme must be installed, so MkDocs can find the built-in -plugins: - -``` -pip install -e mkdocs-material -``` - - [GitHub Container Registry]: https://docs.github.com/en/packages/guides/about-github-container-registry - [Fork the Insiders repository]: https://github.com/squidfunk/mkdocs-material-insiders/fork - [GitHub Actions]: https://docs.github.com/en/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository - [packages scope]: https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes - [GitHub Actions secret]: https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository - [Create a new release]: https://docs.github.com/en/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release - [Pull App]: https://github.com/apps/pull - [publish]: https://github.com/squidfunk/mkdocs-material-insiders/blob/master/.github/workflows/publish.yml - -## Upgrading - -When upgrading Insiders, you should always check the version of Material for -MkDocs which makes up the first part of the version qualifier, e.g.Insiders -`4.x.x` is currently based on `8.x.x`: - -``` -8.x.x-insiders-4.x.x -``` - -If the major version increased, it's a good idea to consult the [upgrade -guide] and go through the steps to ensure your configuration is up to date and -all necessary changes have been made. If you installed Insiders via `pip`, you -can upgrade your installation with the following command: - -``` -pip install --upgrade git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git -``` - - [upgrade guide]: ../upgrade.md - -## Caveats - -This section describes some aspects to consider when using Insiders together -with Material for MkDocs to ensure that users without access to Insiders can -still build your documentation. - -### Built-in plugins - -When using built-in plugins that are solely available via Insiders, it might be -necessary to split the `mkdocs.yml` configuration into a base configuration, and -one with plugin overrides. Note that this is a limitation of MkDocs, which can -be mitigated by using [configuration inheritance]: - -=== ":octicons-file-code-16: `mkdocs.insiders.yml`" - - ``` yaml - INHERIT: mkdocs.yml - plugins: - - search - - social - - tags - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - # Configuration with everything except Insiders plugins - ``` - -Now, when you're in an environment with access to Insiders (e.g. in your CI -pipeline), you can build your documentation project with the following lines: - -``` -mkdocs build --config-file mkdocs.insiders.yml -``` - -!!! tip "Sharing plugin and extension configuration" - - If you want to share `plugins` or `markdown_extensions` between both - configuration files `mkdocs.insiders.yml` and `mkdocs.yml`, you can use - the alternative key-value syntax in both files. The above example would - then look like: - - === ":octicons-file-code-16: `mkdocs.insiders.yml`" - - ``` yaml - INHERIT: mkdocs.yml - plugins: - social: {} - ``` - - === ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - # Additional configuration above - plugins: - search: {} - tags: {} - ``` - - - [configuration inheritance]: https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance diff --git a/docs/insiders/index.md b/docs/insiders/index.md deleted file mode 100644 index 24490a55a767265b46f1869cc6bcd108a5fa3f30..0000000000000000000000000000000000000000 --- a/docs/insiders/index.md +++ /dev/null @@ -1,525 +0,0 @@ ---- -title: Insiders ---- - -# Insiders - -Material for MkDocs follows the __sponsorware__ release strategy, which means -that new features are first exclusively released to sponsors as part of -[Insiders]. Read on to learn [what sponsorships achieve], -[how to become a sponsor] to get access to Insiders, and [what's in it for you]! - -<!-- <figure class="mdx-video" markdown> - <div class="mdx-video__inner"> - <iframe src="https://streamable.com/e/yslhdu" allowfullscreen></iframe> - </div> - <figcaption markdown> - -This documentation is built with Insiders -[squidfunk.github.io/mkdocs-material][Material for MkDocs] - - </figcaption> -</figure> --> - - [Insiders]: #what-is-insiders - [what sponsorships achieve]: #what-sponsorships-achieve - [how to become a sponsor]: #how-to-become-a-sponsor - [what's in it for you]: #whats-in-it-for-me - [Material for MkDocs]: https://squidfunk.github.io/mkdocs-material/ - -## What is Insiders? - -Material for MkDocs Insiders is a private fork of Material for MkDocs, hosted as -a private GitHub repository. Almost[^1] [all new features][what's in it for you] -are developed as part of this fork, which means that they are immediately -available to all eligible sponsors, as they are made collaborators of this -repository. - - [^1]: - In general, every new feature is first exclusively released to sponsors, but - sometimes upstream dependencies like [Python Markdown Extensions] enhance - existing features that must be supported by Material for MkDocs. - -Every feature is tied to a [funding goal] in monthly subscriptions. When a -funding goal is hit, the features that are tied to it are merged back into -Material for MkDocs and released for general availability, making them available -to all users. Bugfixes are always released in tandem. - -Sponsorships start as low as [__$15 a month__][how to become a sponsor].[^2] - - [^2]: - Note that $15 a month is the minimum amount to become eligible for - Insiders. While GitHub Sponsors also allows to sponsor lower amounts or - one-time amounts, those can't be granted access to Insiders due to - technical reasons. - - [Python Markdown Extensions]: https://facelessuser.github.io/pymdown-extensions/ - [funding goal]: #funding - -## What sponsorships achieve - -Sponsorships make this project sustainable, as they buy the maintainers of this -project time – a very scarce resource – which is spent on the development of new -features, bug fixing, stability improvement, issue triage and general support. -The biggest bottleneck in Open Source is time.[^3] - - [^3]: - Making an Open Source project sustainable is exceptionally hard: maintainers - burn out, projects are abandoned. That's not great and very unpredictable. - The sponsorware model ensures that if you decide to use Material for MkDocs, - you can be sure that bugs are fixed quickly and new features are added - regularly. - -If you're unsure if you should sponsor this project, check out the list of -[completed funding goals] to learn whether you're already using features that -were developed with the help of sponsorships. You're most likely using at least -a handful of them, [thanks to our awesome sponsors]! - - [completed funding goals]: #goals-completed - [thanks to our awesome sponsors]: #how-to-become-a-sponsor - -<figure style="min-width:15.6rem"> - <blockquote class="twitter-tweet" data-conversation="none" data-dnt="true"> - <a href="https://twitter.com/WillingCarol/status/1603416470616088576?ref_src=twsrc%5Etfw"></a> - </blockquote> - <script async src="https://platform.twitter.com/widgets.js"></script> -</figure> - -## What's in it for me? - -The moment you [become a sponsor][how to become a sponsor], you'll get __immediate -access to 23 additional features__ that you can start using right away, and -which are currently exclusively available to sponsors: - -<div class="mdx-columns" markdown> - -- [x] [Privacy plugin: optimization support] :material-alert-decagram:{ .mdx-pulse title="Added on February 6, 2023" } -- [x] [Optimize plugin] :material-alert-decagram:{ .mdx-pulse title="Added on January 21, 2023" } -- [x] [Navigation path] (Breadcrumbs) :material-alert-decagram:{ .mdx-pulse title="Added on January 14, 2023" } -- [x] [Typeset plugin] -- [x] [Privacy plugin: external links] -- [x] [Navigation subtitles] -- [x] [Tags plugin: allow list] + [custom sorting] -- [x] [Blog plugin: custom index pages] -- [x] [Blog plugin: related links] -- [x] [Blog plugin] -- [x] [Navigation status] -- [x] [Meta plugin] -- [x] [Tags plugin: additional indexes] -- [x] [Document contributors] -- [x] [Automatic light / dark mode] -- [x] [Content tabs: anchor links] -- [x] [Navigation pruning] -- [x] [Tooltips] -- [x] [Chinese search support] -- [x] [Card grids] -- [x] [Privacy plugin] -- [x] [Annotations] -- [x] [Navigation icons] - -</div> - -New features are added every other week. Be sure to come back. - -## How to become a sponsor - -Thanks for your interest in sponsoring! In order to become an eligible sponsor -with your GitHub account, visit [squidfunk's sponsor profile], and complete -a sponsorship of __$15 a month or more__. You can use your individual or -organization GitHub account for sponsoring. - -__Important__: If you're sponsoring @squidfunk through a GitHub organization, -please send a short email to sponsors@squidfunk.com with the name of your -organization and the GitHub account of the individual that should be added as a -collaborator.[^4] - -You can cancel your sponsorship anytime.[^5] - - [^4]: - It's currently not possible to grant access to each member of an - organization, as GitHub only allows for adding users. Thus, after - sponsoring, please send an email to sponsors@squidfunk.com, stating which - account should become a collaborator of the Insiders repository. We're - working on a solution which will make access to organizations much simpler. - To ensure that access is not tied to a particular individual GitHub account, - create a bot account (i.e. a GitHub account that is not tied to a specific - individual), and use this account for the sponsoring. After being added to - the list of collaborators, the bot account can create a private fork of the - private Insiders GitHub repository, and grant access to all members of the - organizations. - - [^5]: - If you cancel your sponsorship, GitHub schedules a cancellation request - which will become effective at the end of the billing cycle. This means - that even though you cancel your sponsorship, you will keep your access to - Insiders as long as your cancellation isn't effective. All charges are - processed by GitHub through Stripe. As we don't receive any information - regarding your payment, and GitHub doesn't offer refunds, sponsorships are - non-refundable. - -[:octicons-heart-fill-24:{ .mdx-heart } Join our <span class="mdx-sponsorship-count" data-mdx-component="sponsorship-count"></span> awesome sponsors][squidfunk's sponsor profile]{ .md-button .md-button--primary .mdx-sponsorship-button } - -<hr /> - -<div class="mdx-premium" markdown> - -**Special thanks** to our **premium sponsors**: - -[![Cirrus CI]](https://cirrus-ci.org/){ target=_blank title="Cirrus CI" } -[![Basler]](https://docs.baslerweb.com/){ target=_blank title="Basler" } -[![Hummingbot]](https://hummingbot.io/){ target=_blank title="Hummingbot" } -[![KX]](https://kx.com/){ target=_blank title="KX Systems" } -[![Manticore Games]](https://www.manticoregames.com/){ target=_blank title="Manticore Games" } -[![Prefect]](https://orion-docs.prefect.io/){ target=_blank title="Prefect" } -[![Datadog]](https://datadoghq.com/){ target=_blank title="Datadog" } -[![Zenoss]](https://zenoss.com/){ target=_blank title="Zenoss" } -[![Elli]](https://www.elli.eco/en/home){ target=_blank title="Elli - A Brand of the Volkswagen Group" } -[![RStudio]](https://solutions.rstudio.com){ target=_blank title="RStudio" } -[![n8n]](https://n8n.io){ target=_blank title="n8n" } -[![Dogado]](https://www.dogado.de){ target=_blank title="Dogado" } -[![World Wide Technology]](https://wwt.com){ target=_blank title="World Wide Technology" } -[![Coda]](https://coda.io){ target=_blank title="Coda" } -[![Elastic]](https://elastic.co){ target=_blank title="Elastic" } -[![ConsenSys]](https://consensys.net){ target=_blank title="ConsenSys" } -[![Hyperledger]](https://www.hyperledger.org){ target=_blank title="Hyperledger Foundation" } -[![IP Fabric]](https://ipfabric.io/){ target=_blank title="IP Fabric" } -[![Apex.AI]](https://www.apex.ai/){ target=_blank title="Apex.AI" } -[![Jitterbit]](https://jitterbit.com/){ target=_blank title="Jitterbit" } -[![Sparkfun]](https://sparkfun.com/){ target=_blank title="Sparkfun Electronics" } -[![Automation Technology]](https://automationtechnology.de/){ target=_blank title="Automation Technology" } -[![Eccenca]](https://eccenca.com/){ target=_blank title="Eccenca" } -[![SealVault]](https://sealvault.org/){ target=_blank title="SealVault" } -[![Neptune]](https://neptune.ai/){ target=_blank title="Neptune" } -[![Cash App]](https://cash.app/){ target=_blank title="Cash App" } -[![RackN]](https://rackn.com/){ target=_blank title="RackN" } -[![CivicActions]](https://civicactions.com/){ target=_blank title="CivicActions" } - -</div> - - [Cirrus CI]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-cirrus-ci.png - [Basler]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-basler.png - [Hummingbot]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-hummingbot.png - [KX]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-kx.png - [Manticore Games]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-manticore-games.png - [Account technologies]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-account-technologies.png - [Prefect]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-prefect.png - [Datadog]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-datadog.png - [Zenoss]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-zenoss.png - [Elli]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-elli.png - [RStudio]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-rstudio.png - [n8n]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-n8n.png - [Dogado]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-dogado.png - [World Wide Technology]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-wwt.png - [Coda]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-coda.png - [Elastic]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-elastic.png - [ConsenSys]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-consensys.png - [Hyperledger]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-hyperledger.png - [IP Fabric]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-ip-fabric.png - [Apex.AI]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-apex-ai.png - [Jitterbit]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-jitterbit.png - [Sparkfun]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-sparkfun.png - [Automation Technology]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-automation-technology.png - [Eccenca]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-eccenca.png - [SealVault]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-sealvault.png - [Neptune]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-neptune-ai.png - [Cash App]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-cashapp.png - [RackN]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-rackn.png - [CivicActions]: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/sponsors/sponsor-civic-actions.png - -<hr /> - -<div class="mdx-sponsorship" data-mdx-component="sponsorship" hidden> - <div class="mdx-sponsorship__list"></div> - <small> - If you sponsor publicly, you're automatically added here with a link to - your profile and avatar to show your support for Material for MkDocs. - Alternatively, if you wish to keep your sponsorship private, you'll be a - silent +1. You can select visibility during checkout and change it - afterwards. - </small> -</div> - - [squidfunk's sponsor profile]: https://github.com/sponsors/squidfunk?metadata_origin=docs - -## Funding <span class="mdx-sponsorship-total" data-mdx-component="sponsorship-total"></span> - -### Goals - -The following section lists all funding goals. Each goal contains a list of -features prefixed with a checkmark symbol, denoting whether a feature is -:octicons-check-circle-fill-24:{ style="color: #00e676" } already available or -:octicons-check-circle-fill-24:{ style="color: var(--md-default-fg-color--lightest)" } planned, but not yet implemented. When the funding goal is hit, the features -are released for general availability. - -#### $ 12,000 – Piri Piri - -- [x] [Blog plugin] -- [x] [Chinese search support] -- [x] [Annotations] -- [x] [Navigation icons] -- [x] [Navigation pruning] -- [x] [Navigation status] - - [Blog plugin]: ../setup/setting-up-a-blog.md - [Chinese search support]: ../blog/posts/chinese-search-support.md - [Annotations]: ../reference/annotations.md - [Navigation icons]: ../reference/index.md#setting-the-page-icon - [Navigation pruning]: ../setup/setting-up-navigation.md#navigation-pruning - [Navigation status]: ../reference/index.md#setting-the-page-status - -#### $ 14,000 – Goat's Horn - -- [x] [Privacy plugin] -- [x] [Card grids] -- [x] [Tooltips] -- [x] [Content tabs: anchor links] -- [x] [Automatic light / dark mode] -- [x] [Document contributors] - - [Privacy plugin]: ../setup/ensuring-data-privacy.md - [Card grids]: ../reference/grids.md - [Tooltips]: ../reference/tooltips.md - [Content tabs: anchor links]: ../reference/content-tabs.md#anchor-links - [Automatic light / dark mode]: ../setup/changing-the-colors.md#automatic-light-dark-mode - [Document contributors]: ../setup/adding-a-git-repository.md#document-contributors - -#### $ 16,000 – Chipotle - -- [x] [Meta plugin] -- [x] [Blog plugin: related links] -- [x] [Blog plugin: custom index pages] -- [x] [Tags plugin: additional indexes] -- [x] [Tags plugin: allow list] and [custom sorting] -- [x] [Navigation subtitles] - - [Meta plugin]: ../reference/index.md#built-in-meta-plugin - [Blog plugin: related links]: ../setup/setting-up-a-blog.md#adding-related-links - [Blog plugin: custom index pages]: ../setup/setting-up-a-blog.md#custom-index-pages - [Tags plugin: additional indexes]: ../setup/setting-up-tags.md#+tags.tags_extra_files - [Tags plugin: allow list]: ../setup/setting-up-tags.md#+tags.tags_allowed - [custom sorting]: ../setup/setting-up-tags.md#+tags.tags_compare - [Navigation subtitles]: ../reference/index.md#setting-the-page-subtitle - -#### $ 20,000 – Jalapeño - -- [x] [Optimize plugin] -- [x] [Typeset plugin] -- [x] [Privacy plugin: external links] -- [x] [Navigation path] (Breadcrumbs) -- [x] [Privacy plugin: optimization support] -- [ ] Code block line wrapping - - [Optimize plugin]: ../setup/building-an-optimized-site.md#built-in-optimize-plugin - [Typeset plugin]: ../reference/index.md#built-in-typeset-plugin - [Privacy plugin: external links]: ../setup/ensuring-data-privacy.md#+privacy.external_links - [Privacy plugin: optimization support]: ../setup/ensuring-data-privacy.md#+privacy.external_assets_include - [Navigation path]: ../setup/setting-up-navigation.md#navigation-path - [Instant previews]: https://twitter.com/squidfunk/status/1466794654213492743 - -#### $ 24,000 – Blockpaprika - -- [ ] [Instant previews] - -### Goals completed - -This section lists all funding goals that were previously completed, which means -that those features were part of Insiders, but are now generally available and -can be used by all users. - -#### $ 10,000 – Carolina Reaper - -- [x] [Brand new search plugin] -- [x] [Rich search previews] -- [x] [Tokenizer with lookahead] -- [x] [Advanced search highlighting] -- [x] [Excluding content from search] -- [x] [Offline plugin] - - [Brand new search plugin]: ../blog/posts/search-better-faster-smaller.md - [Rich search previews]: ../blog/posts/search-better-faster-smaller.md#rich-search-previews - [Tokenizer with lookahead]: ../blog/posts/search-better-faster-smaller.md#tokenizer-lookahead - [Advanced search highlighting]: ../blog/posts/search-better-faster-smaller.md#accurate-highlighting - [Excluding content from search]: ../setup/setting-up-site-search.md#search-exclusion - [Offline plugin]: ../setup/building-for-offline-usage.md - -#### $ 8,000 – Scotch Bonnet - -- [x] [Social cards] -- [x] [Code annotations: anchor links] -- [x] [Code annotations: strip comments] -- [x] [Tag icons] -- [x] [Table of contents anchor following] -- [x] Sidebars automatically scroll to active item - - [Social cards]: ../setup/setting-up-social-cards.md - [Code annotations: anchor links]: ../reference/code-blocks.md#anchor-links - [Code annotations: strip comments]: ../reference/code-blocks.md#stripping-comments - [Tag icons]: ../setup/setting-up-tags.md#tag-icons-and-identifiers - [Table of contents anchor following]: ../setup/setting-up-navigation.md#anchor-following - -#### $ 7,000 – Royal Gold - -- [x] [Cookie consent] -- [x] [Was this page helpful?] -- [x] [Dismissable announcement bar] - - [Cookie consent]: ../setup/ensuring-data-privacy.md#cookie-consent - [Was this page helpful?]: ../setup/setting-up-site-analytics.md#was-this-page-helpful - [Dismissable announcement bar]: ../setup/setting-up-the-header.md#mark-as-read - -#### $ 6,000 – Trinidad Scorpion - -- [x] [Boosting pages in search] -- [x] [Custom admonition icons] -- [x] [Linking content tabs] - - [Boosting pages in search]: ../setup/setting-up-site-search.md#search-boosting - [Custom admonition icons]: ../reference/admonitions.md#admonition-icons - [Linking content tabs]: ../reference/content-tabs.md#linked-content-tabs - -#### $ 5,000 – Aji Panca - -- [x] [Mermaid.js integration] -- [x] Stay on page when switching versions -- [x] [Tags with search integration] - - [Mermaid.js integration]: ../reference/diagrams.md - [Tags with search integration]: ../setup/setting-up-tags.md - -#### $ 4,000 – Ghost Pepper - -- [x] [Anchor tracking] -- [x] [Code annotations] -- [x] [Version warning] - - [Anchor tracking]: ../setup/setting-up-navigation.md#anchor-tracking - [Code annotations]: ../reference/code-blocks.md#adding-annotations - [Version warning]: ../setup/setting-up-versioning.md#version-warning - -#### $ 3,000 – Caribbean Red - -- [x] [Sticky navigation tabs] -- [x] [Section index pages] -- [x] [Remove generator notice] - - [Sticky navigation tabs]: ../setup/setting-up-navigation.md#sticky-navigation-tabs - [Section index pages]: ../setup/setting-up-navigation.md#section-index-pages - [Remove generator notice]: ../setup/setting-up-the-footer.md#generator-notice - -#### $ 2,500 – Biquinho Vermelho - -- [x] [Search suggestions] -- [x] [Search highlighting] -- [x] [Search sharing] - - [Search suggestions]: ../setup/setting-up-site-search.md#search-suggestions - [Search highlighting]: ../setup/setting-up-site-search.md#search-highlighting - [Search sharing]: ../setup/setting-up-site-search.md#search-sharing - -#### $ 2,000 – Black Pearl - -- [x] Latest release tag -- [x] [Color palette toggle] -- [x] [Back-to-top button] - - [Color palette toggle]: ../setup/changing-the-colors.md#color-palette-toggle - [Back-to-top button]: ../setup/setting-up-navigation.md#back-to-top-button - -#### $ 1,500 – Bhut Jolokia - -- [x] [Admonition inline blocks] -- [x] [Site language selection] -- [x] [Versioning] - - [Admonition inline blocks]: ../reference/admonitions.md#inline-blocks - [Site language selection]: ../setup/changing-the-language.md#site-language-selector - [Versioning]: ../setup/setting-up-versioning.md#versioning - -#### $ 1,000 – Prairie Fire - -- [x] [Navigation sections] -- [x] [Navigation expansion] -- [x] [Hiding the sidebars] -- [x] [Table of contents in navigation] -- [x] [Header hides on scroll] - - [Navigation sections]: ../setup/setting-up-navigation.md#navigation-sections - [Navigation expansion]: ../setup/setting-up-navigation.md#navigation-expansion - [Hiding the sidebars]: ../setup/setting-up-navigation.md#hiding-the-sidebars - [Table of contents in navigation]: ../setup/setting-up-navigation.md#navigation-integration - [Header hides on scroll]: ../setup/setting-up-the-header.md#automatic-hiding - -#### $ 500 – Madame Jeanette - -- [x] Improved search result grouping -- [x] Improved search result relevance and scoring -- [x] Missing query terms in search results - -## Frequently asked questions - -### Compatibility - -_We're building an open source project and want to allow outside collaborators -to run and build our documentation locally without having access to Insiders. -Is this still possible?_ - -Yes. Insiders is compatible with Material for MkDocs. Almost all new features -and configuration options are either backward-compatible or implemented behind -feature flags. When working with outside collaborators, it should be rarely -necessary to change the general appearance of your site. Most Insiders features -enhance the overall experience, e.g. by adding icons to pages or providing a -feedback widget. While this features add value for the user of your site, they -shouldn't be necessary for previewing when making changes to content. Currently, -the only content-related features in Insiders that can't be properly previewed -by non-Insiders users are: - -- [Annotations] -- [Card grids] - -This means that outside collaborators are able to build the documentation -locally with Material for MkDocs and when they push their changes, your CI -pipeline will build it with Insiders. When using built-in plugins that are -exclusive to Insiders, it's recommended to split configuration into a base -`mkdocs.yml` and one with plugin overrides via [configuration inheritance]. - -See the [getting started guide] for more information. - - [configuration inheritance]: https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance - [getting started guide]: getting-started.md#caveats - -### Payment - -_We don't want to pay for sponsorship every month. Are there any other options?_ - -Yes. You can sponsor on a yearly basis by [switching your GitHub account to a -yearly billing cycle][billing cycle]. If for some reason you cannot do that, you -could also create a dedicated GitHub account with a yearly billing cycle, which -you only use for sponsoring (some sponsors already do that). - -If you have any problems or further questions, please reach out to -sponsors@squidfunk.com. - - [billing cycle]: https://docs.github.com/en/github/setting-up-and-managing-billing-and-payments-on-github/changing-the-duration-of-your-billing-cycle - -### Terms - -_Are we allowed to use Insiders under the same terms and conditions as -Material for MkDocs?_ - -Yes. Whether you're an individual or a company, you may use _Material for MkDocs -Insiders_ precisely under the same terms as Material for MkDocs, which are given -by the [MIT license]. However, we kindly ask you to respect our -__fair use policy__: - -- Please __don't distribute the source code__ of Insiders. You may freely use - it for public, private or commercial projects, privately fork or mirror it, - but please don't make the source code public, as it would counteract the - sponsorware strategy. - -- If you cancel your subscription, you're automatically removed as a - collaborator and will miss out on all future updates of Insiders. However, you - may __use the latest version__ that's available to you __as long as you like__. - Just remember that [GitHub deletes private forks]. - - [MIT license]: ../license.md - [GitHub deletes private forks]: https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/removing-a-collaborator-from-a-personal-repository diff --git a/docs/license.md b/docs/license.md deleted file mode 100644 index 9ac1b94f890f244c5968c71c16ff065c0cddd553..0000000000000000000000000000000000000000 --- a/docs/license.md +++ /dev/null @@ -1,23 +0,0 @@ -# License - -**MIT License** - -Copyright (c) 2016-2023 Martin Donath - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/docs/news/news.md b/docs/news/news.md new file mode 100644 index 0000000000000000000000000000000000000000..e61459078e891cb5fb2c2d9a80f15db71f04a88a --- /dev/null +++ b/docs/news/news.md @@ -0,0 +1 @@ +# News diff --git a/docs/philosophy.md b/docs/philosophy.md deleted file mode 100644 index 13960e9629f509cc395fc47446dc8404de307461..0000000000000000000000000000000000000000 --- a/docs/philosophy.md +++ /dev/null @@ -1,94 +0,0 @@ -# Philosophy - -Before settling for Material for MkDocs, it's a good idea to understand the -philosophy behind the project, in order to make sure it aligns with your goals. -This page explains the design principles anchored in Material for MkDocs, and -discusses the [conventions] used in this documentation. - - [conventions]: #conventions - -## Design principles - -- __It's just Markdown__: Focus on the content of your documentation and create - a professional static site in minutes. No need to know HTML,CSS or JavaScript - – let Material for MkDocs do the heavy lifting for you. - -- __Works on all devices__: Serve your documentation with confidence – the - underlying layout automatically adapts to perfectly fit the available screen - estate, no matter the type or size of the viewing device. - -- __Made to measure__: Change the colors, fonts, language, icons, logo and much - more with a few lines of configuration. Material for MkDocs can be easily - extended and provides tons of options to alter appearance and behavior. - -- __Fast and lightweight__: Don't let your users wait – get incredible value - with a small footprint, by using one of the fastest themes around with - excellent performance, yielding great search engine rankings and happy - users that return. - -- __Accessible__: Make accessibility a priority – users can navigate your - documentation with touch devices, keyboard, and screen readers. Semantic - markup ensures that your documentation works for everyone. - -- __Open Source__: Trust 20,000+ users – choose a mature and well-funded - solution built with state-of-the-art Open Source technologies. Keep ownership - of your content without fear of vendor lock-in. Licensed under MIT. - -## Conventions - -### Symbols - -This documentation use some symbols for illustration purposes. Before you read -on, please make sure you've made yourself familiar with the following list of -conventions: - -[:octicons-heart-fill-24:{ .mdx-heart } Insiders][Insiders]{ .mdx-insiders } - -: Some features are not yet available in the community edition, but only as - part of the Insiders build of Material for MkDocs. Please consult the - [Insiders] guide to learn how to get access. - -:octicons-tag-24: __{x.x.x}__ - -: The tag icon in conjunction with a version number denotes when a specific - feature or behavior was added. Make sure you're at least on this version - if you want to use it. - -:octicons-file-code-24: __{file.ext}__ - -: The source file icon together with a file name is sometimes used in code - examples which span multiple files. The file name (or path) always starts - from the location of `mkdocs.yml`. - -:octicons-milestone-24: __Default__: _value_ - -: Some properties in `mkdocs.yml` have default values for when the author - does not explicitly define them. The default value of the property is always - included. - -:octicons-unlock-24: __Feature flag__ - -: Most of the features are hidden behind feature flags, which means they must - be explicitly enabled via `mkdocs.yml`. This allows for the existence of - potentially orthogonal features. - -:octicons-beaker-24: __Experimental__ - -: Some newer features are still considered experimental, which means they - might (although rarely) change at any time, including their complete removal - (which hasn't happened yet). - - -:octicons-cpu-24: __Plugin__ - -: Several features are implemented through MkDocs excellent plugin - architecture, some of which are built-in and distributed with Material for - MkDocs, so no installation is required. - -:octicons-package-24: __Utility__ - -: Besides plugins, there are some utilities that build on top of MkDocs in - order to provide extended functionality, like for example support for - versioning. - - [Insiders]: insiders/index.md diff --git a/docs/publications/articles.md b/docs/publications/articles.md new file mode 100644 index 0000000000000000000000000000000000000000..17a0200466aca58b44423c9a05df3ecb46da584a --- /dev/null +++ b/docs/publications/articles.md @@ -0,0 +1,147 @@ +# LAGO Articles + + +- Calibration of the operative cosmic ray detector at Marambio Base in the Antarctic Peninsula + Author(s): Santos, Noelia A. and Dasso, Sergio and Gulisano, Adriana M. and Areso, Omar and Pereira, MatÃas + Journal: NMDB@Home 2020: Proceedings of the 1st virtual symposium on cosmic ray studies with neutron detectors (2021). DOI: 10.38072/2748-3150/p20 +- Observations of the cosmic ray detector at the Argentine Marambio base in the Antarctic Peninsula + Author(s): Santos, Noelia Ayelén and Dasso, Sergio and Gulisano, Adriana MarÃa and Areso, Omar and Pereira, Matias and Asorey, Hernán and Rubinstein + Journal: Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment (2021). DOI: 10.22323/1.395.0304 +- Calibración del detector de rayos cósmicos instalado en la base Antártica Argentina Marambio + Author(s): Santos, N.A. and Dasso, S. and Gulisano, A.M. and Areso, O. and Pereira, M. and LAGO Collaboration + Journal: Boletin de la Asociacion Argentina de Astronomia La Plata Argentina (2021). +- The EOSC-Synergy cloud services implementation for the Latin American Giant Observatory (LAGO) + Author(s): Rubio-Montero, AJ and Pagán-Muñoz, R and Mayo-GarcÃa, R and Pardo-Diaz, A and Sidelnik, I and Asorey, H + Journal: Proceedings of Science (2021). DOI: 10.22323/1.395.0261 +- A Novel Cloud-based Framework for Standardised Simulations in the Latin American Giant Observatory (LAGO) + Author(s): Rubio-Montero, AJ and Pagán-Muñoz, R and Mayo-GarcÃa, R and Pardo-Diaz, A and Sidelnik, I and Asorey, H + Journal: IEEE Proceedings of the WSC2021 Conference. +- Development of a web monitor for the water Cherenkov detectors array of the LAGO project + Author(s): Otiniano, Luis and Sidelnik, Iván and Lago Collaboration and others + Journal: Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment (2019). DOI: 10.1016/j.nima.2019.02.035 +- Hardware-level calibration of the Chitaga Water Cherenkov Detector in the GUANE array for space weather study + Author(s): RodrÃguez, Jesus Peña + Journal: Scientia et technica (2019). DOI: +- Implementación de una tarjeta digitalizadora especializada para el sistema de detección de Radiación Cherenkov en el proyecto LAGO + Author(s): Perengüez, Juan E. AND Bastidas, Cristian C. AND Escobar, Edisson + Journal: Momento (2019). DOI: +- Performance of the Water Cherenkov detector LAGO-Chiapas, Mexico + Author(s): Morales Olivares, Oscar G. and de León Hidalgo, Hugo and Caballero Mora, Karen Salomé and Arceo Reyes, Roberto and Moreno Barbosa, Eduardo and Zepeda DomÃngez, Arnulfo and Ãlvarez Ochoa, César and Hueyotl Zahuantitla, Filiberto and Pérez Sánchez, Luis Rodolfo and Santos for the LAGO Collaboration, Elà + Journal: PoS (2019). DOI: 10.22323/1.358.0358 +- Modeling the LAGO's detectors response to secondary particles at ground level from the Antarctic to Mexico + Author(s): Sarmiento-cano, Christian and Suárez-Durán, Mauricio and Vásquez-RamÃrez, Adriana and Jaimes-Motta, Andrei and Calderón-Ardila, Rolando and Peña-RodrÃguez, Jesús + Journal: PoS (2019). DOI: 10.22323/1.358.0412 +- Water Cherenkov detector optimization for space weather studies in Antarctic. + Author(s): Otiniano, Luis and Valera, Victor and Vega, Juan and Castromonte, Cesar and Peña, Jesús + Journal: PoS (2019). DOI: 10.22323/1.358.1137 +- Preliminary results of the design and development of the data acquisition and processing system for the LAGO Collaboration + Author(s): Arnaldi, Luis Horacio and Cazar, Dennis and Audelo, Mario and Sidelnik, Iván + Journal: PoS (2019). DOI: 10.22323/1.358.0175 +- Preliminary results from the latin american giant observatory space weather simulation chain + Author(s): Asorey, Hernan and Núñez, Luis A and Suárez-Durán, Mauricio + Journal: Space Weather (2018). DOI: 10.1002/2017SW001774 +- Results from The Latin American Giant Observatory Space Weather Simulation Chain + Author(s): Durán, Mauricio Suárez and Asorey, Hernán and Núñez, Luis A + Journal: arXiv preprint (2018). DOI: +- Pruebas de Luz para un WCD de LAGO-Guatemala + Author(s): RamÃrez, Christian + Journal: Meeting of the Cosmic Rays Division of the Mexican Physical Society (2018). DOI: +- LAGO: The Latin American giant observatory + Author(s): Iván Sidelnik and Hernán Asorey + Journal: Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment (2017). DOI: 10.1016/j.nima.2017.02.069 +- Calibration of a large water-Cherenkov detector at the Sierra Negra site of LAGO + Author(s): Galindo, Aline and Moreno, E and Carrasco, E and Torres, Ibrahim and Carramiñana, A and Bonilla, M and Salazar, H and Conde, R and Alvarez, W and Alvarez, C and others + Journal: Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment (2017). DOI: 10.1016/j.nima.2017.03.055 +- A simulation chain for the LAGO Space Weather Program + Author(s): Asorey, Hernan and Núñez, Luis A and Suárez-Durán, Mauricio + Journal: arXiv preprint (2017). DOI: +- LAGO Distributed network of Data Repositories + Author(s): Asorey, H.MartÃnez-Méndez, A.Núñez, L.A.Valbuena-Delgado, A. + Journal: Revista Mexicana de AstronomÃa y AstrofÃsica (2017). DOI: +- Development of the LAGO Project in Chiapas-Mexico + Author(s): Caballero Mora, Salomé Karen and de León Hidalgo, Hugo and Arceo Reyes, Roberto and Moreno Barbosa, Eduardo and Tibollla, Omar and Kaufmann, Sarah and {\'A}lvarez Ochoa, César and RodrÃguez, Elà Santos and Hueyotl Zahuantitla, Filiberto and Pérez Sánchez, Luis Rodolfo and others + Journal: PoS (2017). DOI: 10.22323/1.301.0385 +- The cosmic rays web monitor of the LAGO project + Author(s): Otiniano, Luis and Alvarado, Ch and Guevara, W + Journal: PoS (2017). DOI: 10.22323/1.301.0352 +- Implementation, calibration and operation of a Water Cherenkov Detector at Escuela Politécnica Nacional + Author(s): Vargas, Stephany and Vásquez, Nicolás and Delgado, Andrés and Martinez, Oscar + Journal: PoS (2017). DOI: 10.22323/1.301.0348 +- The Water Cherenkov Detector Array of the LAGO project in Huancayo-Peru + Author(s): Otiniano, Luis and Alvarado, Ch and Guevara, W and Quispe, F and Truyenque, J + Journal: PoS (2017). DOI: 10.22323/1.301.0351 +- Observation of the Forbush decrease of 22 June 2015 with the LAGO detector in Brazil + Author(s): Fauth, Anderson and Vieira de Souza, Henrique + Journal: PoS (2017). DOI: 10.22323/1.301.0130 +- Proyecto internacional LAGO + Author(s): Torres, Ibrahim + Journal: Encuentro Latinoamericano de eCiencia (2017). DOI: +- Status of LAGO at mount Chacaltaya + Author(s): Condori, Ronald and Nina, Carlos and Andrade, Marko and Subieta, Martin and Rivera, Hugo and Miranda, Pedro and Raljević, Mirko and Guzmán, RocÃo and Ticona, Rolando + Journal: PoS (2017). DOI: 10.22323/1.301.0355 +- Earthquake Studies Using a LAGO Water Cherenkov Detector in Ecuador + Author(s): Navarro, Felipe and Carrera, Edgar and Escobar, Ricardo and Cazar, Dennis and others + Journal: The International Cosmic Ray Conference (2017). DOI: +- Design of a New Data Acquisition System for Particle Detectors used by The LAGO Collaboration + Author(s): Navarro and Cazar, Dennis and others + Journal: The International Cosmic Ray Conference (2017). DOI: +- A project to install water-cherenkov detectors in the antarctic peninsula as part of the LAGO detection network + Author(s): Dasso, Sergio and MasÃas-Meza, Jimmy Joel and Gulisano, Adriana MarÃa and Asorey, Hernan + Journal: PoS (2016). DOI: 10.22323/1.236.0105 +- Data accessibility, reproducibility and trustworthiness with lago data repositories + Author(s): Asorey, H and Torres-Niño, Luis A and Cazar-RamÃrez, D and Cazar-Ramirez, Dennis and Núñez, LA and Mayo-GarcÃa, R + Journal: PoS (2016). DOI: 10.22323/1.236.0672 +- LAGO Ecuador, Implementing a set of WCD detectors for Space Weather research: first results and further developments + Author(s): Vargas, Stephany and Mantilla, Cristina and Cazar, Dennis and Vásquez, Nicolás and Martinez, Oscar + Journal: PoS (2016). DOI: 10.22323/1.236.0135 +- The Latin American Giant Observatory: Contributions to the 34th International Cosmic Ray Conference (ICRC 2015) + Author(s): Alvarez, W and Alvarez, C and Araujo, C and Areso, O and Arnaldi, H and Asorey, H and Audelo, M and Barros, H and Bertou, X and Bonnett, M and others + Journal: arXiv preprint (2016). DOI: +- LAGO: the latin american giant observatory + Author(s): Asorey, Hernan and Dasso, S + Journal: PoS (2016). DOI: 10.22323/1.236.0247 +- The sites of the latin american giant observatory + Author(s): Sidelnik, Iván + Journal: PoS (2016). DOI: 10.22323/1.236.0665 +- The data acquisition system of the Latin American Giant Observatory (LAGO) + Author(s): Haro, M Sofo and Arnaldi, Luis Horacio and Alvarez, W and Alvarez, C and Araujo, C and Areso, O and Arnaldi, H and Asorey, H and Audelo, M and Barros, H and others + Journal: Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment (2016). DOI: 10.1016/j.nima.2016.02.101 +- The Latin American Giant Observatory: a successful collaboration in Latin America based on Cosmic Rays and computer science domains + Author(s): Asorey, Hernán and Núñez, Luis A and Suárez-Durán, M and Torres-Niño, LA and RodrÃguez-Pascual, M and Rubio-Montero, Antonio J and Mayo-GarcÃa, R + Journal: 2016 16th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (CCGrid) (2016). DOI: 10.1109/CCGrid.2016.110 +- The LAGO Space Weather Program: Directional Geomagnetic Effects, Background Fluence Calculations and Multi-Spectral Data Analysis + Author(s): Suárez-Durán, Mauricio and Nunez, Luis and Sarmiento, Christian and Asorey, Hernan and Peréz, Yunior and Dasso, Sergio + Journal: PoS (2016). DOI: 10.22323/1.236.0142 +- Development of a High Altitude LAGO Site in Peru + Author(s): Otiniano, Luis + Journal: PoS (2016). DOI: 10.22323/1.236.0688 +- Analysis of Background Cosmic Ray Rate in the 2010-2012 Period from the LAGO-Chacaltaya Detectors + Author(s): Sarmiento, Christian and Nuñez-Castiñeyra, Luis Arturo and Asorey, Hernán and Nunez, Luis and Miranda, Pedro and Salinas, Carlos and Ticona, R. + Journal: PoS (2016). DOI: 10.22323/1.236.0414 +- Forbush decreases detected by the Muonca muon telescopes on 13 September and 22 December 2014 + Author(s): Fauth, Anderson + Journal: PoS (2016). DOI: 10.22323/1.236.0073 +- Desarrollo de un detector de rayos cósmicos de la colaboración LAGO en Buenos Aires-Aplicaciones en meteorologÃa espacial + Author(s): Coppola, M and Bezzecchi, F and Gulisano, AM and MasÃas-Meza, JJ and Areso, O and Ramelli, M and Dasso, S and LAGO Collaboration and others + Journal: Boletin de la Asociacion Argentina de Astronomia La Plata Argentina (2016). DOI: +- Geant4 based simulation of the Water Cherenkov Detectors of the LAGO Project + Author(s): Calderón, Rolando and Asorey, Hernan and Núñez, Luis A and LAGO Collaboration and others + Journal: Nuclear and Particle Physics Proceedings (2015). DOI: 10.1016/j.nuclphysbps.2015.10.141 +- Implementing a WCD detector system in Ecuador as part of the LAGO Project + Author(s): Mantilla, C and Audelo, M and Calderon, M and Carrera, E and Cazar, D and Martinez, O and Quishpe, R and Vargas, S and Vasquez, N and LAGO Collaboration and others + Journal: Nuclear and Particle Physics Proceedings (2015). DOI: 10.1016/j.nuclphysbps.2015.10.143 +- Implementing the De-thinning Method for High Energy Cosmic Rays Extensive Air Showers Simulations + Author(s): Estupiñán, Alex and Asorey, Hernan and Núñez, Luis A + Journal: Nuclear and Particle Physics Proceedings (2015). DOI: 10.1016/j.nuclphysbps.2015.10.140 +- Calibration of large water-cherenkov detector at the sierra negra site of LAGO + Author(s): Galindo, A and Moreno, E and Carrasco, E and Torres, I and Alonso, Alberto Carramiñana + Journal: Proceedings of Science (2015). DOI: 10.1016/j.nima.2017.03.055 +- Chain-reds dart challenge + Author(s): Barbera, Roberto and Becker, Bruce and Carrubba, Carla and Inserra, Giuseppina and Jalife Villal{\'o}n, Salma and Kanellopoulos, Christos and Koumantaros, Kostas and Mayo Garc{\'\i}a, Rafael and N{\'u}{\~n}ez, Luis A and Prnjat, Ognjen and others + Journal: (2014). DOI: +- The large aperture GRB observatory + Author(s): Bertou, Xavier and LAGO Collaboration + Journal: AIP Conference Proceedings (2009). DOI: 10.1063/1.3141355 +- Use of water-Cherenkov detectors to detect gamma ray bursts at the Large Aperture GRB Observatory (LAGO) + Author(s): Allard, D and Allekotte, Ingomar and Alvarez, C and Asorey, H and Barros, H and Bertou, X and Burgoa, O and Berisso, M Gomez and Mart{\'\i}nez, O and Loza, P Miranda and others + Journal: Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment (2008). DOI: 10.1016/j.nima.2008.07.041 diff --git a/docs/publications/documents.md b/docs/publications/documents.md new file mode 100644 index 0000000000000000000000000000000000000000..fb5fece5a5deff8076fb1c2e630fe8267fb48ac6 --- /dev/null +++ b/docs/publications/documents.md @@ -0,0 +1,35 @@ +# LAGO Documents + +## Publications + +- The Latin American Giant Observatory as an Observational Alternative at High Altitude (Revista Mexicana de Astronomia y Astrofisica Conference Series 40, 135-140, 2011) +- LAGOVirtual: A Collaborative Environment for Latin American Giant Observatory (Proceedings of the Second EELA-2 Conference) +- Operating Water Cherenkov Detectors in high altitude sites for Latin American Giant Observatory (Proceedings of the 31st ICRC, Lodz 2009) +- Latin American Giant Observatory (Proceedings of the 31st ICRC, Lodz 2009) +- Water Cherenkov Detectors response to a Gamma Ray Burst in Latin American Giant Observatory (Proceedings of the 31st ICRC, Lodz 2009) +- Latin American Giant Observatory (AIP Conf. Proc. -- April 30, 2009 -- Volume 1123, pp. 197-203) +- Use of water-Cherenkov detectors to detect Gamma Ray Bursts at the Large Aperture GRB Observatory (LAGO) (Nuclear Inst. and Methods in Physics Research, A 595 (2008), pp. 70-72) +- Looking for the high energy component of GRBs at Latin American Giant Observatory (ICRC 2007) +- The Large Aperture GRB Observatory, Actas del Workshop AstronomÃa Observacional en Argentina: Problemas y Perspectivas, 2006, P. Benaglia, & S. Cellone, eds. (in spanish) + + +## Other Documents + +Documents relative to the physics by LAGO members: + +- Diseño y caracterizacioÌn de un detector de muones combinado: Water Cherenkov y paletas centelladoras (Laboratorio 7, Departamento de fıÌsica-FCEyN UBA. AilıÌn Sansalone, Carmina PeÌrez Bertolli. Julio 2019) +- Simultaneous observation at sea level and at 5200 m.a.s.l. of high energy particles in the South Atlantic Anomaly (Astroparticle Physics 34 (2010) 40-47s) +- Detecting gamma-ray bursts with the Pierre Auger Observatory using the single particle technique (CRIS 2006) +- Detecting gamma-ray bursts with the Pierre Auger Observatory using the single particle technique (ICRC 2005) +- Search for Gamma Ray Bursts at Sierra la Negra, Mexico (ICRC 2005) +- Detection of GRB with Water Cherenkov Detectors (RICH 2004, NIM A, Volume 553, Issues 1-2, Pages 1-380, 11 November 2005) +- Cosmic Ray Observations at Chacaltaya and Cerro la Negra Combined with the Pierre Auger and Milagro Observatories: GRBs and Search for Cosmic Ray Correlations (CP 566, AIP 2001) + +Other documents by LAGO members: + +- Implementación de un Repositorio de Datos CientÃficos usando Dspace (e-colabora 1, 101-117, 2011) + +Related documents of interest: + +- Search for GeV Gamma Ray Bursts at Mount Chacaltaya (ICRC 2001) +- Detection of gamma-ray bursts in the 1 GeV - 1 TeV energy range by ground-based experiments (Astroparticle Physics 13 (2000) 75-86) diff --git a/docs/publications/talks.md b/docs/publications/talks.md new file mode 100644 index 0000000000000000000000000000000000000000..a3694f2441f5890f8cd87e5c5f86215b65ad1699 --- /dev/null +++ b/docs/publications/talks.md @@ -0,0 +1,21 @@ +# LAGO presentations + +| Año | Presentation | +|---|---| +| 2020 | LAGO. El Observatorio Latinoamericano Gigante. Estado Actual y Perspectivas Futuras. Presentation given at TICAL 2020 By I. Sidelnik - September, 2020. | +| 2020 | How atmospheric conditions affect the cosmic ray observations from the Marambio LAGO site. Presentation given at the GRAPE/RESOURCE Online Workshop By N.A. Santos - July, 2020. | +| 2020 | First results from the operative cosmic ray detector at Marambio Base, Antarctic Peninsula. Poster presented at the NMDB@Home 2020: Virtual Symposium on cosmic ray studies with neutron detectors By N.A. Santos - July, 2020. | +| 2020 | LAGO El Observatorio Latinoamericano Gigante, Current State and Future Perspectives. Presentation given at the II Latin American Strategy Forum for Research Infraestructure (LASF4RI) By I. Sidelnik, for the LAGO Collaboration - July, 2019. | +| 2019 | Calibration and first results from the operative cosmic ray observatory at Marambio base. Poster presented at the 16th European Space Weather Week. By S. Dasso - November, 2019. | +| 2019 | First long-term calibrated observations of the new LAGO space weather Antarctic node.Presentation given at the XI Latin American Giant Observatory (LAGO) Workshop – XI LAGO. By N.A. Santos - September, 2019. | +| 2017 | Observation of the Forbush decrease of 22 June 2015 with the LAGO detector in Brazil. Presentation given at the The 35th International Cosmic Ray Conference 2017(ICRC2017) - July, 2017 | +| 2016 | The LAGO Space Weather Program in Brazil. Presentation given at the XXXVII National Meeting on Particles and Fields - September, 2016 | +| 2015 | Forbush decreases detected by the Muonca muon telescopes on 13 September and 22 December 2014. Presentation given at the The 34th International Cosmic Ray Conference (ICRC2015) - August, 2015 | +| 2010 | LAGO - Latin American Giant Observatory, 1h presentation given at the Fourth School on Cosmic Rays and Astrophysics - September | +| 2008 | The LAGO Project, Status and Prospects, 1h presentation given at the Third School on Cosmic Rays and Astrophysics - September | +| 2007 | El proyecto LAGO: Large Aperture GRB Observatory, 15' presentation given at the 50a Reunión anual de la Asociación Argentina de AstronomÃa - September (in spanish) | +| 2007 | Cosmic Ray Detectors: Probes for the Highest Energies, 1h30 lecture given in Merida - August | +| 2006 | Detection of Gamma Ray Bursts in Auger and the LAGO project, 35' talk given for the VI Silafae - November | +| 2006 | Los destellos de rayos gamma y su detección en alta montaña , 45' talks given at Coloquios del Instituto Balseiro - April and Grupo de Colisiones Atómicas del CAB - May (similars, in spanish) | +| 2006 | Latin American Giant Observatory, 15' talk given at La Plata Workshop on Observational Astronomy - April (in spanish) | +| 2005 | Latin American Giant Observatory - An Auger by-product, 10' presentation given at the Auger Collaboration meeting - November | diff --git a/docs/publications/thesis.md b/docs/publications/thesis.md new file mode 100644 index 0000000000000000000000000000000000000000..0d1ec89a0095240e8f6fcd00e8caf4553546bd22 --- /dev/null +++ b/docs/publications/thesis.md @@ -0,0 +1,32 @@ +# LAGO Thesis + +| Title | Author [Director] | Thesis Type | School | Year | +|:---:|:---:|:---:|:---:|:---:| +| Study of cosmic ray signals in a Water Cherenkov detector | Renan de Aguiar. [Anderson Campos Fauth] | Master's Thesis | Universidade Estadual de Campinas, Instituto de Fisica Gleb Wataghin, Campinas, SP, Brasil. | 2021 | +| Caracterización de perfiles atmosféricos para la cadena de simulación de la colaboración LAGO | Grisales-Casadiegos, J. [ ] | Undergraduate thesis | Escuela de FÃsica, Universidad Industrial de Santander, Bucaramanga, Colombia | 2019 | +| Estimación de la respuesta de un detector Cherenkov de agua al fondo de rayos cósmicos en Bucaramanga(956 m s.n.m) | Jaimes-Motta, A. [ ] | Undergraduate thesis | Escuela de FÃsica, Universidad Industrial de Santander, Bucaramanga, Colombia | 2018 | +| Procedimiento de instalación, calibración y sincronización del arreglo de detectores cherenkov de agua (guane), para la detección y estudio de rayos cósmicos en Bucaramanga | Hernández-Barajas SP, León-Carreño YF. [ ] | Undergraduate thesis | Escuela de IngenierÃa Eléctrica, Electrónica y de Telecomunicaciones , Universidad Industrial de Santander, Bucaramanga, Colombia | 2018 | +| Diseño e implementación de una estación autónoma de monitoreo de rayos cósmicos y variables ambientales | Cando Cañar J. D., Rosero Pozo C. A. [ ] | Undergraduate thesis | Escuela Politécnica Nacional, Quito, Ecuador | 2018 | +| Construcción de un detector de muones portátil para el Laboratorio de AstrofÃsica y AstropartÃculas de la Escuela Politécnica Nacional | Machado Carvajal, L. E. [ ] | Undergraduate thesis | Escuela Politécnica Nacional, Quito, Ecuador | 2018 | +| Implementación Del Repositorio De Datos DSpace De ModoDescentralizado E Incluyendo Protocolos De DescubrimientoY Trasmisión De Datos | MartÃnez-Méndez, A. [ ] | Undergraduate thesis | Escuela de IngenierÃa de Sistemas e Informática, Universidad Industrial de Santander, Bucaramanga, Colombia | 2017 | +| Caracterización de los detectores Cherenkov de dgua de LAGO-México mediante simulación, para la determinación del área efectiva de partÃculas secundarias generadas por un gamma primario de energÃas entre 200 GeV y 1.1 TeV | Delgado Giler, A. G. [ ] | Undergraduate thesis | Escuela Politécnica Nacional, Quito, Ecuador | 2017 | +| Estudo da atividade solar com detectores de partÃculas situados em solo terrestre | Vieira de Souza, Henrique. [ ] | Master's Thesis | Universidade Estadual de Campinas, Instituto de Fisica Gleb Wataghin, Campinas, SP, Brasil. | 2017 | +| Simulación de Cascadas Aéreas Extensas en Corsika para la Colaboración LAGO Guatemala | Luis Ricardo Tun Aguilar [ ] | Undergraduate Thesis | Universidad San Carlos de Guatemala, Escuela de Ciencias FÃsicas y Matemáticas, San Carlos, Guatemala. | 2017 | +| Upgrading the data acquisition system of WCDs used in LAGO project, phase 1: building and testing of the data acquisition interface board | Talavera Villaseñor, Bryan André [ ] | Undergraduate Thesis | Universidad San Francisco de Quito, Colegio de Ciencias e IngenierÃas; Quito, Ecuador | 2017 | +| Calibración e instalación de un detector Cherenkov de agua del sitio LAGO Sierra Negra | Galindo-Téllez, A. [ Carrasco-Licea, B. E. & Moreno-Barbosa, E.] | Doctoral thesis | Instituto Nacional de AstrofÃsica, Óptica y Electrónica, INAOE | 2017 | +| Protocolo de transferencia masiva de datos desde dispositivos hardware hacia repositorios de datos | Torres-Niño, LA. [ ] | Master's Thesis | Escuela de IngenierÃa de Sistemas e Informática, Universidad Industrial de Santander, Bucaramanga, Colombia | 2016 | +| Implementación y calibración de un detector terrestre Cherenkov de agua para Rayos Cósmicos en la Escuela Politécnica Nacional. | Vargas Piedra, S E. [ ] | Undergraduate Thesis | Escuela Politécnica Nacional, Quito, Ecuador | 2016 | +| Simulación de Cascadas Aéreas Extensas en Corsika para la Colaboración LAGO Guatemala | Ramos Cisneros, Marco Andrés [ ] | Undergraduate Thesis | Universidad San Francisco de Quito, Colegio de Ciencias e IngenierÃa; Quito, Ecuador. | 2016 | +| Simulación de los detectores Cherenkov de agua de la colaboración LAGO | Calderón-Ardila, R. [ ] | Undergraduate thesis | Escuela de FÃsica, Universidad Industrial de Santander, Bucaramanga, Colombia | 2015 | +| Modulación de Rayos Cósmicos Secundarios a Nivel del Suelo por Cambios en el Campo Geomagnético | Suárez-Durán M. [ ] | Master's Thesis | Escuela de FÃsica, Universidad Industrial de Santander, Bucaramanga, Colombia | 2015 | +| Búsqueda de fuentes de astropartÃculas en los datos de la colaboración LAGO | Sarmiento-Cano, C. [ ] | Master's Thesis | Escuela de FÃsica, Universidad Industrial de Santander, Bucaramanga, Colombia | 2015 | +| Sensibilidad del Proyecto LAGO a Señales Gamma Provenientes del Centro de a Galaxia | Núñez Castiñeyra, Arturo [ ] | Undergraduate thesis | Departamento de FıÌsica, Facultad de Ciencias, Universidad de los Andes, ULA, MeÌrida, Venezuela | 2015 | +| Método de thinining y dethining para lluvias de primarios con alta energÃa | Estupiñan-Lopez, AF. [ ] | Undergraduate thesis | Escuela de FÃsica, Universidad Industrial de Santander, Bucaramanga, Colombia | 2015 | +| Visualización de cascadas de rayos cósmicos sobre gpus | Laverde-Laverde, RA. [ ] | Undergraduate thesis | Escuela de IngenierÃa de Sistemas e Informática, Universidad Industrial de Santander, Bucaramanga, Colombia | 2015 | +| Telescópio de múons para estudo da atividade solar | Barros de Vasconcelos, Débora Nunes. [ ] | Master's Thesis | Universidade Estadual de Campinas, Instituto de Fisica Gleb Wataghin, Campinas, SP, Brasil. | 2015 | +| Sensibilidad del proyecto LAGO a señales Gamma proveniente del centro de la Galaxia | Nuñez-Castiñeyra, A. [ ] | Undergraduate thesis | Departamento de FÃsica, Facultad de Ciencias, Universidad de lo Andes, Venezuela | 2015 | +| Diseño e implementación de un sistema de adquisición de datos para un detector GRB en Guatemala | GarcÃa-Ordóñez, L.G. [ Alvarez-MarroquÃn, W.G.] | Undergraduate thesis | Facultad de IngenierÃa, Universidad de San Carlos de Guatemala, Guatemala, Guatemala | 2015 | +| Identificación de destellos gamma en los repositorios de datos de la colaboración lago | Sarmiento-Cano, C. [ ] | Undergraduate thesis | Escuela de FÃsica, Universidad Industrial de Santander, Bucaramanga, Colombia | 2012 | +| Simulación del experimento LAGO en Sierra Negra | Nava-MartÃnez, A. [ Salazar-Ibargüen, Humberto. & Miranda-Ramagnoli, P.A.] | Undergraduate thesis | Universidad Autónoma del Estado de Hidalgo, Instituto de Ciencias Básicas e IngenierÃa, Ãrea Académica de Matemáticas y FÃsica | 2012 | +| Instalación de un detector Cherenkov de agua para la detección de trazas de rayos cósmicos a 956 metros sobre el nivel del mar | Suárez Durán, M. [ ] | Undergraduate thesis | Escuela de FÃsica, Universidad Industrial de Santander, Bucaramanga, Colombia | 2011 | +| Estudos de raios cósmicos com E>1018eV do detector de superfÃcie do Observatório Pierre Auger | Martelozo Consalter, Daniel. [ ] | Master's Thesis | Universidade Estadual de Campinas, Instituto de Fisica Gleb Wataghin, Campinas, SP, Brasil. | 2009 | diff --git a/docs/publishing-your-site.md b/docs/publishing-your-site.md deleted file mode 100644 index 89eae489c4e42bb32476dad948d4960f2814cc87..0000000000000000000000000000000000000000 --- a/docs/publishing-your-site.md +++ /dev/null @@ -1,180 +0,0 @@ -# Publishing your site - -The great thing about hosting project documentation in a `git` repository is -the ability to deploy it automatically when new changes are pushed. MkDocs -makes this ridiculously simple. - -## GitHub Pages - -If you're already hosting your code on GitHub, [GitHub Pages] is certainly -the most convenient way to publish your project documentation. It's free of -charge and pretty easy to set up. - - [GitHub Pages]: https://pages.github.com/ - -### with GitHub Actions - -Using [GitHub Actions] you can automate the deployment of your project -documentation. At the root of your repository, create a new GitHub Actions -workflow, e.g. `.github/workflows/ci.yml`, and copy and paste the following -contents: - -=== "Material for MkDocs" - - ``` yaml - name: ci # (1)! - on: - push: - branches: - - master # (2)! - - main - permissions: - contents: write - jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.x - - uses: actions/cache@v2 - with: - key: ${{ github.ref }} - path: .cache - - run: pip install mkdocs-material # (3)! - - run: mkdocs gh-deploy --force - ``` - - 1. You can change the name to your liking. - - 2. At some point, GitHub renamed `master` to `main`. If your default branch - is named `master`, you can safely remove `main`, vice versa. - - 3. This is the place to install further [MkDocs plugins] or Markdown - extensions with `pip` to be used during the build: - - ``` sh - pip install \ - mkdocs-material \ - mkdocs-awesome-pages-plugin \ - ... - ``` - -=== "Insiders" - - ``` yaml - name: ci - on: - push: - branches: - - master - - main - permissions: - contents: write - jobs: - deploy: - runs-on: ubuntu-latest - if: github.event.repository.fork == false - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.x - - uses: actions/cache@v2 - with: - key: ${{ github.ref }} - path: .cache - - run: apt-get install pngquant # (1)! - - run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git - - run: mkdocs gh-deploy --force - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} # (2)! - ``` - - 1. This step is only necessary if you want to use the - [built-in optimize plugin] to automatically compress images. - - 2. Remember to set the `GH_TOKEN` environment variable to the value of your - [personal access token] when deploying [Insiders], which can be done - using [GitHub secrets]. - -Now, when a new commit is pushed to either the `master` or `main` branches, -the static site is automatically built and deployed. Push your changes to see -the workflow in action. - -If the GitHub Page doesn't show up after a few minutes, go to the settings of -your repository and ensure that the [publishing source branch] for your GitHub -Page is set to `gh-pages`. - -Your documentation should shortly appear at `<username>.github.io/<repository>`. - - [GitHub Actions]: https://github.com/features/actions - [MkDocs plugins]: https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins - [personal access token]: https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token - [Insiders]: insiders/index.md - [built-in optimize plugin]: setup/building-an-optimized-site.md#built-in-optimize-plugin - [GitHub secrets]: https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets - [publishing source branch]: https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site - -### with MkDocs - -If you prefer to deploy your project documentation manually, you can just invoke -the following command from the directory containing the `mkdocs.yml` file: - -``` -mkdocs gh-deploy --force -``` - -## GitLab Pages - -If you're hosting your code on GitLab, deploying to [GitLab Pages] can be done -by using the [GitLab CI] task runner. At the root of your repository, create a -task definition named `.gitlab-ci.yml` and copy and paste the following -contents: - -=== "Material for MkDocs" - - ``` yaml - image: python:latest - pages: - stage: deploy - script: - - pip install mkdocs-material - - mkdocs build --site-dir public - artifacts: - paths: - - public - rules: - - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - ``` - -=== "Insiders" - - ``` yaml - image: python:latest - pages: - stage: deploy - script: # (1)! - - pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git - - mkdocs build --site-dir public - artifacts: - paths: - - public - rules: - - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - ``` - - 1. Remember to set the `GH_TOKEN` environment variable to the value of your - [personal access token] when deploying [Insiders], which can be done - using [masked custom variables]. - -Now, when a new commit is pushed to `master`, the static site is automatically -built and deployed. Commit and push the file to your repository to see the -workflow in action. - -Your documentation should shortly appear at `<username>.gitlab.io/<repository>`. - - [GitLab Pages]: https://gitlab.com/pages - [GitLab CI]: https://docs.gitlab.com/ee/ci/ - [masked custom variables]: https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui diff --git a/docs/reference/admonitions.md b/docs/reference/admonitions.md deleted file mode 100644 index 4eac4d2661e99a64dd5272cb7f7615b07919b3ba..0000000000000000000000000000000000000000 --- a/docs/reference/admonitions.md +++ /dev/null @@ -1,508 +0,0 @@ ---- -icon: material/alert-outline ---- - -# Admonitions - -Admonitions, also known as _call-outs_, are an excellent choice for including -side content without significantly interrupting the document flow. Material for -MkDocs provides several different types of admonitions and allows for the -inclusion and nesting of arbitrary content. - -## Configuration - -This configuration enables admonitions, allows to make them collapsible and to -nest arbitrary content inside admonitions. Add the following lines to -`mkdocs.yml`: - -``` yaml -markdown_extensions: - - admonition - - pymdownx.details - - pymdownx.superfences -``` - -See additional configuration options: - -- [Admonition] -- [Details] -- [SuperFences] - - [Admonition]: ../setup/extensions/python-markdown.md#admonition - [Details]: ../setup/extensions/python-markdown-extensions.md#details - [SuperFences]: ../setup/extensions/python-markdown-extensions.md#superfences - -### Admonition icons - -[:octicons-tag-24: 8.3.0][Admonition icons support] - -Each of the supported admonition types has a distinct icon, which can be changed -to any icon bundled with the theme, or even a [custom icon]. Add the following -lines to `mkdocs.yml`: - -``` yaml -theme: - icon: - admonition: - <type>: <icon> # (1)! -``` - -1. Enter a few keywords to find the perfect icon using our [icon search] and - click on the shortcode to copy it to your clipboard: - - <div class="mdx-iconsearch" data-mdx-component="iconsearch"> - <input class="md-input md-input--stretch mdx-iconsearch__input" placeholder="Search icon" data-mdx-component="iconsearch-query" value="alert" /> - <div class="mdx-iconsearch-result" data-mdx-component="iconsearch-result" data-mdx-mode="file"> - <div class="mdx-iconsearch-result__meta"></div> - <ol class="mdx-iconsearch-result__list"></ol> - </div> - </div> - -??? example "Expand to show alternate icon sets" - - === ":octicons-mark-github-16: Octicons" - - ``` yaml - theme: - icon: - admonition: - note: octicons/tag-16 - abstract: octicons/checklist-16 - info: octicons/info-16 - tip: octicons/squirrel-16 - success: octicons/check-16 - question: octicons/question-16 - warning: octicons/alert-16 - failure: octicons/x-circle-16 - danger: octicons/zap-16 - bug: octicons/bug-16 - example: octicons/beaker-16 - quote: octicons/quote-16 - ``` - - - === ":fontawesome-brands-font-awesome: FontAwesome" - - ``` yaml - theme: - icon: - admonition: - note: fontawesome/solid/note-sticky - abstract: fontawesome/solid/book - info: fontawesome/solid/circle-info - tip: fontawesome/solid/bullhorn - success: fontawesome/solid/check - question: fontawesome/solid/circle-question - warning: fontawesome/solid/triangle-exclamation - failure: fontawesome/solid/bomb - danger: fontawesome/solid/skull - bug: fontawesome/solid/robot - example: fontawesome/solid/flask - quote: fontawesome/solid/quote-left - ``` - - [Admonition icons support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.3.0 - [custom icon]: ../setup/changing-the-logo-and-icons.md#additional-icons - [supported types]: #supported-types - [icon search]: icons-emojis.md#search - -## Usage - -Admonitions follow a simple syntax: a block starts with `!!!`, followed by a -single keyword used as a [type qualifier]. The content of the block follows on -the next line, indented by four spaces: - -``` markdown title="Admonition" -!!! note - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. -``` - -<div class="result" markdown> - -!!! note - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. - -</div> - - [type qualifier]: #supported-types - -### Changing the title - -By default, the title will equal the type qualifier in titlecase. However, it -can be changed by adding a quoted string containing valid Markdown (including -links, formatting, ...) after the type qualifier: - -``` markdown title="Admonition with custom title" -!!! note "Phasellus posuere in sem ut cursus" - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. -``` - -<div class="result" markdown> - -!!! note "Phasellus posuere in sem ut cursus" - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. - -</div> - -### Removing the title - -Similar to [changing the title], the icon and title can be omitted entirely by -adding an empty string directly after the type qualifier. Note that this will -not work for [collapsible blocks]: - -``` markdown title="Admonition without title" -!!! note "" - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. -``` - -<div class="result" markdown> - -!!! note "" - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. - -</div> - - [changing the title]: #changing-the-title - [collapsible blocks]: #collapsible-blocks - -### Collapsible blocks - -When [Details] is enabled and an admonition block is started with `???` instead -of `!!!`, the admonition is rendered as a collapsible block with a small toggle -on the right side: - -``` markdown title="Admonition, collapsible" -??? note - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. -``` - -<div class="result" markdown> - -??? note - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. - -</div> - -Adding a `+` after the `???` token renders the block expanded: - -``` markdown title="Admonition, collapsible and initially expanded" -???+ note - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. -``` - -<div class="result" markdown> - -???+ note - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. - -</div> - -### Inline blocks - -Admonitions can also be rendered as inline blocks (i.e. for sidebars), placing -them to the right using the `inline` + `end` modifiers, or to the left using -only the `inline` modifier: - -=== ":octicons-arrow-right-16: inline end" - - !!! info inline end - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - - ``` markdown - !!! info inline end - - Lorem ipsum dolor sit amet, consectetur - adipiscing elit. Nulla et euismod nulla. - Curabitur feugiat, tortor non consequat - finibus, justo purus auctor massa, nec - semper lorem quam in massa. - ``` - - Use `inline end` to align to the right (left for rtl languages). - -=== ":octicons-arrow-left-16: inline" - - !!! info inline - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - - ``` markdown - !!! info inline - - Lorem ipsum dolor sit amet, consectetur - adipiscing elit. Nulla et euismod nulla. - Curabitur feugiat, tortor non consequat - finibus, justo purus auctor massa, nec - semper lorem quam in massa. - ``` - - Use `inline` to align to the left (right for rtl languages). - -__Important__: admonitions that use the `inline` modifiers _must_ be declared -prior to the content block you want to place them beside. If there's -insufficient space to render the admonition next to the block, the admonition -will stretch to the full width of the viewport, e.g. on mobile viewports. - -### Supported types - -Following is a list of type qualifiers provided by Material for MkDocs, whereas -the default type, and thus fallback for unknown type qualifiers, is `note`[^1]: - - [^1]: - Previously, some of the supported types defined more than one qualifier. - For example, authors could use `summary` or `tldr` as alternative qualifiers - to render an [`abstract`](#type:abstract) admonition. As this increased the - size of the CSS that is shipped with Material for MkDocs, the additional - type qualifiers are now all deprecated and will be removed in the next major - version. This will also be mentioned in the upgrade guide. - -[`note`](#type:note){ #type:note } - -: !!! note - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -[`abstract`](#type:abstract){ #type:abstract } - -: !!! abstract - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -[`info`](#type:info){ #type:info } - -: !!! info - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -[`tip`](#type:tip){ #type:tip } - -: !!! tip - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -[`success`](#type:success){ #type:success } - -: !!! success - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -[`question`](#type:question){ #type:question } - -: !!! question - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -[`warning`](#type:warning){ #type:warning } - -: !!! warning - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -[`failure`](#type:failure){ #type:failure } - -: !!! failure - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -[`danger`](#type:danger){ #type:danger } - -: !!! danger - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -[`bug`](#type:bug){ #type:bug } - -: !!! bug - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -[`example`](#type:example){ #type:example } - -: !!! example - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -[`quote`](#type:quote){ #type:quote } - -: !!! quote - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -## Customization - -### Classic admonitions - -Prior to version [:octicons-tag-24: 8.5.6][Admonition modern], admonitions had -a slightly different appearance: - -!!! classic "Note" - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. - -If you want to restore this appearance, add the following CSS to an -[additional style sheet]: - -<style> - .md-typeset .admonition.classic { - border-width: 0; - border-left-width: 4px; - } -</style> - -=== ":octicons-file-code-16: `docs/stylesheets/extra.css`" - - ``` css - .md-typeset .admonition, - .md-typeset details { - border-width: 0; - border-left-width: 4px; - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_css: - - stylesheets/extra.css - ``` - -[Admonition modern]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.5.6 - -### Custom admonitions - -If you want to add a custom admonition type, all you need is a color and an -`*.svg` icon. Copy the icon's code from the [`.icons`][custom icons] folder -and add the following CSS to an [additional style sheet]: - -<style> - :root { - --md-admonition-icon--pied-piper: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M244 246c-3.2-2-6.3-2.9-10.1-2.9-6.6 0-12.6 3.2-19.3 3.7l1.7 4.9zm135.9 197.9c-19 0-64.1 9.5-79.9 19.8l6.9 45.1c35.7 6.1 70.1 3.6 106-9.8-4.8-10-23.5-55.1-33-55.1zM340.8 177c6.6 2.8 11.5 9.2 22.7 22.1 2-1.4 7.5-5.2 7.5-8.6 0-4.9-11.8-13.2-13.2-23 11.2-5.7 25.2-6 37.6-8.9 68.1-16.4 116.3-52.9 146.8-116.7C548.3 29.3 554 16.1 554.6 2l-2 2.6c-28.4 50-33 63.2-81.3 100-31.9 24.4-69.2 40.2-106.6 54.6l-6.3-.3v-21.8c-19.6 1.6-19.7-14.6-31.6-23-18.7 20.6-31.6 40.8-58.9 51.1-12.7 4.8-19.6 10-25.9 21.8 34.9-16.4 91.2-13.5 98.8-10zM555.5 0l-.6 1.1-.3.9.6-.6zm-59.2 382.1c-33.9-56.9-75.3-118.4-150-115.5l-.3-6c-1.1-13.5 32.8 3.2 35.1-31l-14.4 7.2c-19.8-45.7-8.6-54.3-65.5-54.3-14.7 0-26.7 1.7-41.4 4.6 2.9 18.6 2.2 36.7-10.9 50.3l19.5 5.5c-1.7 3.2-2.9 6.3-2.9 9.8 0 21 42.8 2.9 42.8 33.6 0 18.4-36.8 60.1-54.9 60.1-8 0-53.7-50-53.4-60.1l.3-4.6 52.3-11.5c13-2.6 12.3-22.7-2.9-22.7-3.7 0-43.1 9.2-49.4 10.6-2-5.2-7.5-14.1-13.8-14.1-3.2 0-6.3 3.2-9.5 4-9.2 2.6-31 2.9-21.5 20.1L15.9 298.5c-5.5 1.1-8.9 6.3-8.9 11.8 0 6 5.5 10.9 11.5 10.9 8 0 131.3-28.4 147.4-32.2 2.6 3.2 4.6 6.3 7.8 8.6 20.1 14.4 59.8 85.9 76.4 85.9 24.1 0 58-22.4 71.3-41.9 3.2-4.3 6.9-7.5 12.4-6.9.6 13.8-31.6 34.2-33 43.7-1.4 10.2-1 35.2-.3 41.1 26.7 8.1 52-3.6 77.9-2.9 4.3-21 10.6-41.9 9.8-63.5l-.3-9.5c-1.4-34.2-10.9-38.5-34.8-58.6-1.1-1.1-2.6-2.6-3.7-4 2.2-1.4 1.1-1 4.6-1.7 88.5 0 56.3 183.6 111.5 229.9 33.1-15 72.5-27.9 103.5-47.2-29-25.6-52.6-45.7-72.7-79.9zm-196.2 46.1v27.2l11.8-3.4-2.9-23.8zm-68.7-150.4l24.1 61.2 21-13.8-31.3-50.9zm84.4 154.9l2 12.4c9-1.5 58.4-6.6 58.4-14.1 0-1.4-.6-3.2-.9-4.6-26.8 0-36.9 3.8-59.5 6.3z"/></svg>') - } - .md-typeset .admonition.pied-piper, - .md-typeset details.pied-piper { - border-color: rgb(43, 155, 70); - } - .md-typeset .pied-piper > .admonition-title, - .md-typeset .pied-piper > summary { - background-color: rgba(43, 155, 70, 0.1); - } - .md-typeset .pied-piper > .admonition-title::before, - .md-typeset .pied-piper > summary::before { - background-color: rgb(43, 155, 70); - -webkit-mask-image: var(--md-admonition-icon--pied-piper); - mask-image: var(--md-admonition-icon--pied-piper); - } -</style> - -=== ":octicons-file-code-16: `docs/stylesheets/extra.css`" - - ``` css - :root { - --md-admonition-icon--pied-piper: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M244 246c-3.2-2-6.3-2.9-10.1-2.9-6.6 0-12.6 3.2-19.3 3.7l1.7 4.9zm135.9 197.9c-19 0-64.1 9.5-79.9 19.8l6.9 45.1c35.7 6.1 70.1 3.6 106-9.8-4.8-10-23.5-55.1-33-55.1zM340.8 177c6.6 2.8 11.5 9.2 22.7 22.1 2-1.4 7.5-5.2 7.5-8.6 0-4.9-11.8-13.2-13.2-23 11.2-5.7 25.2-6 37.6-8.9 68.1-16.4 116.3-52.9 146.8-116.7C548.3 29.3 554 16.1 554.6 2l-2 2.6c-28.4 50-33 63.2-81.3 100-31.9 24.4-69.2 40.2-106.6 54.6l-6.3-.3v-21.8c-19.6 1.6-19.7-14.6-31.6-23-18.7 20.6-31.6 40.8-58.9 51.1-12.7 4.8-19.6 10-25.9 21.8 34.9-16.4 91.2-13.5 98.8-10zM555.5 0l-.6 1.1-.3.9.6-.6zm-59.2 382.1c-33.9-56.9-75.3-118.4-150-115.5l-.3-6c-1.1-13.5 32.8 3.2 35.1-31l-14.4 7.2c-19.8-45.7-8.6-54.3-65.5-54.3-14.7 0-26.7 1.7-41.4 4.6 2.9 18.6 2.2 36.7-10.9 50.3l19.5 5.5c-1.7 3.2-2.9 6.3-2.9 9.8 0 21 42.8 2.9 42.8 33.6 0 18.4-36.8 60.1-54.9 60.1-8 0-53.7-50-53.4-60.1l.3-4.6 52.3-11.5c13-2.6 12.3-22.7-2.9-22.7-3.7 0-43.1 9.2-49.4 10.6-2-5.2-7.5-14.1-13.8-14.1-3.2 0-6.3 3.2-9.5 4-9.2 2.6-31 2.9-21.5 20.1L15.9 298.5c-5.5 1.1-8.9 6.3-8.9 11.8 0 6 5.5 10.9 11.5 10.9 8 0 131.3-28.4 147.4-32.2 2.6 3.2 4.6 6.3 7.8 8.6 20.1 14.4 59.8 85.9 76.4 85.9 24.1 0 58-22.4 71.3-41.9 3.2-4.3 6.9-7.5 12.4-6.9.6 13.8-31.6 34.2-33 43.7-1.4 10.2-1 35.2-.3 41.1 26.7 8.1 52-3.6 77.9-2.9 4.3-21 10.6-41.9 9.8-63.5l-.3-9.5c-1.4-34.2-10.9-38.5-34.8-58.6-1.1-1.1-2.6-2.6-3.7-4 2.2-1.4 1.1-1 4.6-1.7 88.5 0 56.3 183.6 111.5 229.9 33.1-15 72.5-27.9 103.5-47.2-29-25.6-52.6-45.7-72.7-79.9zm-196.2 46.1v27.2l11.8-3.4-2.9-23.8zm-68.7-150.4l24.1 61.2 21-13.8-31.3-50.9zm84.4 154.9l2 12.4c9-1.5 58.4-6.6 58.4-14.1 0-1.4-.6-3.2-.9-4.6-26.8 0-36.9 3.8-59.5 6.3z"/></svg>') - } - .md-typeset .admonition.pied-piper, - .md-typeset details.pied-piper { - border-color: rgb(43, 155, 70); - } - .md-typeset .pied-piper > .admonition-title, - .md-typeset .pied-piper > summary { - background-color: rgba(43, 155, 70, 0.1); - } - .md-typeset .pied-piper > .admonition-title::before, - .md-typeset .pied-piper > summary::before { - background-color: rgb(43, 155, 70); - -webkit-mask-image: var(--md-admonition-icon--pied-piper); - mask-image: var(--md-admonition-icon--pied-piper); - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_css: - - stylesheets/extra.css - ``` - -After applying the customization, you can use the custom admonition type: - -``` markdown title="Admonition with custom type" -!!! pied-piper "Pied Piper" - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. -``` - -<div class="result" markdown> - -!!! pied-piper "Pied Piper" - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. - -</div> - - [custom icons]: https://github.com/squidfunk/mkdocs-material/tree/master/material/.icons - [additional style sheet]: ../customization.md#additional-css diff --git a/docs/reference/annotations.md b/docs/reference/annotations.md deleted file mode 100644 index 8d15e3d07cd09bd03dd4bb557654c6f1aa0e2e26..0000000000000000000000000000000000000000 --- a/docs/reference/annotations.md +++ /dev/null @@ -1,210 +0,0 @@ ---- -icon: material/plus-circle ---- - -# Annotations - -One of the flagship features of Material for MkDocs is the ability to inject -annotations – little markers that can be added almost anywhere in a document -and expand a tooltip containing arbitrary Markdown on click or keyboard focus. - -## Configuration - -This configuration allows to add annotations to all inline- and block-level -elements, as well as code blocks, and nest annotations inside each other. Add -the following lines to `mkdocs.yml`: - -``` yaml -markdown_extensions: - - attr_list - - md_in_html - - pymdownx.superfences -``` - -See additional configuration options: - -- [Attribute Lists] -- [Markdown in HTML] -- [SuperFences] - - [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists - [Markdown in HTML]: ../setup/extensions/python-markdown.md#markdown-in-html - [SuperFences]: ../setup/extensions/python-markdown-extensions.md#superfences - -## Usage - -### Using annotations - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.6.0][Insiders] · -:octicons-beaker-24: Experimental - -Annotations consist of two parts: a marker, which can be placed anywhere in -a block marked with the `annotate` class, and content located in a list below -the block containing the marker: - -``` markdown title="Text with annotations" -Lorem ipsum dolor sit amet, (1) consectetur adipiscing elit. -{ .annotate } - -1. :man_raising_hand: I'm an annotation! I can contain `code`, __formatted - text__, images, ... basically anything that can be expressed in Markdown. -``` - -<div class="result" markdown> - -Lorem ipsum dolor sit amet, (1) consectetur adipiscing elit. -{ .annotate } - -1. :man_raising_hand: I'm an annotation! I can contain `code`, __formatted - text__, images, ... basically anything that can be written in Markdown. - -</div> - -Note that the `annotate` class must only be added to the outermost block. All -nested elements can use the same list to define annotations, except when -annotations are nested themselves. - - [Insiders]: ../insiders/index.md - -#### in annotations - -When [SuperFences] is enabled, annotations can be nested inside annotations by -adding the `annotate` class to the list item hosting the annotation content, -repeating the process: - -``` markdown title="Text with nested annotations" -Lorem ipsum dolor sit amet, (1) consectetur adipiscing elit. -{ .annotate } - -1. :man_raising_hand: I'm an annotation! (1) - { .annotate } - - 1. :woman_raising_hand: I'm an annotation as well! -``` - -<div class="result" markdown> - -Lorem ipsum dolor sit amet, (1) consectetur adipiscing elit. -{ .annotate } - -1. :man_raising_hand: I'm an annotation! (1) - { .annotate style="margin-bottom: 0" } - - 1. :woman_raising_hand: I'm an annotation as well! - -</div> - -#### in admonitions - -The titles and bodies of [admonitions] can also host annotations by adding the -`annotate` modifier after the type qualifier, which is similar to how -[inline blocks] work: - -``` markdown title="Admonition with annotations" -!!! note annotate "Phasellus posuere in sem ut cursus (1)" - - Lorem ipsum dolor sit amet, (2) consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -1. :man_raising_hand: I'm an annotation! -2. :woman_raising_hand: I'm an annotation as well! -``` - -<div class="result" markdown> - -!!! note annotate "Phasellus posuere in sem ut cursus (1)" - - Lorem ipsum dolor sit amet, (2) consectetur adipiscing elit. Nulla et - euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo - purus auctor massa, nec semper lorem quam in massa. - -1. :man_raising_hand: I'm an annotation! -2. :woman_raising_hand: I'm an annotation as well! - -</div> - - [admonitions]: admonitions.md - [inline blocks]: admonitions.md#inline-blocks - -#### in content tabs - -Content tabs can host annotations by adding the `annotate` class to the block -of a dedicated content tab (and not to the container, which is not supported): - -``` markdown title="Content tabs with annotations" -=== "Tab 1" - - Lorem ipsum dolor sit amet, (1) consectetur adipiscing elit. - { .annotate } - - 1. :man_raising_hand: I'm an annotation! - -=== "Tab 2" - - Phasellus posuere in sem ut cursus (1) - { .annotate } - - 1. :woman_raising_hand: I'm an annotation as well! -``` - -<div class="result" markdown> - -=== "Tab 1" - - Lorem ipsum dolor sit amet, (1) consectetur adipiscing elit. - { .annotate } - - 1. :man_raising_hand: I'm an annotation! - -=== "Tab 2" - - Phasellus posuere in sem ut cursus (1) - { .annotate } - - 1. :woman_raising_hand: I'm an annotation as well! - -</div> - -#### in everything else - -The [Attribute Lists] extension is the key ingredient for adding annotations to -most elements, but it has some [limitations]. However, it's always possible to -leverage the [Markdown in HTML] extension to wrap arbitrary elements with a -`div` with the `annotate` class: - -```` html title="HTML with annotations" -<div class="annotate" markdown> - -> Lorem ipsum dolor sit amet, (1) consectetur adipiscing elit. - -</div> - -1. :man_raising_hand: I'm an annotation! -```` - -<div class="result" markdown> - <div class="annotate" markdown> - -> Lorem ipsum dolor sit amet, (1) consectetur adipiscing elit. - - </div> - -1. :man_raising_hand: I'm an annotation! - -</div> - -With this trick, annotations can also be added to blockquotes, lists, and many -other elements that are not supported by the [Attribute Lists] extension. -Furthermore, note that [code blocks follow different semantics]. - -!!! warning "Known limitations" - - Please note that annotations currently don't work in [data tables] as - reported in #3453, as data tables are scrollable elements and positioning - is very tricky to get right. This might be fixed in the future. - - [limitations]: https://python-markdown.github.io/extensions/attr_list/#limitations - [code blocks follow different semantics]: code-blocks.md#adding-annotations - [data tables]: data-tables.md diff --git a/docs/reference/buttons.md b/docs/reference/buttons.md deleted file mode 100644 index 963c70e1b58d452319a3455e1b1100551fed105e..0000000000000000000000000000000000000000 --- a/docs/reference/buttons.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -icon: material/button-cursor ---- - -# Buttons - -Material for MkDocs provides dedicated styles for primary and secondary buttons -that can be added to any link, `label` or `button` element. This is especially -useful for documents or landing pages with dedicated _call-to-actions_. - -## Configuration - -This configuration allows to add attributes to all inline- and block-level -elements with a simple syntax, turning any link into a button. Add the -following lines to `mkdocs.yml`: - -``` yaml -markdown_extensions: - - attr_list -``` - -See additional configuration options: - -- [Attribute Lists] - - [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists - -## Usage - -### Adding buttons - -In order to render a link as a button, suffix it with curly braces and add the -`.md-button` class selector to it. The button will receive the selected -[primary color] and [accent color] if active. - -``` markdown title="Button" -[Subscribe to our newsletter](#){ .md-button } -``` - -<div class="result" markdown> - -[Subscribe to our newsletter][Demo]{ .md-button } - -</div> - - [primary color]: ../setup/changing-the-colors.md#primary-color - [accent color]: ../setup/changing-the-colors.md#accent-color - [Demo]: javascript:alert$.next("Demo") - -### Adding primary buttons - -If you want to display a filled, primary button (like on the [landing page] -of Material for MkDocs), add both, the `.md-button` and `.md-button--primary` -CSS class selectors. - -``` markdown title="Button, primary" -[Subscribe to our newsletter](#){ .md-button .md-button--primary } -``` - -<div class="result" markdown> - -[Subscribe to our newsletter][Demo]{ .md-button .md-button--primary } - -</div> - - [landing page]: ../index.md - -### Adding icon buttons - -Of course, icons can be added to all types of buttons by using the [icon syntax] -together with any valid icon shortcode, which can be easily found with a few keystrokes through our [icon search]. - -``` markdown title="Button with icon" -[Send :fontawesome-solid-paper-plane:](#){ .md-button } -``` - -<div class="result" markdown> - -[Send :fontawesome-solid-paper-plane:][Demo]{ .md-button } - -</div> - - [icon syntax]: icons-emojis.md#using-icons - [icon search]: icons-emojis.md#search diff --git a/docs/reference/code-blocks.md b/docs/reference/code-blocks.md deleted file mode 100644 index 8dd034080493c4c608998b768cf6ec5956fe92f8..0000000000000000000000000000000000000000 --- a/docs/reference/code-blocks.md +++ /dev/null @@ -1,493 +0,0 @@ ---- -icon: material/code-json ---- - -# Code blocks - -Code blocks and examples are an essential part of technical project -documentation. Material for MkDocs provides different ways to set up syntax -highlighting for code blocks, either during build time using [Pygments] or -during runtime using a JavaScript syntax highlighter. - - [Pygments]: https://pygments.org - -## Configuration - -This configuration enables syntax highlighting on code blocks and inline code -blocks, and allows to include source code directly from other files. Add the -following lines to `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.highlight: - anchor_linenums: true - - pymdownx.inlinehilite - - pymdownx.snippets - - pymdownx.superfences -``` - -The following sections discuss how to use different syntax highlighting features -with [Pygments], the recommended highlighter, so they don't apply when using a -JavaScript syntax highlighter. - -See additional configuration options: - -- [Highlight] -- [InlineHilite] -- [SuperFences] -- [Snippets] - - [Highlight]: ../setup/extensions/python-markdown-extensions.md#highlight - [InlineHilite]: ../setup/extensions/python-markdown-extensions.md#inlinehilite - [SuperFences]: ../setup/extensions/python-markdown-extensions.md#superfences - [Snippets]: ../setup/extensions/python-markdown-extensions.md#snippets - -### Code copy button - -[:octicons-tag-24: 9.0.0][Code copy button support] · -:octicons-unlock-24: Feature flag - -Code blocks can automatically render a button on the right side to allow the -user to copy a code block's contents to the clipboard. Add the following to -`mkdocs.yml` to enable them globally: - -``` yaml -theme: - features: - - content.code.copy -``` - - [Code copy button support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.0.0 - -??? info "Enabling or disabling code copy buttons for a specific code block" - - If you don't want to enable code copy buttons globally, you can enable them - for a specific code block by using a slightly different syntax based on the - [Attribute Lists] extension: - - ```` yaml - ``` { .yaml .copy } - # Code block content - ``` - ```` - - Note that the language shortcode which has to come first must now also be - prefixed by a `.`. Similarily, the copy button can also be disabled for a - specific code block: - - ```` { .yaml .no-copy } - ``` { .yaml .no-copy } - # Code block content - ``` - ```` - -### Code annotations - -[:octicons-tag-24: 8.0.0][Code annotations support] · -:octicons-unlock-24: Feature flag - -Code annotations offer a comfortable and friendly way to attach arbitrary -content to specific sections of code blocks by adding numeric markers in block -and inline comments in the language of the code block. Add the following to -`mkdocs.yml` to enable them globally: - -``` yaml -theme: - features: - - content.code.annotate # (1)! -``` - -1. :man_raising_hand: I'm a code annotation! I can contain `code`, __formatted - text__, images, ... basically anything that can be written in Markdown. - -??? info "Enabling code annotations for a specific code block" - - If you don't want to enable code annotations globally, because you don't - like the automatic inlining behavior, you can enable them for a specific - code block by using a slightly different syntax based on the - [Attribute Lists] extension: - - ```` yaml - ``` { .yaml .annotate } - # Code block content - ``` - ```` - - Note that the language shortcode which has to come first must now also be - prefixed by a `.`. - - [Code annotations support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.0.0 - [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists - -#### Anchor links - -[:octicons-tag-24: 8.5.0][Anchor links support] · -:octicons-beaker-24: Experimental - -In order to be able to link to code annotations and share them more easily, an -anchor link is automatically added to each annotation, which you can copy via -right click or open in a new tab: - -``` yaml -# (1)! -``` - -1. If you ++cmd++ :material-plus::material-cursor-default-outline: me, I'm - rendered open in a new tab. You can also right-click me to __copy link - address__ to share me with others. - - [Anchor links support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.5.0 - -## Usage - -Code blocks must be enclosed with two separate lines containing three backticks. -To add syntax highlighting to those blocks, add the language shortcode directly -after the opening block. See the [list of available lexers] to find the -shortcode for a given language: - -```` markdown title="Code block" -``` py -import tensorflow as tf -``` -```` - -<div class="result" markdown> - -``` py -import tensorflow as tf -``` - -</div> - - [list of available lexers]: https://pygments.org/docs/lexers/ - -### Adding a title - -In order to provide additional context, a custom title can be added to a code -block by using the `title="<custom title>"` option directly after the shortcode, -e.g. to display the name of a file: - -```` markdown title="Code block with title" -``` py title="bubble_sort.py" -def bubble_sort(items): - for i in range(len(items)): - for j in range(len(items) - 1 - i): - if items[j] > items[j + 1]: - items[j], items[j + 1] = items[j + 1], items[j] -``` -```` - -<div class="result" markdown> - -``` py title="bubble_sort.py" -def bubble_sort(items): - for i in range(len(items)): - for j in range(len(items) - 1 - i): - if items[j] > items[j + 1]: - items[j], items[j + 1] = items[j + 1], items[j] -``` - -</div> - -### Adding annotations - -Code annotations can be placed anywhere in a code block where a comment for the -language of the block can be placed, e.g. for JavaScript in `#!js // ...` and -`#!js /* ... */`, for YAML in `#!yaml # ...`, etc.[^1]: - - [^1]: - Code annotations require syntax highlighting with [Pygments] – they're - currently not compatible with JavaScript syntax highlighters, or languages - that do not have comments in their grammar. However, we're actively working - on supporting alternate ways of defining code annotations, allowing to - always place code annotations at the end of lines. - -```` markdown title="Code block with annotation" -``` yaml -theme: - features: - - content.code.annotate # (1) -``` - -1. :man_raising_hand: I'm a code annotation! I can contain `code`, __formatted - text__, images, ... basically anything that can be written in Markdown. -```` - -<div class="result" markdown> - -``` yaml -theme: - features: - - content.code.annotate # (1) -``` - -1. :man_raising_hand: I'm a code annotation! I can contain `code`, __formatted - text__, images, ... basically anything that can be written in Markdown. - -</div> - -#### Stripping comments - -[:octicons-tag-24: 8.5.0][Stripping comments support] · -:octicons-beaker-24: Experimental - -If you wish to strip the comment characters surrounding a code annotation, -simply add an `!` after the closing parenthesis of the code annotation: - -```` markdown title="Code block with annotation, stripped" -``` yaml -# (1)! -``` - -1. Look ma, less line noise! -```` - -<div class="result" markdown> - -``` yaml -# (1)! -``` - -1. Look ma, less line noise! - -</div> - -Note that this only allows for a single code annotation to be rendered per -comment. If you want to add multiple code annotations, comments cannot be -stripped for technical reasons. - - [Stripping comments support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.5.0 - -### Adding line numbers - -Line numbers can be added to a code block by using the `linenums="<start>"` -option directly after the shortcode, whereas `<start>` represents the starting -line number. A code block can start from a line number other than `1`, which -allows to split large code blocks for readability: - -```` markdown title="Code block with line numbers" -``` py linenums="1" -def bubble_sort(items): - for i in range(len(items)): - for j in range(len(items) - 1 - i): - if items[j] > items[j + 1]: - items[j], items[j + 1] = items[j + 1], items[j] -``` -```` - -<div class="result" markdown> - -``` py linenums="1" -def bubble_sort(items): - for i in range(len(items)): - for j in range(len(items) - 1 - i): - if items[j] > items[j + 1]: - items[j], items[j + 1] = items[j + 1], items[j] -``` - -</div> - -### Highlighting specific lines - -Specific lines can be highlighted by passing the line numbers to the `hl_lines` -argument placed right after the language shortcode. Note that line counts start -at `1`, regardless of the starting line number specified as part of -[`linenums`][Adding line numbers]: - -```` markdown title="Code block with highlighted lines" -``` py hl_lines="2 3" -def bubble_sort(items): - for i in range(len(items)): - for j in range(len(items) - 1 - i): - if items[j] > items[j + 1]: - items[j], items[j + 1] = items[j + 1], items[j] -``` -```` - -<div class="result" markdown> - -``` py linenums="1" hl_lines="2 3" -def bubble_sort(items): - for i in range(len(items)): - for j in range(len(items) - 1 - i): - if items[j] > items[j + 1]: - items[j], items[j + 1] = items[j + 1], items[j] -``` - -</div> - - [Adding line numbers]: #adding-line-numbers - -### Highlighting inline code blocks - -When [InlineHilite] is enabled, syntax highlighting can be applied to inline -code blocks by prefixing them with a shebang, i.e. `#!`, directly followed by -the corresponding [language shortcode][list of available lexers]. - -``` markdown title="Inline code block" -The `#!python range()` function is used to generate a sequence of numbers. -``` - -<div class="result" markdown> - -The `#!python range()` function is used to generate a sequence of numbers. - -</div> - -### Embedding external files - -When [Snippets] is enabled, content from other files (including source files) -can be embedded by using the [`--8<--` notation][Snippets notation] directly -from within a code block: - -```` markdown title="Code block with external content" -``` title=".browserslistrc" ---8<-- ".browserslistrc" -``` -```` - -<div class="result" markdown> - -``` title=".browserslistrc" -last 4 years -``` - -</div> - - [Snippets notation]: https://facelessuser.github.io/pymdown-extensions/extensions/snippets/#snippets-notation - -## Customization - -### Custom syntax theme - -If [Pygments] is used, Material for MkDocs provides the [styles for code blocks] -[colors], which are built with a custom and well-balanced palette that works -equally well for both [color schemes]: - -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-number-color) " } `--md-code-hl-number-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-special-color) " } `--md-code-hl-special-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-function-color) " } `--md-code-hl-function-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-constant-color) " } `--md-code-hl-constant-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-keyword-color) " } `--md-code-hl-keyword-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-string-color) " } `--md-code-hl-string-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-name-color) " } `--md-code-hl-name-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-operator-color) " } `--md-code-hl-operator-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-punctuation-color) " } `--md-code-hl-punctuation-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-comment-color) " } `--md-code-hl-comment-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-generic-color) " } `--md-code-hl-generic-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-variable-color) " } `--md-code-hl-variable-color` - -Code block foreground, background and line highlight colors are defined via: - -- :material-checkbox-blank-circle:{ style="color: var(--md-code-fg-color) " } `--md-code-fg-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-bg-color) " } `--md-code-bg-color` -- :material-checkbox-blank-circle:{ style="color: var(--md-code-hl-color) " } `--md-code-hl-color` - -Let's say you want to change the color of `#!js "strings"`. While there are -several [types of string tokens], they use the same color. You can assign -a new color by using an [additional style sheet]: - -=== ":octicons-file-code-16: `docs/stylesheets/extra.css`" - - ``` css - :root > * { - --md-code-hl-string-color: #0FF1CE; - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_css: - - stylesheets/extra.css - ``` - -If you want to tweak a specific type of string, e.g. ``#!js `backticks` ``, you -can lookup the specific CSS class name in the [syntax theme definition], and -override it as part of your [additional style sheet]: - -=== ":octicons-file-code-16: `docs/stylesheets/extra.css`" - - ``` css - .highlight .sb { - color: #0FF1CE; - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_css: - - stylesheets/extra.css - ``` - - [colors]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/main/_colors.scss - [color schemes]: ../setup/changing-the-colors.md#color-scheme - [types of string tokens]: https://pygments.org/docs/tokens/#literals - [additional style sheet]: ../customization.md#additional-css - [syntax theme definition]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/main/extensions/pymdownx/_highlight.scss - -### Annotation tooltip width - -If you have a lot of content hosted inside your code annotations, it can be a -good idea to increase the width of the tooltip by adding the following as part -of an [additional style sheet]: - -=== ":octicons-file-code-16: `docs/stylesheets/extra.css`" - - ``` css - :root { - --md-tooltip-width: 600px; - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_css: - - stylesheets/extra.css - ``` - -This will render annotations with a larger width: - -<div style="--md-tooltip-width: 600px;" markdown> - -``` yaml -# (1)! -``` - -1. Muuuuuuuuuuuuuuuch more space for content - -</div> - -### Annotations with numbers - -Prior to [:octicons-tag-24: 8.1.0][code annotation markers], code annotations -were rendered with markers showing the original number as used by the author. -However, for technical reasons code annotation numbers restart each code block, -which might lead to confusion. For this reason, code annotations now render as -`+` signs which are rotated if they're open to denote that clicking them again -will close them. - -If you wish to revert to the prior behavior and display code annotation numbers, -you can add an [additional style sheet] and copy and paste the following CSS: - -=== ":octicons-file-code-16: `docs/stylesheets/extra.css`" - - ``` css - .md-typeset .md-annotation__index > ::before { - content: attr(data-md-annotation-id); - } - .md-typeset :focus-within > .md-annotation__index > ::before { - transform: none; - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_css: - - stylesheets/extra.css - ``` - - [code annotation markers]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.1.0 diff --git a/docs/reference/content-tabs.md b/docs/reference/content-tabs.md deleted file mode 100644 index fc01226d7d6d2dc0c5f1d196009f90ca89e8e844..0000000000000000000000000000000000000000 --- a/docs/reference/content-tabs.md +++ /dev/null @@ -1,250 +0,0 @@ ---- -icon: material/tab ---- - -# Content tabs - -Sometimes, it's desirable to group alternative content under different tabs, -e.g. when describing how to access an API from different languages or -environments. Material for MkDocs allows for beautiful and functional tabs, -grouping code blocks and other content. - -## Configuration - -This configuration enables content tabs, and allows to nest arbitrary content -inside content tabs, including code blocks and ... more content tabs! Add the -following lines to `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.superfences - - pymdownx.tabbed: - alternate_style: true -``` - -See additional configuration options: - -- [SuperFences] -- [Tabbed] - - [SuperFences]: ../setup/extensions/python-markdown-extensions.md#superfences - [Tabbed]: ../setup/extensions/python-markdown-extensions.md#tabbed - -### Anchor links - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.17.0][Insiders] · -:octicons-beaker-24: Experimental - -In order to link to content tabs and share them more easily, [Insiders] adds -an anchor link to each content tab automatically, which you can copy via right -click or open in a new tab: - -=== "Open me in a new tab ..." - -=== "... or me ..." - -=== "... or even me" - -You can copy the link of the tab and create a link on the same or any other -page. For example, you can [jump to the third tab above this paragraph][tab_1] -or to the [publishing guide for Insiders][tab_2]. - -!!! tip "Readable anchor links" - - [Python Markdown Extensions] 9.6 adds support for [slugification] of - content tabs, which produces nicer looking and more readable anchor links. - Enable the slugify function with the following lines: - - ``` yaml - markdown_extensions: - - pymdownx.tabbed: - slugify: !!python/object/apply:pymdownx.slugs.slugify - kwds: - case: lower - ``` - - Fore more information, please [see the extension guide][slugification]. - - [Insiders]: ../insiders/index.md - [tab_1]: #-or-even-me - [tab_2]: ../publishing-your-site.md#insiders - [Python Markdown Extensions]: https://facelessuser.github.io/pymdown-extensions/ - [slugification]: ../setup/extensions/python-markdown-extensions.md#+pymdownx.tabbed.slugify - -### Linked content tabs - -[:octicons-tag-24: 8.3.0][Linked content tabs support] · -:octicons-unlock-24: Feature flag - -When enabled, all content tabs across the whole documentation site will be -linked and switch to the same label when the user clicks on a tab. Add the -following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - content.tabs.link -``` - -Content tabs are linked based on their label, not offset. This means that all -tabs with the same label will be activated when a user clicks a content tab -regardless of order inside a container. Furthermore, this feature is fully -integrated with [instant loading] and persisted across page loads. - -=== "Feature enabled" - - [![Linked content tabs enabled]][Linked content tabs enabled] - -=== "Feature disabled" - - [![Linked content tabs disabled]][Linked content tabs disabled] - - [Linked content tabs support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.3.0 - [instant loading]: ../setup/setting-up-navigation.md#instant-loading - [Linked content tabs enabled]: ../assets/screenshots/content-tabs-link.png - [Linked content tabs disabled]: ../assets/screenshots/content-tabs.png - -## Usage - -### Grouping code blocks - -Code blocks are one of the primary targets to be grouped, and can be considered -a special case of content tabs, as tabs with a single code block are always -rendered without horizontal spacing: - -``` title="Content tabs with code blocks" -=== "C" - - ``` c - #include <stdio.h> - - int main(void) { - printf("Hello world!\n"); - return 0; - } - ``` - -=== "C++" - - ``` c++ - #include <iostream> - - int main(void) { - std::cout << "Hello world!" << std::endl; - return 0; - } - ``` -``` - -<div class="result" markdown> - -=== "C" - - ``` c - #include <stdio.h> - - int main(void) { - printf("Hello world!\n"); - return 0; - } - ``` - -=== "C++" - - ``` c++ - #include <iostream> - - int main(void) { - std::cout << "Hello world!" << std::endl; - return 0; - } - ``` - -</div> - -### Grouping other content - -When a content tab contains more than one code block, it is rendered with -horizontal spacing. Vertical spacing is never added, but can be achieved -by nesting tabs in other blocks: - -``` title="Content tabs" -=== "Unordered list" - - * Sed sagittis eleifend rutrum - * Donec vitae suscipit est - * Nulla tempor lobortis orci - -=== "Ordered list" - - 1. Sed sagittis eleifend rutrum - 2. Donec vitae suscipit est - 3. Nulla tempor lobortis orci -``` - -<div class="result" markdown> - -=== "Unordered list" - - * Sed sagittis eleifend rutrum - * Donec vitae suscipit est - * Nulla tempor lobortis orci - -=== "Ordered list" - - 1. Sed sagittis eleifend rutrum - 2. Donec vitae suscipit est - 3. Nulla tempor lobortis orci - -</div> - -### Embedded content - -When [SuperFences] is enabled, content tabs can contain arbitrary nested -content, including further content tabs, and can be nested in other blocks like -[admonitions] or blockquotes: - -``` title="Content tabs in admonition" -!!! example - - === "Unordered List" - - ``` markdown - * Sed sagittis eleifend rutrum - * Donec vitae suscipit est - * Nulla tempor lobortis orci - ``` - - === "Ordered List" - - ``` markdown - 1. Sed sagittis eleifend rutrum - 2. Donec vitae suscipit est - 3. Nulla tempor lobortis orci - ``` -``` - -<div class="result" markdown> - -!!! example - - === "Unordered List" - - ``` markdown - * Sed sagittis eleifend rutrum - * Donec vitae suscipit est - * Nulla tempor lobortis orci - ``` - - === "Ordered List" - - ``` markdown - 1. Sed sagittis eleifend rutrum - 2. Donec vitae suscipit est - 3. Nulla tempor lobortis orci - ``` - -</div> - - [admonitions]: admonitions.md diff --git a/docs/reference/data-tables.md b/docs/reference/data-tables.md deleted file mode 100644 index 03b91d6a96838d90efd7f77d7b567c1eb5e8c2e9..0000000000000000000000000000000000000000 --- a/docs/reference/data-tables.md +++ /dev/null @@ -1,184 +0,0 @@ ---- -icon: material/table-edit ---- - -# Data tables - -Material for MkDocs defines default styles for data tables – an excellent way -of rendering tabular data in project documentation. Furthermore, customizations -like [sortable tables] can be achieved with a third-party library and some -[additional JavaScript]. - - [sortable tables]: #sortable-tables - [additional JavaScript]: ../customization.md#additional-javascript - -## Configuration - -This configuration enables Markdown table support, which should normally be -enabled by default, but to be sure, add the following lines to `mkdocs.yml`: - -``` yaml -markdown_extensions: - - tables -``` - -See additional configuration options: - -- [Tables] - - [Tables]: ../setup/extensions/python-markdown.md#tables - -## Usage - -Data tables can be used at any position in your project documentation and can -contain arbitrary Markdown, including inline code blocks, as well as [icons and -emojis]: - -``` markdown title="Data table" -| Method | Description | -| ----------- | ------------------------------------ | -| `GET` | :material-check: Fetch resource | -| `PUT` | :material-check-all: Update resource | -| `DELETE` | :material-close: Delete resource | -``` - -<div class="result" markdown> - -| Method | Description | -| ----------- | ------------------------------------ | -| `GET` | :material-check: Fetch resource | -| `PUT` | :material-check-all: Update resource | -| `DELETE` | :material-close: Delete resource | - -</div> - - [icons and emojis]: icons-emojis.md - -### Column alignment - -If you want to align a specific column to the `left`, `center` or `right`, you -can use the [regular Markdown syntax] placing `:` characters at the beginning -and/or end of the divider. - -=== "Left" - - ``` markdown hl_lines="2" title="Data table, columns aligned to left" - | Method | Description | - | :---------- | :----------------------------------- | - | `GET` | :material-check: Fetch resource | - | `PUT` | :material-check-all: Update resource | - | `DELETE` | :material-close: Delete resource | - ``` - - <div class="result" markdown> - - | Method | Description | - | :---------- | :----------------------------------- | - | `GET` | :material-check: Fetch resource | - | `PUT` | :material-check-all: Update resource | - | `DELETE` | :material-close: Delete resource | - - </div> - -=== "Center" - - ``` markdown hl_lines="2" title="Data table, columns centered" - | Method | Description | - | :---------: | :----------------------------------: | - | `GET` | :material-check: Fetch resource | - | `PUT` | :material-check-all: Update resource | - | `DELETE` | :material-close: Delete resource | - ``` - - <div class="result" markdown> - - | Method | Description | - | :---------: | :----------------------------------: | - | `GET` | :material-check: Fetch resource | - | `PUT` | :material-check-all: Update resource | - | `DELETE` | :material-close: Delete resource | - - </div> - -=== "Right" - - ``` markdown hl_lines="2" title="Data table, columns aligned to right" - | Method | Description | - | ----------: | -----------------------------------: | - | `GET` | :material-check: Fetch resource | - | `PUT` | :material-check-all: Update resource | - | `DELETE` | :material-close: Delete resource | - ``` - - <div class="result" markdown> - - | Method | Description | - | ----------: | -----------------------------------: | - | `GET` | :material-check: Fetch resource | - | `PUT` | :material-check-all: Update resource | - | `DELETE` | :material-close: Delete resource | - - </div> - - [regular Markdown syntax]: https://www.markdownguide.org/extended-syntax/#tables - -## Customization - -### Sortable tables - -If you want to make data tables sortable, you can add [tablesort], which is -natively integrated with Material for MkDocs and will also work with [instant -loading] via [additional JavaScript]: - -=== ":octicons-file-code-16: `docs/javascripts/tablesort.js`" - - ``` js - document$.subscribe(function() { - var tables = document.querySelectorAll("article table:not([class])") - tables.forEach(function(table) { - new Tablesort(table) - }) - }) - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_javascript: - - https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js - - javascripts/tablesort.js - ``` - -After applying the customization, data tables can be sorted by clicking on a -column: - -``` markdown title="Data table, columns sortable" -| Method | Description | -| ----------- | ------------------------------------ | -| `GET` | :material-check: Fetch resource | -| `PUT` | :material-check-all: Update resource | -| `DELETE` | :material-close: Delete resource | -``` - -<div class="result" markdown> - -| Method | Description | -| ----------- | ------------------------------------ | -| `GET` | :material-check: Fetch resource | -| `PUT` | :material-check-all: Update resource | -| `DELETE` | :material-close: Delete resource | - -</div> - -Note that [tablesort] provides alternative comparison implementations like -numbers, filesizes, dates and month names. See the [tablesort documentation] -[tablesort] for more information. - -<script src="https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js"></script> -<script> - var tables = document.querySelectorAll("article table") - new Tablesort(tables.item(tables.length - 1)); -</script> - - [tablesort]: http://tristen.ca/tablesort/demo/ - [instant loading]: ../setup/setting-up-navigation.md#instant-loading diff --git a/docs/reference/diagrams.md b/docs/reference/diagrams.md deleted file mode 100644 index 735564b605338af8174e5e2dde56360b9ce928bc..0000000000000000000000000000000000000000 --- a/docs/reference/diagrams.md +++ /dev/null @@ -1,286 +0,0 @@ ---- -icon: material/graph-outline ---- - -# Diagrams - -Diagrams help to communicate complex relationships and interconnections between -different technical components, and are a great addition to project -documentation. Material for MkDocs integrates with [Mermaid.js], a very -popular and flexible solution for drawing diagrams. - - [Mermaid.js]: https://mermaid-js.github.io/mermaid/ - -## Configuration - -[:octicons-tag-24: 8.2.0][Diagrams support] - -This configuration enables native support for [Mermaid.js] diagrams. Material -for MkDocs will automatically initialize the JavaScript runtime when a page -includes a `mermaid` code block: - -``` yaml -markdown_extensions: - - pymdownx.superfences: - custom_fences: - - name: mermaid - class: mermaid - format: !!python/name:pymdownx.superfences.fence_code_format -``` - -No further configuration is necessary. Advantages over a custom integration: - -- [x] Works with [instant loading] without any additional effort -- [x] Diagrams automatically use fonts and colors defined in `mkdocs.yml`[^1] -- [x] Fonts and colors can be customized with [additional style sheets] -- [x] Support for both, light and dark color schemes – _try it on this page!_ - - [^1]: - While all [Mermaid.js] features should work out-of-the-box, Material for - MkDocs will currently only adjust the fonts and colors for flowcharts, - sequence diagrams, class diagrams, state diagrams and entity relationship - diagrams. See the section on [other diagrams] for more information why this - is currently not implemented for all diagrams. - - [Diagrams support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.2.0 - [instant loading]: ../setup/setting-up-navigation.md#instant-loading - [additional style sheets]: ../customization.md#additional-css - [other diagrams]: #other-diagrams - -## Usage - -### Using flowcharts - -[Flowcharts] are diagrams that represent workflows or processes. The steps -are rendered as nodes of various kinds and are connected by edges, describing -the necessary order of steps: - -```` markdown title="Flow chart" -``` mermaid -graph LR - A[Start] --> B{Error?}; - B -->|Yes| C[Hmm...]; - C --> D[Debug]; - D --> B; - B ---->|No| E[Yay!]; -``` -```` - -<div class="result" markdown> - -``` mermaid -graph LR - A[Start] --> B{Error?}; - B -->|Yes| C[Hmm...]; - C --> D[Debug]; - D --> B; - B ---->|No| E[Yay!]; -``` - -</div> - - [Flowcharts]: https://mermaid-js.github.io/mermaid/#/flowchart - -### Using sequence diagrams - -[Sequence diagrams] describe a specific scenario as sequential interactions -between multiple objects or actors, including the messages that are exchanged -between those actors: - -```` markdown title="Sequence diagram" -``` mermaid -sequenceDiagram - autonumber - Alice->>John: Hello John, how are you? - loop Healthcheck - John->>John: Fight against hypochondria - end - Note right of John: Rational thoughts! - John-->>Alice: Great! - John->>Bob: How about you? - Bob-->>John: Jolly good! -``` -```` - -<div class="result" markdown> - -``` mermaid -sequenceDiagram - autonumber - Alice->>John: Hello John, how are you? - loop Healthcheck - John->>John: Fight against hypochondria - end - Note right of John: Rational thoughts! - John-->>Alice: Great! - John->>Bob: How about you? - Bob-->>John: Jolly good! -``` - -</div> - - [Sequence diagrams]: https://mermaid-js.github.io/mermaid/#/sequenceDiagram - -### Using state diagrams - -[State diagrams] are a great tool to describe the behavior of a system, -decomposing it into a finite number of states, and transitions between those -states: - -```` markdown title="State diagram" -``` mermaid -stateDiagram-v2 - state fork_state <<fork>> - [*] --> fork_state - fork_state --> State2 - fork_state --> State3 - - state join_state <<join>> - State2 --> join_state - State3 --> join_state - join_state --> State4 - State4 --> [*] -``` -```` - -<div class="result" markdown> - -``` mermaid -stateDiagram-v2 - state fork_state <<fork>> - [*] --> fork_state - fork_state --> State2 - fork_state --> State3 - - state join_state <<join>> - State2 --> join_state - State3 --> join_state - join_state --> State4 - State4 --> [*] -``` - -</div> - - [State diagrams]: https://mermaid-js.github.io/mermaid/#/stateDiagram - -### Using class diagrams - -[Class diagrams] are central to object oriented programing, describing the -structure of a system by modelling entities as classes and relationships between -them: - -```` markdown title="Class diagram" -``` mermaid -classDiagram - Person <|-- Student - Person <|-- Professor - Person : +String name - Person : +String phoneNumber - Person : +String emailAddress - Person: +purchaseParkingPass() - Address "1" <-- "0..1" Person:lives at - class Student{ - +int studentNumber - +int averageMark - +isEligibleToEnrol() - +getSeminarsTaken() - } - class Professor{ - +int salary - } - class Address{ - +String street - +String city - +String state - +int postalCode - +String country - -validate() - +outputAsLabel() - } -``` -```` - -<div class="result" markdown> - -``` mermaid -classDiagram - Person <|-- Student - Person <|-- Professor - Person : +String name - Person : +String phoneNumber - Person : +String emailAddress - Person: +purchaseParkingPass() - Address "1" <-- "0..1" Person:lives at - class Student{ - +int studentNumber - +int averageMark - +isEligibleToEnrol() - +getSeminarsTaken() - } - class Professor{ - +int salary - } - class Address{ - +String street - +String city - +String state - +int postalCode - +String country - -validate() - +outputAsLabel() - } -``` - -</div> - - [Class diagrams]: https://mermaid-js.github.io/mermaid/#/classDiagram - -### Using entity-relationship diagrams - -An [entity-relationship diagram] is composed of entity types and specifies -relationships that exist between entities. It describes inter-related things in -a specific domain of knowledge: - -```` markdown title="Entity-relationship diagram" -``` mermaid -erDiagram - CUSTOMER ||--o{ ORDER : places - ORDER ||--|{ LINE-ITEM : contains - LINE-ITEM { - string name - int pricePerUnit - } - CUSTOMER }|..|{ DELIVERY-ADDRESS : uses -``` -```` - -<div class="result" markdown> - -``` mermaid -erDiagram - CUSTOMER ||--o{ ORDER : places - ORDER ||--|{ LINE-ITEM : contains - LINE-ITEM { - string name - int pricePerUnit - } - CUSTOMER }|..|{ DELIVERY-ADDRESS : uses -``` - -</div> - - [entity-relationship diagram]: https://mermaid-js.github.io/mermaid/#/entityRelationshipDiagram - -### Other diagram types - -Besides the diagram types listed above, [Mermaid.js] provides support for -[pie charts], [gantt charts], [user journeys], [git graphs] and -[requirement diagrams], all of which are not officially supported by Material -for MkDocs. Those diagrams should still work as advertised by [Mermaid.js], but -we don't consider them a good choice, mostly as they don't work well on mobile. - - [pie charts]: https://mermaid-js.github.io/mermaid/#/pie - [gantt charts]: https://mermaid-js.github.io/mermaid/#/gantt - [user journeys]: https://mermaid-js.github.io/mermaid/#/user-journey - [git graphs]: https://mermaid-js.github.io/mermaid/#/gitgraph - [requirement diagrams]: https://mermaid-js.github.io/mermaid/#/requirementDiagram diff --git a/docs/reference/footnotes.md b/docs/reference/footnotes.md deleted file mode 100644 index 16380c2cb2bdab23d19351f55d37623c06f55fe5..0000000000000000000000000000000000000000 --- a/docs/reference/footnotes.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -icon: material/format-align-bottom ---- - -# Footnotes - -Footnotes are a great way to add supplemental or additional information to a -specific word, phrase or sentence without interrupting the flow of a document. -Material for MkDocs provides the ability to define, reference and render -footnotes. - -## Configuration - -This configuration adds the ability to define inline footnotes, which are then -rendered below all Markdown content of a document. Add the following lines to -`mkdocs.yml`: - -``` yaml -markdown_extensions: - - footnotes -``` - -See additional configuration options: - -- [Footnotes] - - [Footnotes]: ../setup/extensions/python-markdown.md#footnotes - -## Usage - -### Adding footnote references - -A footnote reference must be enclosed in square brackets and must start with a -caret `^`, directly followed by an arbitrary identifier, which is similar to -the standard Markdown link syntax. - -``` title="Text with footnote references" -Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2] -``` - -<div class="result" markdown> - -Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2] - -</div> - -### Adding footnote content - -The footnote content must be declared with the same identifier as the reference. -It can be inserted at an arbitrary position in the document and is always -rendered at the bottom of the page. Furthermore, a backlink to the footnote -reference is automatically added. - -#### on a single line - -Short footnotes can be written on the same line: - -``` title="Footnote" -[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit. -``` - -<div class="result" markdown> - -[:octicons-arrow-down-24: Jump to footnote](#fn:1) - -</div> - - [^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit. - -#### on multiple lines - -Paragraphs can be written on the next line and must be indented by four spaces: - -``` title="Footnote" -[^2]: - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. -``` - -<div class="result" markdown> - -[:octicons-arrow-down-24: Jump to footnote](#fn:2) - -</div> - -[^2]: - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus - auctor massa, nec semper lorem quam in massa. diff --git a/docs/reference/formatting.md b/docs/reference/formatting.md deleted file mode 100644 index 7dec1ca699709b8838b05cb2f7b6b85b65156806..0000000000000000000000000000000000000000 --- a/docs/reference/formatting.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -icon: material/format-font ---- - -# Formatting - -Material for MkDocs provides support for several HTML elements that can be used -to highlight sections of a document or apply specific formatting. Additionally, -[Critic Markup] is supported, adding the ability to display suggested changes -for a document. - - [Critic Markup]: https://github.com/CriticMarkup/CriticMarkup-toolkit - -## Configuration - -This configuration enables support for keyboard keys, tracking changes in -documents, defining sub- and superscript and highlighting text. Add the -following lines to `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.critic - - pymdownx.caret - - pymdownx.keys - - pymdownx.mark - - pymdownx.tilde -``` - -See additional configuration options: - -- [Critic] -- [Caret, Mark & Tilde] -- [Keys] - - [Critic]: ../setup/extensions/python-markdown-extensions.md#critic - [Caret, Mark & Tilde]: ../setup/extensions/python-markdown-extensions.md#caret-mark-tilde - [Keys]: ../setup/extensions/python-markdown-extensions.md#keys - -## Usage - -### Highlighting changes - -When [Critic] is enabled, [Critic Markup] can be used, which adds the ability to -highlight suggested changes, as well as add inline comments to a document: - -``` title="Text with suggested changes" -Text can be {--deleted--} and replacement text {++added++}. This can also be -combined into {~~one~>a single~~} operation. {==Highlighting==} is also -possible {>>and comments can be added inline<<}. - -{== - -Formatting can also be applied to blocks by putting the opening and closing -tags on separate lines and adding new lines between the tags and the content. - -==} -``` - -<div class="result" markdown> - -Text can be <del class="critic">deleted</del> and replacement text -<ins class="critic">added</ins>. This can also be combined into -<del class="critic">one</del><ins class="critic">a single</ins> operation. -<mark class="critic">Highlighting</mark> is also possible -<span class="critic comment">and comments can be added inline</span>. - -<div> - <mark class="critic block"> - <p> - Formatting can also be applied to blocks by putting the opening and - closing tags on separate lines and adding new lines between the tags and - the content. - </p> - </mark> -</div> - -</div> - -### Highlighting text - -When [Caret, Mark & Tilde] are enabled, text can be highlighted with a simple -syntax, which is more convenient that directly using the corresponding -[`mark`][mark], [`ins`][ins] and [`del`][del] HTML tags: - -``` title="Text with highlighting" -- ==This was marked== -- ^^This was inserted^^ -- ~~This was deleted~~ -``` - -<div class="result" markdown> - -- ==This was marked== -- ^^This was inserted^^ -- ~~This was deleted~~ - -</div> - - [mark]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark - [ins]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins - [del]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del - -### Sub- and superscripts - -When [Caret & Tilde][Caret, Mark & Tilde] are enabled, text can be sub- and -superscripted with a simple syntax, which is more convenient than directly -using the corresponding [`sub`][sub] and [`sup`][sup] HTML tags: - -``` markdown title="Text with sub- und superscripts" -- H~2~O -- A^T^A -``` - -<div class="result" markdown> - -- H~2~O -- A^T^A - -</div> - - [sub]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sub - [sup]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sup - -### Adding keyboard keys - -When [Keys] is enabled, keyboard keys can be rendered with a simple syntax. -Consult the [Python Markdown Extensions] documentation to learn about all -available shortcodes: - -``` markdown title="Keyboard keys" -++ctrl+alt+del++ -``` - -<div class="result" markdown> - -++ctrl+alt+del++ - -</div> - - [Python Markdown Extensions]: https://facelessuser.github.io/pymdown-extensions/extensions/keys/#extendingmodifying-key-map-index diff --git a/docs/reference/grids.md b/docs/reference/grids.md deleted file mode 100644 index 021394d3fe70563d2f1e3ec761e7b6c9d1569b4a..0000000000000000000000000000000000000000 --- a/docs/reference/grids.md +++ /dev/null @@ -1,304 +0,0 @@ ---- -icon: material/view-grid-plus ---- - -# Grids - -Material for MkDocs makes it easy to arrange sections into grids, grouping -blocks that convey similar meaning or are of equal importance. Grids are just -perfect for building index pages that show a brief overview of a large section -of your documentation. - -## Configuration - -This configuration enables the use of grids, allowing to bring blocks of -identical or different types into a rectangular shape. Add the following lines -to `mkdocs.yml`: - -``` yaml -markdown_extensions: # (1)! - - attr_list - - md_in_html -``` - -1. Note that some of the examples listed below use [icons and emojis], which - have to be [configured separately]. - -See additional configuration options: - -- [Attribute Lists] -- [Markdown in HTML] - - [icons and emojis]: icons-emojis.md - [configured separately]: icons-emojis.md#configuration - [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists - [Markdown in HTML]: ../setup/extensions/python-markdown.md#markdown-in-html - -## Usage - -Grids come in two flavors: [card grids], which wrap each element in a card that -levitates on hover, and [generic grids], which allow to arrange arbitrary block -elements in a rectangular shape. - - [card grids]: #using-card-grids - [generic grids]: #using-generic-grids - -### Using card grids - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.12.0][Insiders] · -:octicons-beaker-24: Experimental - -Card grids wrap each grid item with a beautiful hover card that levitates on -hover. They come in two slightly different syntaxes: [list] and [block syntax], -adding support for distinct use cases. - - [Insiders]: ../insiders/index.md - [list]: #list-syntax - [block syntax]: #block-syntax - -#### List syntax - -The list syntax is essentially a shortcut for [card grids], and consists of an -unordered (or ordered) list wrapped by a `div` with both, the `grid` and `cards` -classes: - -``` html title="Card grid" -<div class="grid cards" markdown> - -- :fontawesome-brands-html5: __HTML__ for content and structure -- :fontawesome-brands-js: __JavaScript__ for interactivity -- :fontawesome-brands-css3: __CSS__ for text running out of boxes -- :fontawesome-brands-internet-explorer: __Internet Explorer__ ... huh? - -</div> -``` - -<div class="result" markdown> - <div class="grid cards" markdown> - -- :fontawesome-brands-html5: __HTML__ for content and structure -- :fontawesome-brands-js: __JavaScript__ for interactivity -- :fontawesome-brands-css3: __CSS__ for text running out of boxes -- :fontawesome-brands-internet-explorer: __Internet Explorer__ ... huh? - - </div> -</div> - -List elements can contain arbitrary Markdown, as long as the surrounding `div` -defines the `markdown` attribute. Following is a more complex example, which -includes icons and links: - -``` html title="Card grid, complex example" -<div class="grid cards" markdown> - -- :material-clock-fast:{ .lg .middle } __Set up in 5 minutes__ - - --- - - Install [`mkdocs-material`](#) with [`pip`](#) and get up - and running in minutes - - [:octicons-arrow-right-24: Getting started](#) - -- :fontawesome-brands-markdown:{ .lg .middle } __It's just Markdown__ - - --- - - Focus on your content and generate a responsive and searchable static site - - [:octicons-arrow-right-24: Reference](#) - -- :material-format-font:{ .lg .middle } __Made to measure__ - - --- - - Change the colors, fonts, language, icons, logo and more with a few lines - - [:octicons-arrow-right-24: Customization](#) - -- :material-scale-balance:{ .lg .middle } __Open Source, MIT__ - - --- - - Material for MkDocs is licensed under MIT and available on [GitHub] - - [:octicons-arrow-right-24: License](#) - -</div> -``` - -<div class="result" markdown> - <div class="grid cards" markdown> - -- :material-clock-fast:{ .lg .middle } __Set up in 5 minutes__ - - --- - - Install [`mkdocs-material`][mkdocs-material] with [`pip`][pip] and get up - and running in minutes - - [:octicons-arrow-right-24: Getting started][getting started] - -- :fontawesome-brands-markdown:{ .lg .middle } __It's just Markdown__ - - --- - - Focus on your content and generate a responsive and searchable static site - - [:octicons-arrow-right-24: Reference][reference] - -- :material-format-font:{ .lg .middle } __Made to measure__ - - --- - - Change the colors, fonts, language, icons, logo and more with a few lines - - [:octicons-arrow-right-24: Customization][customization] - -- :material-scale-balance:{ .lg .middle } __Open Source, MIT__ - - --- - - Material for MkDocs is licensed under MIT and available on [GitHub] - - [:octicons-arrow-right-24: License][license] - - </div> -</div> - -If there's insufficient space to render grid items next to each other, the items -will stretch to the full width of the viewport, e.g. on mobile viewports. If -there's more space available, grids will render in items of 3 and more, e.g. -when [hiding both sidebars]. - - [mkdocs-material]: https://pypistats.org/packages/mkdocs-material - [pip]: ../getting-started.md#with-pip - [getting started]: ../getting-started.md - [reference]: ../reference/index.md - [customization]: ../customization.md - [license]: ../license.md - [GitHub]: https://github.com/squidfunk/mkdocs-material - [hiding both sidebars]: ../setup/setting-up-navigation.md#hiding-the-sidebars - -#### Block syntax - -The block syntax allows for arranging cards in grids __together with other -elements__, as explained in the section on [generic grids]. Just add the `card` -class to any block element inside a `grid`: - -``` html title="Card grid, blocks" -<div class="grid" markdown> - -:fontawesome-brands-html5: __HTML__ for content and structure -{ .card } - -:fontawesome-brands-js: __JavaScript__ for interactivity -{ .card } - -:fontawesome-brands-css3: __CSS__ for text running out of boxes -{ .card } - -> :fontawesome-brands-internet-explorer: __Internet Explorer__ ... huh? - -</div> -``` - -<div class="result" markdown> - <div class="grid" markdown> - -:fontawesome-brands-html5: __HTML__ for content and structure -{ .card } - -:fontawesome-brands-js: __JavaScript__ for interactivity -{ .card } - -:fontawesome-brands-css3: __CSS__ for text running out of boxes -{ .card } - -> :fontawesome-brands-internet-explorer: __Internet Explorer__ ... huh? - - </div> -</div> - -While this syntax may seem unnecessarily verbose at first, the previous example -shows how card grids can now be mixed with other elements that will also stretch -to the grid. - -### Using generic grids - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.12.0][Insiders] · -:octicons-beaker-24: Experimental - -Generic grids allow for arranging arbitrary block elements in a grid, including -[admonitions], [code blocks], [content tabs] and more. Just wrap a set of blocks -by using a `div` with the `grid` class: - -```` html title="Generic grid" -<div class="grid" markdown> - -=== "Unordered list" - - * Sed sagittis eleifend rutrum - * Donec vitae suscipit est - * Nulla tempor lobortis orci - -=== "Ordered list" - - 1. Sed sagittis eleifend rutrum - 2. Donec vitae suscipit est - 3. Nulla tempor lobortis orci - -``` title="Content tabs" -=== "Unordered list" - - * Sed sagittis eleifend rutrum - * Donec vitae suscipit est - * Nulla tempor lobortis orci - -=== "Ordered list" - - 1. Sed sagittis eleifend rutrum - 2. Donec vitae suscipit est - 3. Nulla tempor lobortis orci -``` - -</div> -```` - -<div class="result" markdown> - <div class="grid" markdown> - -=== "Unordered list" - - * Sed sagittis eleifend rutrum - * Donec vitae suscipit est - * Nulla tempor lobortis orci - -=== "Ordered list" - - 1. Sed sagittis eleifend rutrum - 2. Donec vitae suscipit est - 3. Nulla tempor lobortis orci - -``` title="Content tabs" -=== "Unordered list" - - * Sed sagittis eleifend rutrum - * Donec vitae suscipit est - * Nulla tempor lobortis orci - -=== "Ordered list" - - 1. Sed sagittis eleifend rutrum - 2. Donec vitae suscipit est - 3. Nulla tempor lobortis orci -``` - - </div> -</div> - - [admonitions]: admonitions.md - [code blocks]: code-blocks.md - [content tabs]: content-tabs.md diff --git a/docs/reference/icons-emojis.md b/docs/reference/icons-emojis.md deleted file mode 100644 index 7243014baa90532bbc78eb552375ac8f54d64ffa..0000000000000000000000000000000000000000 --- a/docs/reference/icons-emojis.md +++ /dev/null @@ -1,231 +0,0 @@ ---- -icon: material/emoticon-happy-outline ---- - -# Icons, Emojis - -One of the best features of Material for MkDocs is the possibility to use [more -than 10,000 icons][icon search] and thousands of emojis in your project -documentation with practically zero additional effort. Moreover, custom icons -can be added and used in `mkdocs.yml`, documents and templates. - - [icon search]: #search - -## Search - -<div class="mdx-iconsearch" data-mdx-component="iconsearch"> - <input - class="md-input md-input--stretch mdx-iconsearch__input" - placeholder="Search the icon and emoji database" - data-mdx-component="iconsearch-query" - /> - <div class="mdx-iconsearch-result" data-mdx-component="iconsearch-result"> - <div class="mdx-iconsearch-result__meta"></div> - <ol class="mdx-iconsearch-result__list"></ol> - </div> -</div> -<small> - :octicons-light-bulb-16: - **Tip:** Enter some keywords to find icons and emojis and click on the - shortcode to copy it to your clipboard. -</small> - -## Configuration - -This configuration enables the use of icons and emojis by using simple -shortcodes which can be discovered through the [icon search]. Add the following -lines to `mkdocs.yml`: - -``` yaml -markdown_extensions: - - attr_list - - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg -``` - -The following icon sets are bundled with Material for MkDocs: - -- :material-material-design: – [Material Design] -- :fontawesome-brands-font-awesome: – [FontAwesome] -- :octicons-mark-github-16: – [Octicons] -- :simple-simpleicons: – [Simple Icons] - -See additional configuration options: - -- [Attribute Lists] -- [Emoji] -- [Emoji with custom icons] - - [Material Design]: https://materialdesignicons.com/ - [FontAwesome]: https://fontawesome.com/search?m=free - [Octicons]: https://octicons.github.com/ - [Simple Icons]: https://simpleicons.org/ - [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists - [Emoji]: ../setup/extensions/python-markdown-extensions.md#emoji - [Emoji with custom icons]: ../setup/extensions/python-markdown-extensions.md#custom-icons - -## Usage - -### Using emojis - -Emojis can be integrated in Markdown by putting the shortcode of the emoji -between two colons. If you're using [Twemoji] (recommended), you can look up -the shortcodes at [Emojipedia]: - -``` title="Emoji" -:smile: -``` - -<div class="result" markdown> - -:smile: - -</div> - - [Twemoji]: https://twemoji.twitter.com/ - [Emojipedia]: https://emojipedia.org/twitter/ - -### Using icons - -When [Emoji] is enabled, icons can be used similar to emojis, by referencing -a valid path to any icon bundled with the theme, which are located in the -[`.icons`][custom icons] directory, and replacing `/` with `-`: - -``` title="Icon" -:fontawesome-regular-face-laugh-wink: -``` - -<div class="result" markdown> - -:fontawesome-regular-face-laugh-wink: - -</div> - - [custom icons]: https://github.com/squidfunk/mkdocs-material/tree/master/material/.icons - -#### with colors - -When [Attribute Lists] is enabled, custom CSS classes can be added to icons by -suffixing the icon with a special syntax. While HTML allows to use [inline -styles], it's always recommended to add an [additional style sheet] and move -declarations into dedicated CSS classes: - -<style> - .twitter { - color: #1DA1F2; - } -</style> - -=== ":octicons-file-code-16: `docs/stylesheets/extra.css`" - - ``` css - .twitter { - color: #1DA1F2; - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_css: - - stylesheets/extra.css - ``` - -After applying the customization, add the CSS class to the icon shortcode: - -``` markdown title="Icon with color" -:fontawesome-brands-twitter:{ .twitter } -``` - -<div class="result" markdown> - -:fontawesome-brands-twitter:{ .twitter } - -</div> - - [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists - [inline styles]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/style - [additional style sheet]: ../customization.md#additional-css - -#### with animations - -Similar to adding [colors], it's just as easy to add [animations] to icons by -using an [additional style sheet], defining a `@keyframes` rule and adding a -dedicated CSS class to the icon: - -=== ":octicons-file-code-16: `docs/stylesheets/extra.css`" - - ``` css - @keyframes heart { - 0%, 40%, 80%, 100% { - transform: scale(1); - } - 20%, 60% { - transform: scale(1.15); - } - } - .heart { - animation: heart 1000ms infinite; - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_css: - - stylesheets/extra.css - ``` - -After applying the customization, add the CSS class to the icon shortcode: - -``` markdown title="Icon with animation" -:octicons-heart-fill-24:{ .heart } -``` - -<div class="result" markdown> - -:octicons-heart-fill-24:{ .mdx-heart } - -</div> - - [colors]: #with-colors - [animations]: https://developer.mozilla.org/en-US/docs/Web/CSS/animation - -### Icons, emojis in sidebars :smile: - -With the help of the [built-in typeset plugin], you can use icons and emojis -in headings, which will then be rendered in the sidebars. The plugin preserves -Markdown and HTML formatting. - - [built-in typeset plugin]: ./index.md#built-in-typeset-plugin - -## Customization - -### Using icons in templates - -When you're [extending the theme] with partials or blocks, you can simply -reference any icon that's [bundled with the theme][icon search] with Jinja's -[`include`][include] function and wrap it with the `.twemoji` CSS class: - -``` html -<span class="twemoji"> - {% include ".icons/fontawesome/brands/twitter.svg" %} <!-- (1)! --> -</span> -``` - -1. Enter a few keywords to find the perfect icon using our [icon search] and - click on the shortcode to copy it to your clipboard: - - <div class="mdx-iconsearch" data-mdx-component="iconsearch"> - <input class="md-input md-input--stretch mdx-iconsearch__input" placeholder="Search icon" data-mdx-component="iconsearch-query" value="brands twitter" /> - <div class="mdx-iconsearch-result" data-mdx-component="iconsearch-result" data-mdx-mode="file"> - <div class="mdx-iconsearch-result__meta"></div> - <ol class="mdx-iconsearch-result__list"></ol> - </div> - </div> - -This is exactly what Material for MkDocs does in its templates. - - [extending the theme]: ../customization.md#extending-the-theme - [include]: https://jinja.palletsprojects.com/en/2.11.x/templates/#include diff --git a/docs/reference/images.md b/docs/reference/images.md deleted file mode 100644 index f120352deee773729a4d41e6fcb02ffbd3c3f36f..0000000000000000000000000000000000000000 --- a/docs/reference/images.md +++ /dev/null @@ -1,178 +0,0 @@ ---- -icon: material/image-frame ---- - -# Images - -While images are first-class citizens of Markdown and part of the core syntax, -it can be difficult to work with them. Material for MkDocs makes working with -images more comfortable, providing styles for image alignment and image -captions. - -## Configuration - -This configuration adds the ability to align images, add captions to images -(rendering them as figures), and mark large images for lazy-loading. Add the -following lines to `mkdocs.yml`: - -``` yaml -markdown_extensions: - - attr_list - - md_in_html -``` - -See additional configuration options: - -- [Attribute Lists] -- [Markdown in HTML] - - [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists - [Markdown in HTML]: ../setup/extensions/python-markdown.md#markdown-in-html - -### Lightbox - -[:octicons-tag-24: 0.1.0][Lightbox support] · -[:octicons-cpu-24: Plugin][glightbox] - -If you want to add image zoom functionality to your documentation, the -[glightbox] plugin is an excellent choice, as it integrates perfectly -with Material for MkDocs. Install it with `pip`: - -``` -pip install mkdocs-glightbox -``` - -Then, add the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - glightbox -``` - -We recommend checking out the available -[configuration options][glightbox options]. - - [Lightbox support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [glightbox]: https://github.com/blueswen/mkdocs-glightbox - [glightbox options]: https://github.com/blueswen/mkdocs-glightbox#usage - -## Usage - -### Image alignment - -When [Attribute Lists] is enabled, images can be aligned by adding the -respective alignment directions via the `align` attribute, i.e. `align=left` or -`align=right`: - -=== "Left" - - ``` markdown title="Image, aligned to left" - { align=left } - ``` - - <div class="result" markdown> - - { align=left width=300 } - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. - - </div> - -=== "Right" - - ``` markdown title="Image, aligned to right" - { align=right } - ``` - - <div class="result" markdown> - - { align=right width=300 } - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod - nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor - massa, nec semper lorem quam in massa. - - </div> - -If there's insufficient space to render the text next to the image, the image -will stretch to the full width of the viewport, e.g. on mobile viewports. - -??? question "Why is there no centered alignment?" - - The [`align`][align] attribute doesn't allow for centered alignment, which - is why this option is not supported by Material for MkDocs.[^1] Instead, - the [image captions] syntax can be used, as captions are optional. - - [^1]: - You might also realize that the [`align`][align] attribute has been - deprecated as of HTML5, so why use it anyways? The main reason is - portability – it's still supported by all browsers and clients, and is very - unlikely to be completely removed, as many older websites still use it. This - ensures a consistent appearance when a Markdown file with these attributes - is viewed outside of a website generated by Material for MkDocs. - - [align]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#deprecated_attributes - [image captions]: #image-captions - -### Image captions - -Sadly, the Markdown syntax doesn't provide native support for image captions, -but it's always possible to use the [Markdown in HTML] extension with literal -`figure` and `figcaption` tags: - -``` html title="Image with caption" -<figure markdown> - { width="300" } - <figcaption>Image caption</figcaption> -</figure> -``` - -<div class="result"> - <figure> - <img src="https://dummyimage.com/600x400/f5f5f5/aaaaaa?text=–%20Image%20–" width="300" /> - <figcaption>Image caption</figcaption> - </figure> -</div> - -### Image lazy-loading - -Modern browsers provide [native support for lazy-loading images][lazy-loading] -through the `loading=lazy` directive, which degrades to eager-loading in -browsers without support: - -``` markdown title="Image, lazy-loaded" -{ loading=lazy } -``` - -<div class="result" markdown> - <img src="https://dummyimage.com/600x400/f5f5f5/aaaaaa?text=–%20Image%20–" width="300" /> -</div> - - [lazy-loading]: https://caniuse.com/#feat=loading-lazy-attr - -### Light and dark mode - -[:octicons-tag-24: 8.1.1][Light and dark mode support] - -If you added a [color palette toggle] and want to show different images for -light and dark color schemes, you can append a `#only-light` or `#only-dark` -hash fragment to the image URL: - -``` markdown title="Image, different for light and dark mode" - - -``` - -<div class="result" markdown> - -![Zelda light world]{ width="300" } -![Zelda dark world]{ width="300" } - -</div> - - [Light and dark mode support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.1.1 - [color palette toggle]: ../setup/changing-the-colors.md#color-palette-toggle - [Zelda light world]: ../assets/images/zelda-light-world.png#only-light - [Zelda dark world]: ../assets/images/zelda-dark-world.png#only-dark diff --git a/docs/reference/index.md b/docs/reference/index.md deleted file mode 100644 index 49a90db22d091f4225e43ef0259f2563a277f08c..0000000000000000000000000000000000000000 --- a/docs/reference/index.md +++ /dev/null @@ -1,291 +0,0 @@ -# Reference - -Material for MkDocs is packed with many great features that make technical -writing a joyful activity. This section of the documentation explains how to set up -a page, and showcases all available specimen that can be used directly from -within Markdown files. - -## Configuration - -### Built-in <u>typeset</u> plugin - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.27.0][Insiders] · -:octicons-cpu-24: Plugin · -:octicons-beaker-24: Experimental - -The built-in typeset plugin __preserves HTML formatting__ in the navigation and -table of contents. This means that now, code blocks, icons, emojis and other -inline formatting will be preserved, which allows for a richer editing -experience. Add the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - typeset -``` - -For a demo, just take a look at the table of contents of this page :material-arrow-right-circle: – code blocks and icons are preserved from the -section headlines; even [highlighting inline code blocks] is supported :tada: - - [highlighting inline code blocks]: code-blocks.md#highlighting-inline-code-blocks - -### Built-in meta plugin - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.21.0][Insiders] · -:octicons-cpu-24: Plugin · -:octicons-beaker-24: Experimental - -The built-in meta plugin allows to __set front matter per folder__, which is -especially handy to ensure that all pages in a folder use specific templates or -tags. Add the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - meta -``` - -> If you need to be able to build your documentation with and without -> [Insiders], please refer to the [built-in plugins] section to learn how -> shared configurations help to achieve this. - -The following configuration options are available: - -[`meta_file`](#+meta.meta_file){ #+meta.meta_file } - -: :octicons-milestone-24: Default: `**/.meta.yml` – This option specifies the - name of the meta files that the plugin should look for. The default setting - assumes that meta files are called `.meta.yml`: - - ``` yaml - plugins: - - meta: - meta_file: '**/.meta.yml' # (1)! - ``` - - 1. Note that it's strongly recommended to prefix meta files with a `.`, - since otherwise they would be included in the build output. - - [built-in blog plugin]: ../setup/setting-up-a-blog.md#built-in-blog-plugin - [built-in plugins]: ../insiders/getting-started.md#built-in-plugins - -## Usage - -### Setting the page `title` - -Each page has a designated title, which is used in the navigation sidebar, for -[social cards] and in other places. While MkDocs attempts to automatically -determine the title of a page in a [four step process], the title can also be -explicitly set with the front matter `title` property: - -``` yaml ---- -title: Lorem ipsum dolor sit amet # (1)! ---- - -# Document title -... -``` - -1. This line sets the [`title`][title] inside the HTML document's - [`head`][head] for the generated page to the given value. Note that the - site title, which is set via [`site_name`][site_name], is appended with a - dash. - - [social cards]: ../setup/setting-up-social-cards.md - [four step process]: https://www.mkdocs.org/user-guide/writing-your-docs/#meta-data - [title]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title - [head]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head - [site_name]: https://www.mkdocs.org/user-guide/configuration/#site_name - -### Setting the page `description` - -A Markdown file can include a description that is added to the `meta` tags of -a page, and is also used for [social cards]. It's a good idea to set a -[`site_description`][site_description] in `mkdocs.yml` as a fallback value if -the author does not explicitly define a description for a Markdown file: - -``` yaml ---- -description: Nullam urna elit, malesuada eget finibus ut, ac tortor. # (1)! ---- - -# Document title -... -``` - -1. This line sets the `meta` tag containing the description inside the - document `head` for the current page to the provided value. - - [site_description]: https://www.mkdocs.org/user-guide/configuration/#site_description - -### Setting the page `icon` - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.5.0][Insiders] · -:octicons-beaker-24: Experimental - -An icon can be assigned to each page, which is then rendered as part of the -navigation sidebar, as well as [navigation tabs], if enabled. Use the front -matter `icon` property to reference an icon, adding the following lines at the -top of a Markdown file: - -``` yaml ---- -icon: material/emoticon-happy # (1)! ---- - -# Document title -... -``` - -1. Enter a few keywords to find the perfect icon using our [icon search] and - click on the shortcode to copy it to your clipboard: - - <div class="mdx-iconsearch" data-mdx-component="iconsearch"> - <input class="md-input md-input--stretch mdx-iconsearch__input" placeholder="Search icon" data-mdx-component="iconsearch-query" value="emoticon happy" /> - <div class="mdx-iconsearch-result" data-mdx-component="iconsearch-result" data-mdx-mode="file"> - <div class="mdx-iconsearch-result__meta"></div> - <ol class="mdx-iconsearch-result__list"></ol> - </div> - </div> - - [Insiders]: ../insiders/index.md - [icon search]: icons-emojis.md#search - [navigation tabs]: ../setup/setting-up-navigation.md#navigation-tabs - -### Setting the page `status` - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.22.0][Insiders] · -:octicons-beaker-24: Experimental - -A status can be assigned to each page, which is then displayed as part of the -navigation sidebar. First, associate a status identifier with a description by -adding the following to `mkdocs.yml`: - -``` yaml -extra: - status: - <identifier>: <description> # (1)! -``` - -1. The identifier can only include alphanumeric characters, as well as dashes - and underscores. For example, if you have a status `Recently added`, you can - set `new` as an identifier: - - ``` yaml - extra: - status: - new: Recently added - ``` - -The page status can now be set with the front matter `status` property. For -example, you can mark a page as `new` with the following lines at the top of a -Markdown file: - -``` yaml ---- -status: new ---- - -# Document title -... -``` - -The following status identifiers are currently supported: - -- :material-alert-decagram: – `new` -- :material-trash-can: – `deprecated` - -### Setting the page `subtitle` - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.25.0][Insiders] · -:octicons-beaker-24: Experimental - -Each page can define a subtitle, which is then rendered below the title as part -of the navigation sidebar by using the front matter `subtitle` property, and -adding the following lines: - -``` yaml ---- -subtitle: Nullam urna elit, malesuada eget finibus ut, ac tortor ---- - -# Document title -... -``` - -### Setting the page `template` - -If you're using [theme extension] and created a new page template in the -`overrides` directory, you can enable it for a specific page. Add the following -lines at the top of a Markdown file: - -``` yaml ---- -template: custom.html ---- - -# Document title -... -``` - -??? question "How to set a page template for an entire folder?" - - With the help of the [built-in meta plugin], you can set a custom template - for an entire section and all nested pages, by creating a `.meta.yml` file - in the corresponding folder with the following content: - - ``` yaml - template: custom.html - ``` - - [theme extension]: ../customization.md#extending-the-theme - [built-in meta plugin]: #built-in-meta-plugin - -## Customization - -### Using metadata in templates - -#### :material-check-all: on all pages - -In order to add custom `meta` tags to your document, you can [extend the theme -][theme extension] and [override the `extrahead` block][overriding blocks], -e.g. to add indexing policies for search engines via the `robots` property: - -``` html -{% extends "base.html" %} - -{% block extrahead %} - <meta property="robots" content="noindex, nofollow" /> -{% endblock %} -``` - - [overriding blocks]: ../customization.md#overriding-blocks - -#### :material-check: on a single page - -If you want to set a `meta` tag on a single page, or want to set different -values for different pages, you can use the `page.meta` object inside your -template override, e.g.: - -``` html -{% extends "base.html" %} - -{% block extrahead %} - {% if page and page.meta and page.meta.robots %} - <meta property="robots" content="{{ page.meta.robots }}" /> - {% else %} - <meta property="robots" content="index, follow" /> - {% endif %} -{% endblock %} -``` - -You can now use `robots` exactly like [`title`][title] and -[`description`][description] to set values. Note that in this case, the -template defines an `else` branch, which would set a default if none was given. - - [title]: #setting-the-page-title - [description]: #setting-the-page-description diff --git a/docs/reference/lists.md b/docs/reference/lists.md deleted file mode 100644 index 5883002a7be0c8b03bdf3e93a90bc6a9730b205c..0000000000000000000000000000000000000000 --- a/docs/reference/lists.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -icon: material/format-list-bulleted ---- - -# Lists - -Material for MkDocs supports several flavors of lists that cater to different -use cases, including _unordered lists_ and _ordered lists_, which are supported -through standard Markdown, as well as _definition lists_ and _task lists_, which -are supported through extensions. - -## Configuration - -This configuration enables the use of definition lists and tasks lists, which -are both not part of the standard Markdown syntax. Add the following lines to -`mkdocs.yml`: - -``` yaml -markdown_extensions: - - def_list - - pymdownx.tasklist: - custom_checkbox: true -``` - -See additional configuration options: - -- [Definition Lists] -- [Tasklist] - - [Definition Lists]: ../setup/extensions/python-markdown.md#definition-lists - [Tasklist]: ../setup/extensions/python-markdown-extensions.md#tasklist - -## Usage - -### Using unordered lists - -Unordered lists can be written by prefixing a line with a `-`, `*` or `+` list -marker, all of which can be used interchangeably. Furthermore, all flavors -of lists can be nested inside each other: - -``` markdown title="List, unordered" -- Nulla et rhoncus turpis. Mauris ultricies elementum leo. Duis efficitur - accumsan nibh eu mattis. Vivamus tempus velit eros, porttitor placerat nibh - lacinia sed. Aenean in finibus diam. - - * Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis. - * Nam vulputate tincidunt fringilla. - * Nullam dignissim ultrices urna non auctor. -``` - -<div class="result" markdown> - -- Nulla et rhoncus turpis. Mauris ultricies elementum leo. Duis efficitur - accumsan nibh eu mattis. Vivamus tempus velit eros, porttitor placerat nibh - lacinia sed. Aenean in finibus diam. - - * Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis. - * Nam vulputate tincidunt fringilla. - * Nullam dignissim ultrices urna non auctor. - -</div> - -### Using ordered lists - -Ordered lists must start with a number immediately followed by a dot. The -numbers do not need to be consecutive and can be all set to `1.`, as they will -be re-numbered when rendered: - -``` markdown title="List, ordered" -1. Vivamus id mi enim. Integer id turpis sapien. Ut condimentum lobortis - sagittis. Aliquam purus tellus, faucibus eget urna at, iaculis venenatis - nulla. Vivamus a pharetra leo. - - 1. Vivamus venenatis porttitor tortor sit amet rutrum. Pellentesque aliquet - quam enim, eu volutpat urna rutrum a. Nam vehicula nunc mauris, a - ultricies libero efficitur sed. - - 2. Morbi eget dapibus felis. Vivamus venenatis porttitor tortor sit amet - rutrum. Pellentesque aliquet quam enim, eu volutpat urna rutrum a. - - 1. Mauris dictum mi lacus - 2. Ut sit amet placerat ante - 3. Suspendisse ac eros arcu -``` - -<div class="result" markdown> - -1. Vivamus id mi enim. Integer id turpis sapien. Ut condimentum lobortis - sagittis. Aliquam purus tellus, faucibus eget urna at, iaculis venenatis - nulla. Vivamus a pharetra leo. - - 1. Vivamus venenatis porttitor tortor sit amet rutrum. Pellentesque aliquet - quam enim, eu volutpat urna rutrum a. Nam vehicula nunc mauris, a - ultricies libero efficitur sed. - - 2. Morbi eget dapibus felis. Vivamus venenatis porttitor tortor sit amet - rutrum. Pellentesque aliquet quam enim, eu volutpat urna rutrum a. - - 1. Mauris dictum mi lacus - 2. Ut sit amet placerat ante - 3. Suspendisse ac eros arcu - -</div> - -### Using definition lists - -When [Definition Lists] is enabled, lists of arbitrary key-value pairs, e.g. the -parameters of functions or modules, can be enumerated with a simple syntax: - -``` markdown title="Definition list" -`Lorem ipsum dolor sit amet` - -: Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus - tellus non sem sollicitudin, quis rutrum leo facilisis. - -`Cras arcu libero` - -: Aliquam metus eros, pretium sed nulla venenatis, faucibus auctor ex. Proin - ut eros sed sapien ullamcorper consequat. Nunc ligula ante. - - Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis. - Nam vulputate tincidunt fringilla. - Nullam dignissim ultrices urna non auctor. -``` - -<div class="result" markdown> - -`Lorem ipsum dolor sit amet` - -: Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus - tellus non sem sollicitudin, quis rutrum leo facilisis. - -`Cras arcu libero` - -: Aliquam metus eros, pretium sed nulla venenatis, faucibus auctor ex. Proin - ut eros sed sapien ullamcorper consequat. Nunc ligula ante. - - Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis. - Nam vulputate tincidunt fringilla. - Nullam dignissim ultrices urna non auctor. - -</div> - -### Using task lists - -When [Tasklist] is enabled, unordered list items can be prefixed with `[ ]` to -render an unchecked checkbox or `[x]` to render a checked checkbox, allowing -for the definition of task lists: - -``` markdown title="Task list" -- [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit -- [ ] Vestibulum convallis sit amet nisi a tincidunt - * [x] In hac habitasse platea dictumst - * [x] In scelerisque nibh non dolor mollis congue sed et metus - * [ ] Praesent sed risus massa -- [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque -``` - -<div class="result" markdown> - -- [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit -- [ ] Vestibulum convallis sit amet nisi a tincidunt - * [x] In hac habitasse platea dictumst - * [x] In scelerisque nibh non dolor mollis congue sed et metus - * [ ] Praesent sed risus massa -- [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque - -</div> diff --git a/docs/reference/mathjax.md b/docs/reference/mathjax.md deleted file mode 100644 index f4107440216709c4119537a10a5581e229ae2dda..0000000000000000000000000000000000000000 --- a/docs/reference/mathjax.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -icon: material/alphabet-greek ---- - -# MathJax - -[MathJax] is a beautiful and accessible way to display mathematical content -in the browser, adds support for mathematical typesetting in different notations -(e.g. [LaTeX], [MathML], [AsciiMath]), and can be easily integrated with -Material for MkDocs. - - [MathJax]: https://www.mathjax.org/ - [LaTeX]: https://en.wikibooks.org/wiki/LaTeX/Mathematics - [MathML]: https://en.wikipedia.org/wiki/MathML - [AsciiMath]: http://asciimath.org/ - -## Configuration - -This configuration enables support for rendering block and inline block -equations through [MathJax]. Create a configuration file and add the following -lines to `mkdocs.yml`: - -=== ":octicons-file-code-16: `docs/javascripts/mathjax.js`" - - ``` js - window.MathJax = { - tex: { - inlineMath: [["\\(", "\\)"]], - displayMath: [["\\[", "\\]"]], - processEscapes: true, - processEnvironments: true - }, - options: { - ignoreHtmlClass: ".*|", - processHtmlClass: "arithmatex" - } - }; - - document$.subscribe(() => { // (1)! - MathJax.typesetPromise() - }) - ``` - - 1. This integrates MathJax with [instant loading]. - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - markdown_extensions: - - pymdownx.arithmatex: - generic: true - - extra_javascript: - - javascripts/mathjax.js - - https://polyfill.io/v3/polyfill.min.js?features=es6 - - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js - ``` - -See additional configuration options: - -- [Arithmatex] - - [Arithmatex]: ../setup/extensions/python-markdown-extensions.md#arithmatex - [instant loading]: ../setup/setting-up-navigation.md#instant-loading - -<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> -<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> -<script> - window.MathJax = { - tex: { - inlineMath: [["\\(", "\\)"]], - displayMath: [["\\[", "\\]"]], - processEscapes: true, - processEnvironments: true - }, - options: { - ignoreHtmlClass: ".*|", - processHtmlClass: "arithmatex" - } - }; -</script> - -## Usage - -### Using block syntax - -Blocks must be enclosed in `#!latex $$...$$` or `#!latex \[...\]` on separate -lines: - -``` latex title="MathJax, block syntax" -$$ -\operatorname{ker} f=\{g\in G:f(g)=e_{H}\}{\mbox{.}} -$$ -``` - -<div class="result" markdown> - -$$ -\operatorname{ker} f=\{g\in G:f(g)=e_{H}\}{\mbox{.}} -$$ - -</div> - -### Using inline block syntax - -Inline blocks must be enclosed in `#!latex $...$` or `#!latex \(...\)`: - -``` latex title="MathJax, inline syntax" -The homomorphism $f$ is injective if and only if its kernel is only the -singleton set $e_G$, because otherwise $\exists a,b\in G$ with $a\neq b$ such -that $f(a)=f(b)$. -``` - -<div class="result" markdown> - -The homomorphism $f$ is injective if and only if its kernel is only the -singleton set $e_G$, because otherwise $\exists a,b\in G$ with $a\neq b$ such -that $f(a)=f(b)$. - -</div> diff --git a/docs/reference/tooltips.md b/docs/reference/tooltips.md deleted file mode 100644 index de9c4a7d8f87f8089c7627bf7d4bae0838e6d0a5..0000000000000000000000000000000000000000 --- a/docs/reference/tooltips.md +++ /dev/null @@ -1,160 +0,0 @@ ---- -icon: material/tooltip-plus -status: new ---- - -# Tooltips - -Technical documentation often incurs the usage of many acronyms, which may -need additional explanation, especially for new user of your project. For these -matters, Material for MkDocs uses a combination of Markdown extensions to -enable site-wide glossaries. - -## Configuration - -This configuration enables abbreviations and allows to build a simple -project-wide glossary, sourcing definitions from a central location. Add the -following line to `mkdocs.yml`: - -``` yaml -markdown_extensions: - - abbr - - attr_list - - pymdownx.snippets -``` - -See additional configuration options: - -- [Abbreviations] -- [Attribute Lists] -- [Snippets] - - [Abbreviations]: ../setup/extensions/python-markdown.md#abbreviations - [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists - [Snippets]: ../setup/extensions/python-markdown-extensions.md#snippets - -### Improved tooltips - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.15.0][Insiders] · -:octicons-beaker-24: Experimental - -When improved tooltips are enabled, Material for MkDocs replaces the browser's -rendering logic for `title` attribute with beautiful little tooltips. -Add the following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - content.tooltips -``` - -Now, tooltips will be rendered for the following elements: - -- __Content__ – elements with a `title`, permalinks and code copy button -- __Header__ – home button, header title, color palette switch and repository link -- __Navigation__ – links that are shortened with ellipsis, i.e. `...` - -[Insiders]: ../insiders/index.md - -## Usage - -### Adding tooltips - -The [Markdown syntax] allows to specify a `title` for each link, which will -render as a beautiful tooltip when [improved tooltips] are enabled. Add a -tooltip to a link with the following lines: - -``` markdown title="Link with tooltip, inline syntax" -[Hover me](https://example.com "I'm a tooltip!") -``` - -<div class="result" markdown> - -[Hover me](https://example.com "I'm a tooltip!") - -</div> - -Tooltips can also be added to link references: - -``` markdown title="Link with tooltip, reference syntax" -[Hover me][example] - - [example]: https://example.com "I'm a tooltip!" -``` - -<div class="result" markdown> - -[Hover me](https://example.com "I'm a tooltip!") - -</div> - -For all other elements, a `title` can be added by using the [Attribute Lists] -extension: - -``` markdown title="Icon with tooltip" -:material-information-outline:{ title="Important information" } -``` - -<div class="result" markdown> - -:material-information-outline:{ title="Important information" } - -</div> - - [Markdown syntax]: https://daringfireball.net/projects/markdown/syntax#link - [improved tooltips]: #improved-tooltips - -### Adding abbreviations - -Abbreviations can be defined by using a special syntax similar to URLs and -[footnotes], starting with a `*` and immediately followed by the term or -acronym to be associated in square brackets: - -``` markdown title="Text with abbreviations" -The HTML specification is maintained by the W3C. - -*[HTML]: Hyper Text Markup Language -*[W3C]: World Wide Web Consortium -``` - -<div class="result" markdown> - -The HTML specification is maintained by the W3C. - -*[HTML]: Hyper Text Markup Language -*[W3C]: World Wide Web Consortium - -</div> - - [footnotes]: footnotes.md - -### Adding a glossary - -The [Snippets] extension can be used to implement a simple glossary by moving -all abbreviations in a dedicated file[^1], and [auto-append] this file to all -pages with the following configuration: - - [^1]: - It's highly recommended to put the Markdown file containing the - abbreviations outside of the `docs` folder (here, a folder with the name - `includes` is used), as MkDocs might otherwise complain about an - unreferenced file. - -=== ":octicons-file-code-16: `includes/abbreviations.md`" - - ```` markdown - *[HTML]: Hyper Text Markup Language - *[W3C]: World Wide Web Consortium - ```` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ```` yaml - markdown_extensions: - - pymdownx.snippets: - auto_append: - - includes/abbreviations.md - ```` - - [auto-append]: https://facelessuser.github.io/pymdown-extensions/extensions/snippets/#auto-append-snippets diff --git a/docs/setup/adding-a-comment-system.md b/docs/setup/adding-a-comment-system.md deleted file mode 100644 index 9fad62546d725d2525abc24899bc3da46130d1fd..0000000000000000000000000000000000000000 --- a/docs/setup/adding-a-comment-system.md +++ /dev/null @@ -1,107 +0,0 @@ -# Adding a comment system - -Material for MkDocs allows to easily add the third-party comment system of your -choice to the footer of any page by using [theme extension]. As an example, -we'll be integrating [Giscus], which is Open Source, free, and uses GitHub -discussions as a backend. - - [Giscus]: https://giscus.app/ - -## Customization - -### Giscus integration - -Before you can use [Giscus], you need to complete the following steps: - -1. __Install the [Giscus GitHub App]__ and grant access to the repository - that should host comments as GitHub discussions. Note that this can be a - repository different from your documentation. -2. __Visit [Giscus] and generate the snippet__ through their configuration tool - to load the comment system. Copy the snippet for the next step. The - resulting snippet should look similar to this: - - ``` html - <script - src="https://giscus.app/client.js" - data-repo="<username>/<repository>" - data-repo-id="..." - data-category="..." - data-category-id="..." - data-mapping="pathname" - data-reactions-enabled="1" - data-emit-metadata="1" - data-theme="light" - data-lang="en" - crossorigin="anonymous" - async - > - </script> - ``` - -The [`comments.html`][comments] partial (empty by default) is the best place to -add the snippet generated by [Giscus]. Follow the guide on [theme extension] -and [override the `comments.html` partial][overriding partials] with: - -``` html hl_lines="3" -{% if page.meta.comments %} - <h2 id="__comments">{{ lang.t("meta.comments") }}</h2> - <!-- Insert generated snippet here --> - - <!-- Synchronize Giscus theme with palette --> - <script> - var giscus = document.querySelector("script[src*=giscus]") - - /* Set palette on initial load */ - var palette = __md_get("__palette") - if (palette && typeof palette.color === "object") { - var theme = palette.color.scheme === "slate" ? "dark" : "light" - giscus.setAttribute("data-theme", theme) // (1)! - } - - /* Register event handlers after documented loaded */ - document.addEventListener("DOMContentLoaded", function() { - var ref = document.querySelector("[data-md-component=palette]") - ref.addEventListener("change", function() { - var palette = __md_get("__palette") - if (palette && typeof palette.color === "object") { - var theme = palette.color.scheme === "slate" ? "dark" : "light" - - /* Instruct Giscus to change theme */ - var frame = document.querySelector(".giscus-frame") - frame.contentWindow.postMessage( - { giscus: { setConfig: { theme } } }, - "https://giscus.app" - ) - } - }) - }) - </script> -{% endif %} -``` - -1. This code block ensures that [Giscus] renders with a dark theme when the - palette is set to `slate`. Note that multiple dark themes are available, - so you can change it to your liking. - -Replace the highlighted line with the snippet you generated with the [Giscus] -configuration tool in the previous step. If you copied the snippet from above, -you can enable comments on a page by setting the `comments` front matter -property to `true`: - -``` yaml ---- -comments: true ---- - -# Document title -... -``` - -If you wish to enable comments for an entire folder, you can use the -[built-in meta plugin]. - - [Giscus GitHub App]: https://github.com/apps/giscus - [theme extension]: ../customization.md#extending-the-theme - [comments]: https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/comments.html - [overriding partials]: ../customization.md#overriding-partials - [built-in meta plugin]: ../reference/index.md#built-in-meta-plugin diff --git a/docs/setup/adding-a-git-repository.md b/docs/setup/adding-a-git-repository.md deleted file mode 100644 index a618ddf9c0a910447844f4aa911c69de28f4f08d..0000000000000000000000000000000000000000 --- a/docs/setup/adding-a-git-repository.md +++ /dev/null @@ -1,339 +0,0 @@ -# Adding a git repository - -If your documentation is related to source code, Material for MkDocs provides -the ability to display information to the project's repository as part of the -static site, including stars and forks. Furthermore, the -[date of last update and creation], as well as [contributors] can be shown. - -## Configuration - -### Repository - -[:octicons-tag-24: 0.1.0][Repository support] · -:octicons-milestone-24: Default: _none_ - -In order to display a link to the repository of your project as part of your -documentation, set [`repo_url`][repo_url] in `mkdocs.yml` to the public URL of -your repository, e.g.: - -``` yaml -repo_url: https://github.com/squidfunk/mkdocs-material -``` - -The link to the repository will be rendered next to the search bar on big -screens and as part of the main navigation drawer on smaller screen sizes. -Additionally, for public repositories hosted on [GitHub] or [GitLab], the -number of stars and forks is automatically requested and rendered. - -GitHub repositories also include the tag of the latest release.[^1] - - [^1]: - Unfortunately, GitHub only provides an API endpoint to obtain the [latest - release] - not the latest tag. Thus, make sure to [create a release] (not - pre-release) for the latest tag you want to display next to the number of - stars and forks. - - [Repository support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [repo_url]: https://www.mkdocs.org/user-guide/configuration/#repo_url - [latest release]: https://docs.github.com/en/rest/reference/releases#get-the-latest-release - [create a release]: https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release - -#### Repository name - -[:octicons-tag-24: 0.1.0][Repository name support] · -:octicons-milestone-24: Default: _automatically set to_ `GitHub`, `GitLab` _or_ -`Bitbucket` - -MkDocs will infer the source provider by examining the URL and try to set the -_repository name_ automatically. If you wish to customize the name, set -[`repo_name`][repo_name] in `mkdocs.yml`: - -``` yaml -repo_name: squidfunk/mkdocs-material -``` - - [Repository name support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [repo_name]: https://www.mkdocs.org/user-guide/configuration/#repo_name - -#### Repository icon - -[:octicons-tag-24: 5.0.0][Repository icon support] · -:octicons-milestone-24: Default: -:fontawesome-brands-git-alt: – `fontawesome/brands/git-alt` - -While the default repository icon is a generic git icon, it can be set to -any icon bundled with the theme by referencing a valid icon path in -`mkdocs.yml`: - -``` yaml -theme: - icon: - repo: fontawesome/brands/git-alt # (1)! -``` - -1. Enter a few keywords to find the perfect icon using our [icon search] and - click on the shortcode to copy it to your clipboard: - - <div class="mdx-iconsearch" data-mdx-component="iconsearch"> - <input class="md-input md-input--stretch mdx-iconsearch__input" placeholder="Search icon" data-mdx-component="iconsearch-query" value="git" /> - <div class="mdx-iconsearch-result" data-mdx-component="iconsearch-result" data-mdx-mode="file"> - <div class="mdx-iconsearch-result__meta"></div> - <ol class="mdx-iconsearch-result__list"></ol> - </div> - </div> - -Some popular choices: - -- :fontawesome-brands-git: – `fontawesome/brands/git` -- :fontawesome-brands-git-alt: – `fontawesome/brands/git-alt` -- :fontawesome-brands-github: – `fontawesome/brands/github` -- :fontawesome-brands-github-alt: – `fontawesome/brands/github-alt` -- :fontawesome-brands-gitlab: – `fontawesome/brands/gitlab` -- :fontawesome-brands-gitkraken: – `fontawesome/brands/gitkraken` -- :fontawesome-brands-bitbucket: – `fontawesome/brands/bitbucket` -- :fontawesome-solid-trash: – `fontawesome/solid/trash` - - [Repository icon support]: https://github.com/squidfunk/mkdocs-material/releases/tag/5.0.0 - [Repository icon default]: https://github.com/squidfunk/mkdocs-material/blob/master/material/.icons/fontawesome/brands/git-alt.svg - [icon search]: ../reference/icons-emojis.md#search - -#### Code actions - -[:octicons-tag-24: 9.0.0][Code actions support] · -:octicons-unlock-24: Feature flag - -If the [repository URL] points to a [GitHub], [GitLab] or [Bitbucket] repository, -buttons for code actions can be added at the top of each document. Currently, -two types of code actions are supported: `edit` and `view` (GitHub only). Add -the following lines to `mkdocs.yml`: - -=== ":material-pencil: Edit this page" - - ``` yaml - theme: - features: - - content.action.edit - ``` - -=== ":material-eye: View source of this page" - - ``` yaml - theme: - features: - - content.action.view - ``` - -The icon of the edit and view buttons can be changed with the following lines: - -``` yaml -theme: - icon: - edit: material/pencil # (1)! - view: material/eye -``` - -1. Enter a few keywords to find the perfect icon using our [icon search] and - click on the shortcode to copy it to your clipboard: - - <div class="mdx-iconsearch" data-mdx-component="iconsearch"> - <input class="md-input md-input--stretch mdx-iconsearch__input" placeholder="Search icon" data-mdx-component="iconsearch-query" value="material pencil" /> - <div class="mdx-iconsearch-result" data-mdx-component="iconsearch-result" data-mdx-mode="file"> - <div class="mdx-iconsearch-result__meta"></div> - <ol class="mdx-iconsearch-result__list"></ol> - </div> - </div> - - [Code actions support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.0.0 - [repository URL]: #repository - [edit_uri]: https://www.mkdocs.org/user-guide/configuration/#edit_uri - [GitHub]: https://github.com/ - [GitLab]: https://about.gitlab.com/ - [Bitbucket]: https://bitbucket.org/ - -### Revisioning - -The following plugins are fully integrated with Material for MkDocs, allowing -for showing the [date of last update and creation] of a document, as well as -links to all [contributors] or [authors] involved. - - [date of last update and creation]: #document-dates - [contributors]: #document-contributors - [authors]: #document-authors - -#### Document dates - -[:octicons-tag-24: 4.6.0][Document dates support] · -[:octicons-cpu-24: Plugin][git-revision-date-localized] - -The [git-revision-date-localized] plugin adds support for adding the date of -last update and creation of a document at the bottom of each page. Install it -with `pip`: - -``` -pip install mkdocs-git-revision-date-localized-plugin -``` - -Then, add the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - git-revision-date-localized: - enable_creation_date: true -``` - -The following configuration options are supported: - -[`enabled`](#+git-revision-date-localized.enabled){ #+git-revision-date-localized.enabled } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - the plugin is enabled when building your project. If you want to switch - the plugin off, e.g. for local builds, use an [environment variable]: - - ``` yaml - plugins: - - git-revision-date-localized: - enabled: !ENV [CI, false] - ``` - -[`type`](#+git-revision-date-localized.type){ #+git-revision-date-localized.type } - -: :octicons-milestone-24: Default: `date` – The format of the date to be - displayed. Valid values are `date`, `datetime`, `iso_date`, `iso_datetime` - and `timeago`: - - ``` yaml - plugins: - - git-revision-date-localized: - type: date - ``` - -[`enable_creation_date`](#+git-revision-date-localized.enable_creation_date){ #+git-revision-date-localized.enable_creation_date } - -: :octicons-milestone-24: Default: `false` – Enables the display of the - creation date of the file associated with the page next to the last updated - date at the bottom of the page: - - ``` yaml - plugins: - - git-revision-date-localized: - enable_creation_date: true - ``` - -[`fallback_to_build_date`](#+git-revision-date-localized.fallback_to_build_date){ #+git-revision-date-localized.fallback_to_build_date } - -: :octicons-milestone-24: Default: `false` – Enables falling back to - the time when `mkdocs build` was executed. Can be used as a fallback when - the build is performed outside of a git repository: - - ``` yaml - plugins: - - git-revision-date-localized: - fallback_to_build_date: true - ``` - -The other configuration options of this extension are not officially supported -by Material for MkDocs, which is why they may yield unexpected results. Use -them at your own risk. - - [Document dates support]: https://github.com/squidfunk/mkdocs-material/releases/tag/4.6.0 - [git-revision-date-localized]: https://github.com/timvink/mkdocs-git-revision-date-localized-plugin - -#### Document contributors - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.19.0][Insiders] · -[:octicons-cpu-24: Plugin][git-committers] · -:octicons-beaker-24: Experimental - -The [git-committers][^2] plugin renders the GitHub avatars of all contributors, -linking to their GitHub profiles at the bottom of each page. As always, it can -be installed with `pip`: - - [^2]: - We currently recommend using a fork of the [git-committers] plugin, as it - contains many improvements that have not yet been merged back into the - original plugin. See byrnereese/mkdocs-git-committers-plugin#12 for more - information. - -``` -pip install mkdocs-git-committers-plugin-2 -``` - -Then, add the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - git-committers: - repository: squidfunk/mkdocs-material - branch: main -``` - -The following configuration options are supported: - -[`enabled`](#+git-committers.enabled){ #+git-committers.enabled } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - the plugin is enabled when building your project. If you want to switch - the plugin off, e.g. for local builds, use an [environment variable]: - - ``` yaml - plugins: - - git-committers: - enabled: !ENV [CI, false] - ``` - -[`repository`](#+git-committers.repository){ #+git-committers.repository } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property must be set to the slug of the repository that contains your - documentation. The slug must follow the pattern `<username>/<repository>`: - - ``` yaml - plugins: - - git-committers: - repository: squidfunk/mkdocs-material - ``` - -[`branch`](#+git-committers.branch){ #+git-committers.branch } - -: :octicons-milestone-24: Default: `master` – This property should be set to - the branch of the repository from which to retrieve the contributors. To use the `main` branch: - - ``` yaml - plugins: - - git-committers: - branch: main - ``` - -The other configuration options of this extension are not officially supported -by Material for MkDocs, which is why they may yield unexpected results. Use -them at your own risk. - - [Insiders]: ../insiders/index.md - [git-committers]: https://github.com/ojacques/mkdocs-git-committers-plugin-2 - [environment variable]: https://www.mkdocs.org/user-guide/configuration/#environment-variables - [rate limits]: https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting - -#### Document authors - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.19.0][Insiders] · -[:octicons-cpu-24: Plugin][git-authors] · -:octicons-beaker-24: Experimental - -The [git-authors] plugin extracts the authors of a document from git to display -them at the bottom of each page. It's a lightweight alternative to the -[git-committers] plugin. Install it with `pip`: - -``` -pip install mkdocs-git-authors-plugin -``` - -Then, add the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - git-authors -``` - - [git-authors]: https://github.com/timvink/mkdocs-git-authors-plugin/ diff --git a/docs/setup/building-an-optimized-site.md b/docs/setup/building-an-optimized-site.md deleted file mode 100644 index 1110dfc98cbeb4bd57df27ee8ab7036c0d7c7608..0000000000000000000000000000000000000000 --- a/docs/setup/building-an-optimized-site.md +++ /dev/null @@ -1,205 +0,0 @@ ---- -status: new ---- - -# Building an optimized site - -Material for MkDocs, by default, allows to build optimized sites that rank great -on search engines, load fast (even on slow networks), and work perfectly without -JavaScript. Additionally, the [built-in optimize plugin] adds support for -further useful automatic optimization techniques. - - [built-in optimize plugin]: #built-in-optimize-plugin - -## Configuration - -### Built-in optimize plugin :material-alert-decagram:{ .mdx-pulse title="Added on January 21, 2023" } - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.29.0][Insiders] · -:octicons-cpu-24: Plugin · -:octicons-beaker-24: Experimental - -The built-in optimize plugin automatically identifies and optimizes all media -files as part of the build using compression and conversion techniques. Add -the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - optimize # (1)! -``` - -1. Please ensure that all [dependencies for image processing] are installed, - or the plugin will not work properly. - -> If you need to be able to build your documentation with and without -> [Insiders], please refer to the [built-in plugins] section to learn how -> shared configurations help to achieve this. - -The following configuration options are available: - -[`enabled`](#+optimize.enabled){ #+optimize.enabled } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - the plugin is enabled when building your project. If you want to speed up - local builds, you can use an [environment variable]: - - ``` yaml - plugins: - - optimize: - enabled: !ENV [CI, false] - ``` - -[`concurrency`](#+optimize.concurrency){ #+optimize.concurrency } - -: :octicons-milestone-24: Default: _number of CPUs_ – This option specifies - how many CPUs the plugin is allowed to use when optimizing media files. - With more CPUs, the plugin can do more work in the same time, thus complete - optimization faster. Concurrent processing can be disabled with: - - ``` yaml - plugins: - - optimize: - concurrency: 1 - ``` - -#### Optimization - -Technical documentation often includes screenshots or diagrams, both of which -are prime candidates for compression. The [built-in optimize plugin] allows to -automatically compress images using [pngquant] (for PNGs), and [Pillow] -(for JPGs). - -The following configuration options are available for optimization: - -[`optimize_png`](#+optimize.optimize_png){ #+optimize.optimize_png } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - the plugin should optimize PNG files using [pngquant], which must be - installed on the system. PNG optimization can be disabled with: - - ``` yaml - plugins: - - optimize: - optimize_png: false - ``` - -[`optimize_png_speed`](#+optimize.optimize_png_speed){ #+optimize.optimize_png_speed } - -: :octicons-milestone-24: Default: `4` of `[1,10]` – This option specifies the - speed/quality tradeoff that [pngquant] applies when compressing. The lower - the number, the more time will be spent optimizing: - - === "Slower <small>small</small>" - - ``` yaml - plugins: - - optimize: - optimize_png_speed: 1 - ``` - - === "Faster <small>rough</small>" - - ``` yaml - plugins: - - optimize: - optimize_png_speed: 10 - ``` - - A factor of `10` has 5% lower quality, but is 8x faster than the default `4`. - -[`optimize_png_strip`](#+optimize.optimize_png_strip){ #+optimize.optimize_png_strip } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - [pngquant] should remove all non-optional metadata that is not necessary - for rendering images in a browser: - - ``` yaml - plugins: - - optimize: - optimize_png_strip: false - ``` - -[`optimize_jpg`](#+optimize.optimize_jpg){ #+optimize.optimize_jpg } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - the plugin should optimize JPG files using [Pillow], a Python image - processing library. JPG optimization can be disabled with: - - ``` yaml - plugins: - - optimize: - optimize_jpg: false - ``` - -[`optimize_jpg_quality`](#+optimize.optimize_jpg_quality){ #+optimize.optimize_jpg_quality } - -: :octicons-milestone-24: Default: `60` of `[0,100]` – This option specifies - the image quality that [Pillow] uses when compressing. If the images look - blurry, it's a good idea to tune and change this setting: - - ``` yaml - plugins: - - optimize: - optimize_jpg_quality: 75 - ``` - -[`optimize_jpg_progressive`](#+optimize.optimize_jpg_progressive){ #+optimize.optimize_jpg_progressive } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - [Pillow] should use [progressive encoding] (faster rendering) when - compressing JPGs. Progressive encoding can be disabled with: - - ``` yaml - plugins: - - optimize: - optimize_jpg_progressive: false - ``` - - [Insiders]: ../insiders/index.md - [built-in plugins]: ../insiders/getting-started.md#built-in-plugins - [dependencies for image processing]: dependencies/image-processing.md - [environment variable]: https://www.mkdocs.org/user-guide/configuration/#environment-variables - [pngquant]: https://pngquant.org/ - [Pillow]: https://pillow.readthedocs.io/ - [progressive encoding]: https://medium.com/hd-pro/jpeg-formats-progressive-vs-baseline-73b3938c2339 - -#### Caching - -The [built-in optimize plugin] implements an intelligent caching mechanism, -ensuring that media files are only pushed through the optimization pipeline when -their contents change. If you swap out or update an image, the plugin will -detect it and update the optimized version. - -The following configuration options are available for caching: - -[`cache`](#+optimize.cache){ #+optimize.cache } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - the plugin queries its cache for an existing artifact before starting an - optimization job. It's normally not necessary to change this setting, - except for when debugging the plugin itself. Caching can be disabled with: - - ``` yaml - plugins: - - optimize: - cache: false - ``` - -[`cache_dir`](#+optimize.cache_dir){ #+optimize.cache_dir } - -: :octicons-milestone-24: Default: `.cache/plugins/optimize` – This option - specifies the file system location of the plugin's cache. It's normally not - necessary to change this setting, except for when debugging the plugin - itself. The cache directory can be changed with: - - ``` yaml - plugins: - - optimize: - cache_dir: path/to/folder - ``` - - By default, all built-in plugins that implement caching will create a - `.cache` directory in the same folder your `mkdocs.yml` resides, and create - subfolders to not interfere with each other. If you use multiple instances - of this plugin, it could be necessary to change this setting. diff --git a/docs/setup/building-for-offline-usage.md b/docs/setup/building-for-offline-usage.md deleted file mode 100644 index 1af2e375a9d5eb1ba016b01f397e8b0439d0dab3..0000000000000000000000000000000000000000 --- a/docs/setup/building-for-offline-usage.md +++ /dev/null @@ -1,75 +0,0 @@ -# Building for offline usage - -If you want to ship your documentation together with your product, MkDocs has -you covered – with support from themes, [MkDocs] allows for building -offline-capable documentation. Notably, Material for MkDocs offers offline -support for many of its features. - - [MkDocs]: https://www.mkdocs.org - -## Configuration - -### Built-in offline plugin - -[:octicons-tag-24: 9.0.0][offline support] · -:octicons-cpu-24: Plugin - -The built-in offline plugin makes sure that the [site search] works when you -distribute the contents of your [site directory] as a download. Simply add -the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - offline -``` - -The plugin will automatically disable the [`use_directory_urls`][use_directory_urls] -setting, ensuring that users can open your documentation directly from the local -file system. - -The following configuration options are available: - -[`enabled`](#+offline.enabled){ #+offline.enabled } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - the plugin is enabled when building your project. If you want to switch - the plugin off, e.g. for local builds, use an [environment variable]: - - ``` yaml - plugins: - - offline: - enabled: !ENV [OFFLINE, false] - ``` - -Now, after invoking `mkdocs build`, you can open `site/index.html` directly -in your browser and the [site search] will work as if the documentation was -hosted on a regular server. - -!!! tip "Automatically bundle all external assets" - - The [built-in privacy plugin] makes it easy to use external assets - while building documentation for offline usage, as it will automatically - download all external assets to distribute them with your documentation. - - [offline support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.0.0 - [site search]: setting-up-site-search.md - [site directory]: https://www.mkdocs.org/user-guide/configuration/#site_dir - [use_directory_urls]: https://www.mkdocs.org/user-guide/configuration/#use_directory_urls - [environment variable]: https://www.mkdocs.org/user-guide/configuration/#environment-variables - [built-in privacy plugin]: ensuring-data-privacy.md#built-in-privacy-plugin - -#### Limitations - -Material for MkDocs offers many interactive features, some of which will not -work from the file system due to the restrictions of modern browsers: all -features that use the `fetch` API will error. - -Thus, when building for offline usage, make sure to disable the following -configuration settings: [instant loading], [site analytics], [git repository], -[versioning] and [comment systems]. - - [Instant loading]: setting-up-navigation.md#instant-loading - [Site analytics]: setting-up-site-analytics.md - [Versioning]: setting-up-versioning.md - [Git repository]: adding-a-git-repository.md - [Comment systems]: adding-a-comment-system.md diff --git a/docs/setup/changing-the-colors.md b/docs/setup/changing-the-colors.md deleted file mode 100644 index 7c83e5fc95d0861062151a7dd05c1a82c487c765..0000000000000000000000000000000000000000 --- a/docs/setup/changing-the-colors.md +++ /dev/null @@ -1,389 +0,0 @@ -# Changing the colors - -As any proper Material Design implementation, Material for MkDocs supports -Google's original [color palette], which can be easily configured through -`mkdocs.yml`. Furthermore, colors can be customized with a few lines of CSS to -fit your brand's identity by using [CSS variables][custom colors]. - - [color palette]: http://www.materialui.co/colors - [custom colors]: #custom-colors - -## Configuration - -### Color palette - -#### Color scheme - -[:octicons-tag-24: 5.2.0][Color scheme support] · -:octicons-milestone-24: Default: `default` - -Material for MkDocs supports two color schemes: a __light mode__, which is just -called `default`, and a __dark mode__, which is called `slate`. The color scheme -can be set via `mkdocs.yml`: - -``` yaml -theme: - palette: - scheme: default -``` - -Click on a tile to change the color scheme: - -<div class="mdx-switch"> - <button data-md-color-scheme="default"><code>default</code></button> - <button data-md-color-scheme="slate"><code>slate</code></button> -</div> - -<script> - var buttons = document.querySelectorAll("button[data-md-color-scheme]") - buttons.forEach(function(button) { - button.addEventListener("click", function() { - var attr = this.getAttribute("data-md-color-scheme") - document.body.setAttribute("data-md-color-scheme", attr) - var name = document.querySelector("#__code_1 code span.l") - name.textContent = attr - }) - }) -</script> - - [Color scheme support]: https://github.com/squidfunk/mkdocs-material/releases/tag/5.2.0 - -#### Primary color - -[:octicons-tag-24: 0.2.0][Primary color support] · -:octicons-milestone-24: Default: `indigo` - -The primary color is used for the header, the sidebar, text links and several -other components. In order to change the primary color, set the following value -in `mkdocs.yml` to a valid color name: - -``` yaml -theme: - palette: - primary: indigo -``` - -Click on a tile to change the primary color: - -<div class="mdx-switch"> - <button data-md-color-primary="red"><code>red</code></button> - <button data-md-color-primary="pink"><code>pink</code></button> - <button data-md-color-primary="purple"><code>purple</code></button> - <button data-md-color-primary="deep-purple"><code>deep purple</code></button> - <button data-md-color-primary="indigo"><code>indigo</code></button> - <button data-md-color-primary="blue"><code>blue</code></button> - <button data-md-color-primary="light-blue"><code>light blue</code></button> - <button data-md-color-primary="cyan"><code>cyan</code></button> - <button data-md-color-primary="teal"><code>teal</code></button> - <button data-md-color-primary="green"><code>green</code></button> - <button data-md-color-primary="light-green"><code>light green</code></button> - <button data-md-color-primary="lime"><code>lime</code></button> - <button data-md-color-primary="yellow"><code>yellow</code></button> - <button data-md-color-primary="amber"><code>amber</code></button> - <button data-md-color-primary="orange"><code>orange</code></button> - <button data-md-color-primary="deep-orange"><code>deep orange</code></button> - <button data-md-color-primary="brown"><code>brown</code></button> - <button data-md-color-primary="grey"><code>grey</code></button> - <button data-md-color-primary="blue-grey"><code>blue grey</code></button> - <button data-md-color-primary="black"><code>black</code></button> - <button data-md-color-primary="white"><code>white</code></button> -</div> - -<script> - var buttons = document.querySelectorAll("button[data-md-color-primary]") - buttons.forEach(function(button) { - button.addEventListener("click", function() { - var attr = this.getAttribute("data-md-color-primary") - document.body.setAttribute("data-md-color-primary", attr) - var name = document.querySelector("#__code_2 code span.l") - name.textContent = attr.replace("-", " ") - }) - }) -</script> - - [Primary color support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.2.0 - -#### Accent color - -[:octicons-tag-24: 0.2.0][Accent color support] · -:octicons-milestone-24: Default: `indigo` - -The accent color is used to denote elements that can be interacted with, e.g. -hovered links, buttons and scrollbars. It can be changed in `mkdocs.yml` by -choosing a valid color name: - -``` yaml -theme: - palette: - accent: indigo -``` - -Click on a tile to change the accent color: - -<style> - .md-typeset button[data-md-color-accent] > code { - background-color: var(--md-code-bg-color); - color: var(--md-accent-fg-color); - } -</style> - -<div class="mdx-switch"> - <button data-md-color-accent="red"><code>red</code></button> - <button data-md-color-accent="pink"><code>pink</code></button> - <button data-md-color-accent="purple"><code>purple</code></button> - <button data-md-color-accent="deep-purple"><code>deep purple</code></button> - <button data-md-color-accent="indigo"><code>indigo</code></button> - <button data-md-color-accent="blue"><code>blue</code></button> - <button data-md-color-accent="light-blue"><code>light blue</code></button> - <button data-md-color-accent="cyan"><code>cyan</code></button> - <button data-md-color-accent="teal"><code>teal</code></button> - <button data-md-color-accent="green"><code>green</code></button> - <button data-md-color-accent="light-green"><code>light green</code></button> - <button data-md-color-accent="lime"><code>lime</code></button> - <button data-md-color-accent="yellow"><code>yellow</code></button> - <button data-md-color-accent="amber"><code>amber</code></button> - <button data-md-color-accent="orange"><code>orange</code></button> - <button data-md-color-accent="deep-orange"><code>deep orange</code></button> -</div> - -<script> - var buttons = document.querySelectorAll("button[data-md-color-accent]") - buttons.forEach(function(button) { - button.addEventListener("click", function() { - var attr = this.getAttribute("data-md-color-accent") - document.body.setAttribute("data-md-color-accent", attr) - var name = document.querySelector("#__code_3 code span.l") - name.textContent = attr.replace("-", " ") - }) - }) -</script> - - [Accent color support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.2.0 - -### Color palette toggle - -[:octicons-tag-24: 7.1.0][Color palette toggle support] · -:octicons-milestone-24: Default: _none_ - -Offering a light _and_ dark color palette makes your documentation pleasant to -read at different times of the day, so the user can choose accordingly. Add the -following lines to `mkdocs.yml`: - -``` yaml -theme: - palette: # (1)! - - # Palette toggle for light mode - - scheme: default - toggle: - icon: material/brightness-7 # (2)! - name: Switch to dark mode - - # Palette toggle for dark mode - - scheme: slate - toggle: - icon: material/brightness-4 - name: Switch to light mode -``` - -1. Note that the `theme.palette` setting is now defined as a list. - -2. Enter a few keywords to find the perfect icon using our [icon search] and - click on the shortcode to copy it to your clipboard: - - <div class="mdx-iconsearch" data-mdx-component="iconsearch"> - <input class="md-input md-input--stretch mdx-iconsearch__input" placeholder="Search icon" data-mdx-component="iconsearch-query" value="brightness" /> - <div class="mdx-iconsearch-result" data-mdx-component="iconsearch-result" data-mdx-mode="file"> - <div class="mdx-iconsearch-result__meta"></div> - <ol class="mdx-iconsearch-result__list"></ol> - </div> - </div> - -This configuration will render a color palette toggle next to the search bar. -Note that you can also define separate settings for [`primary`][palette.primary] -and [`accent`][palette.accent] per color palette. - -The following properties must be set for each toggle: - -[`icon`](#+palette.toggle.icon){ #+palette.toggle.icon } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property must point to a valid icon path referencing any icon bundled - with the theme, or the build will not succeed. Some popular combinations: - - * :material-brightness-7: + :material-brightness-4: – `material/brightness-7` + `material/brightness-4` - * :material-toggle-switch: + :material-toggle-switch-off-outline: – `material/toggle-switch` + `material/toggle-switch-off-outline` - * :material-weather-night: + :material-weather-sunny: – `material/weather-night` + `material/weather-sunny` - * :material-eye: + :material-eye-outline: – `material/eye` + `material/eye-outline` - * :material-lightbulb: + :material-lightbulb-outline: – `material/lightbulb` + `material/lightbulb-outline` - -[`name`](#+palette.toggle.name){ #+palette.toggle.name } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property is used as the toggle's `title` attribute and should be set to - a discernable name to improve accessibility. It's rendered as a [tooltip]. - - [Color palette toggle support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.1.0 - [palette.scheme]: #color-scheme - [palette.primary]: #primary-color - [palette.accent]: #accent-color - [icon search]: ../reference/icons-emojis.md#search - [tooltip]: ../reference/tooltips.md - -### System preference - -[:octicons-tag-24: 7.1.0][System preference support] · -:octicons-milestone-24: Default: _none_ - -Each color palette can be linked to the user's system preference for light and -dark appearance by using a media query. Simply add a `media` property next to -the `scheme` definition in `mkdocs.yml`: - -``` yaml -theme: - palette: - - # Palette toggle for light mode - - media: "(prefers-color-scheme: light)" - scheme: default - toggle: - icon: material/brightness-7 - name: Switch to dark mode - - # Palette toggle for dark mode - - media: "(prefers-color-scheme: dark)" - scheme: slate - toggle: - icon: material/brightness-4 - name: Switch to light mode -``` - -When the user first visits your site, the media queries are evaluated in the -order of their definition. The first media query that matches selects the -default color palette. - - [System preference support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.1.0 - -#### Automatic light / dark mode - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.18.0][Insiders] · -:octicons-beaker-24: Experimental - -Newer operating system allow to automatically switch between light and dark -appearance during day and night times. [Insiders] adds support for automatic -light / dark mode, delegating color palette selection to the user's operating -system. Add the following lines to `mkdocs.yml`: - -``` yaml -theme: - palette: - - # Palette toggle for automatic mode - - media: "(prefers-color-scheme)" - toggle: - icon: material/brightness-auto - name: Switch to light mode - - # Palette toggle for light mode - - media: "(prefers-color-scheme: light)" - scheme: default # (1)! - toggle: - icon: material/brightness-7 - name: Switch to dark mode - - # Palette toggle for dark mode - - media: "(prefers-color-scheme: dark)" - scheme: slate - toggle: - icon: material/brightness-4 - name: Switch to system preference -``` - -1. You can also define separate settings for [`primary`][palette.primary] and - [`accent`][palette.accent] per color palette, i.e. different colors for - light and dark mode. - -Material for MkDocs will now change the color palette each time the operating -system switches between light and dark appearance, even when the user doesn't -reload the site. - - [Insiders]: ../insiders/index.md - -## Customization - -### Custom colors - -Material for MkDocs implements colors using [CSS variables] (custom -properties). If you want to customize the colors beyond the palette (e.g. to -use your brand-specific colors), you can add an [additional style sheet] and -tweak the values of the CSS variables. - -Let's say you're :fontawesome-brands-youtube:{ style="color: #EE0F0F" } -__YouTube__, and want to set the primary color to your brand's palette. Just -add: - -=== ":octicons-file-code-16: `docs/stylesheets/extra.css`" - - ``` css - :root { - --md-primary-fg-color: #EE0F0F; - --md-primary-fg-color--light: #ECB7B7; - --md-primary-fg-color--dark: #90030C; - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_css: - - stylesheets/extra.css - ``` - -See the file containing the [color definitions] for a list of all CSS variables. - - [CSS variables]: https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties - [color definitions]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/main/_colors.scss - [additional style sheet]: ../customization.md#additional-css - - -### Custom color schemes - -Besides overriding specific colors, you can create your own, named color scheme -by wrapping the definitions in a `[data-md-color-scheme="..."]` -[attribute selector], which you can then set via `mkdocs.yml` as described -in the [color schemes][palette.scheme] section: - -=== ":octicons-file-code-16: `docs/stylesheets/extra.css`" - - ``` css - [data-md-color-scheme="youtube"] { - --md-primary-fg-color: #EE0F0F; - --md-primary-fg-color--light: #ECB7B7; - --md-primary-fg-color--dark: #90030C; - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - theme: - palette: - scheme: youtube - extra_css: - - stylesheets/extra.css - ``` - -Additionally, the `slate` color scheme defines all of it's colors via `hsla` -color functions and deduces its colors from the `--md-hue` CSS variable. You -can tune the `slate` theme with: - -``` css -[data-md-color-scheme="slate"] { - --md-hue: 210; /* (1)! */ -} -``` - -1. The `hue` value must be in the range of `[0, 360]` - - [attribute selector]: https://www.w3.org/TR/selectors-4/#attribute-selectors diff --git a/docs/setup/changing-the-fonts.md b/docs/setup/changing-the-fonts.md deleted file mode 100644 index d2d7a46af0dbffe245d2b27c3df0275039371a16..0000000000000000000000000000000000000000 --- a/docs/setup/changing-the-fonts.md +++ /dev/null @@ -1,121 +0,0 @@ -# Changing the fonts - -Material for MkDocs makes it easy to change the typeface of your project -documentation, as it directly integrates with [Google Fonts]. Alternatively, -fonts can be custom-loaded if self-hosting is preferred for data privacy reasons -or another destination should be used. - - [Google Fonts]: https://fonts.google.com - -## Configuration - -### Regular font - -[:octicons-tag-24: 0.1.2][Font support] · -:octicons-milestone-24: Default: [`Roboto`][Roboto] - -The regular font is used for all body copy, headlines, and essentially -everything that does not need to be monospaced. It can be set to any -valid [Google Font][Google Fonts] via `mkdocs.yml`: - -``` yaml -theme: - font: - text: Roboto -``` - -The typeface will be loaded in 300, 400, _400i_ and __700__. - - [Roboto]: https://fonts.google.com/specimen/Roboto - [Font support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.2 - -### Monospaced font - -[:octicons-tag-24: 0.1.2][Font support] · -:octicons-milestone-24: Default: [`Roboto Mono`][Roboto Mono] - -The _monospaced font_ is used for code blocks and can be configured separately. -Just like the regular font, it can be set to any valid [Google Font] -[Google Fonts] via `mkdocs.yml`: - -``` yaml -theme: - font: - code: Roboto Mono -``` - -The typeface will be loaded in 400. - - [Roboto Mono]: https://fonts.google.com/specimen/Roboto+Mono - -### Autoloading - -[:octicons-tag-24: 1.0.0][Autoloading support] · -:octicons-milestone-24: Default: _none_ - -If you want to prevent typefaces from being loaded from [Google Fonts], e.g. -to adhere to [data privacy] regulations, and fall back to system fonts, add the -following lines to `mkdocs.yml`: - -``` yaml -theme: - font: false -``` - -!!! tip "Automatically bundle Google Fonts" - - The [built-in privacy plugin] makes it easy to use Google Fonts - while complying with the __General Data Protection Regulation__ (GDPR), - by automatically downloading and self-hosting the web font files. - - [data privacy]: https://developers.google.com/fonts/faq#what_does_using_the_google_fonts_api_mean_for_the_privacy_of_my_users - [Autoloading support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.0.0 - [built-in privacy plugin]: ensuring-data-privacy.md#built-in-privacy-plugin - -## Customization - -### Additional fonts - -If you want to load an (additional) font from another destination or override -the system font, you can use an [additional style sheet] to add the -corresponding `@font-face` definition: - -=== ":octicons-file-code-16: `docs/stylesheets/extra.css`" - - ``` css - @font-face { - font-family: "<font>"; - src: "..."; - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_css: - - stylesheets/extra.css - ``` - -The font can then be applied to specific elements, e.g. only headlines, or -globally to be used as the site-wide regular or monospaced font: - -=== "Regular font" - - ``` css - :root { - --md-text-font: "<font>"; /* (1)! */ - } - ``` - - 1. Always define fonts through CSS variables and not `font-family`, as - this would disable the system font fallback. - -=== "Monospaced font" - - ``` css - :root { - --md-code-font: "<font>"; - } - ``` - - [additional style sheet]: ../customization.md#additional-css diff --git a/docs/setup/changing-the-language.md b/docs/setup/changing-the-language.md deleted file mode 100644 index 2b07b2d42bdae8b74c7a6db9bea07b91fe46c029..0000000000000000000000000000000000000000 --- a/docs/setup/changing-the-language.md +++ /dev/null @@ -1,180 +0,0 @@ -# Changing the language - -Material for MkDocs supports internationalization (i18n) and provides -translations for template variables and labels in 50+ languages. Additionally, -the site search can be configured to use a language-specific stemmer, if -available. - -## Configuration - -### Site language - -[:octicons-tag-24: 1.12.0][Site language support] · -:octicons-milestone-24: Default: `en` - -You can set the site language in `mkdocs.yml` with: - -``` yaml -theme: - language: en # (1)! -``` - -1. HTML5 only allows to set a [single language per document], which is why - Material for MkDocs only supports setting a canonical language for the - entire project, i.e. one per `mkdocs.yml`. - - The easiest way to build a multi-language documentation is to create one - project in a subfolder per language, and then use the [language selector] - to interlink those projects. - -The following languages are supported: - -<!-- hooks/translations.py --> - -Note that some languages will produce unreadable anchor links due to the way -the default slug function works. Consider using a [Unicode-aware slug function]. - -!!! tip "Translations missing? Help us out, it takes only 5 minutes" - - Material for MkDocs relies on outside contributions for adding and updating - translations for the almost 60 languages it supports. If your language shows - that some translations are missing, click on the link to add them. If your - language is not in the list, click here to [add a new language]. - - [Site language support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.12.0 - [single language per document]: https://www.w3.org/International/questions/qa-html-language-declarations.en#attributes - [language selector]: #site-language-selector - [Unicode-aware slug function]: extensions/python-markdown.md#toc-slugify - [add a new language]: https://github.com/squidfunk/mkdocs-material/issues/new?template=04-add-a-translation.yml&title=Add+translations+for+... - -### Site language selector - -[:octicons-tag-24: 7.0.0][Site language selector support] · -:octicons-milestone-24: Default: _none_ - -If your documentation is available in multiple languages, a language selector -pointing to those languages can be added to the header. Alternate languages -can be defined via `mkdocs.yml`. - -``` yaml -extra: - alternate: - - name: English - link: /en/ # (1)! - lang: en - - name: Deutsch - link: /de/ - lang: de -``` - -1. Note that this must be an absolute link. If it includes a domain part, it's - used as defined. Otherwise the domain part of the [`site_url`][site_url] as - set in `mkdocs.yml` is prepended to the link. - -The following properties are available for each alternate language: - -[`name`](#+alternate.name){ #+alternate.name } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This value of this property is used inside the language selector as the - name of the language and must be set to a non-empty string. - -[`link`](#+alternate.link){ #+alternate.link } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property must be set to an absolute link, which might also point to - another domain or subdomain not necessarily generated with MkDocs. - -[`lang`](#+alternate.lang){ #+alternate.lang } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property must contain an [ISO 639-1 language code] and is used for - the `hreflang` attribute of the link, improving discoverability via search - engines. - -[![Language selector preview]][Language selector preview] - - [Site language selector support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.0.0 - [site_url]: https://www.mkdocs.org/user-guide/configuration/#site_url - [ISO 639-1 language code]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes - [Language selector preview]: ../assets/screenshots/language-selection.png - -### Directionality - -[:octicons-tag-24: 2.5.0][Directionality support] · -:octicons-milestone-24: Default: _automatically set_ - -While many languages are read `ltr` (left-to-right), Material for MkDocs also -supports `rtl` (right-to-left) directionality which is deduced from the -selected language, but can also be set with: - -``` yaml -theme: - direction: ltr -``` - -Click on a tile to change the directionality: - -<div class="mdx-switch"> - <button data-md-dir="ltr"><code>ltr</code></button> - <button data-md-dir="rtl"><code>rtl</code></button> -</div> - -<script> - var buttons = document.querySelectorAll("button[data-md-dir]") - buttons.forEach(function(button) { - button.addEventListener("click", function() { - var attr = this.getAttribute("data-md-dir") - document.body.dir = attr - var name = document.querySelector("#__code_3 code span.l") - name.textContent = attr - }) - }) -</script> - - [Directionality support]: https://github.com/squidfunk/mkdocs-material/releases/tag/2.5.0 - -## Customization - -### Custom translations - -If you want to customize some of the translations for a language, just follow -the guide on [theme extension] and create a new partial in the `overrides` -folder. Then, import the [translations] of the language as a fallback and only -adjust the ones you want to override: - -=== ":octicons-file-code-16: `overrides/partials/languages/custom.html`" - - ``` html - <!-- Import translations for language and fallback --> - {% import "partials/languages/de.html" as language %} - {% import "partials/languages/en.html" as fallback %} <!-- (1)! --> - - <!-- Define custom translations --> - {% macro override(key) %}{{ { - "source.file.date.created": "Erstellt am", <!-- (2)! --> - "source.file.date.updated": "Aktualisiert am" - }[key] }}{% endmacro %} - - <!-- Re-export translations --> - {% macro t(key) %}{{ - override(key) or language.t(key) or fallback.t(key) - }}{% endmacro %} - ``` - - 1. Note that `en` must always be used as a fallback language, as it's the - default theme language. - - 2. Check the [list of available languages], pick the translation you want - to override for your language and add them here. - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - theme: - language: custom - ``` - - [theme extension]: ../customization.md#extending-the-theme - [translations]: https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/languages/ - [list of available languages]: https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/languages/ diff --git a/docs/setup/changing-the-logo-and-icons.md b/docs/setup/changing-the-logo-and-icons.md deleted file mode 100644 index c267fba00628b53041c82ddb900ffd035b53ca9b..0000000000000000000000000000000000000000 --- a/docs/setup/changing-the-logo-and-icons.md +++ /dev/null @@ -1,133 +0,0 @@ -# Changing the logo and icons - -When installing Material for MkDocs, you immediately get access to _over 8,000 -icons_ ready to be used for customization of specific parts of the theme and/or -when writing your documentation in Markdown. Not enough? You can also add -[additional icons] with minimal effort. - - [additional icons]: #additional-icons - -## Configuration - -### Logo - -[:octicons-tag-24: 0.1.0][Logo support] · -:octicons-milestone-24: Default: :material-library: – `material/library` - -The logo can be changed to a user-provided image (any type, incl. `*.png` and -`*.svg`) located in the `docs` folder, or to any icon bundled with the theme. -Add the following lines to `mkdocs.yml`: - -=== ":octicons-image-16: Image" - - ``` yaml - theme: - logo: assets/logo.png - ``` - -=== ":octicons-package-16: Icon, bundled" - - ``` yaml - theme: - icon: - logo: material/library # (1)! - ``` - - 1. Enter a few keywords to find the perfect icon using our [icon search] and - click on the shortcode to copy it to your clipboard: - - <div class="mdx-iconsearch" data-mdx-component="iconsearch"> - <input class="md-input md-input--stretch mdx-iconsearch__input" placeholder="Search icon" data-mdx-component="iconsearch-query" value="material library" /> - <div class="mdx-iconsearch-result" data-mdx-component="iconsearch-result" data-mdx-mode="file"> - <div class="mdx-iconsearch-result__meta"></div> - <ol class="mdx-iconsearch-result__list"></ol> - </div> - </div> - - [Logo support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [icon search]: ../reference/icons-emojis.md#search - -Normally, the logo in the header and sidebar links to the homepage of the -documentation, which is the same as `site_url`. This behavior can be changed -with the following configuration: - -``` yaml -extra: - homepage: https://example.com -``` - -### Favicon - -[:octicons-tag-24: 0.1.0][Favicon support] · -:octicons-milestone-24: Default: [`assets/images/favicon.png`][Favicon default] - -The favicon can be changed to a path pointing to a user-provided image, which -must be located in the `docs` folder. Add the following lines to `mkdocs.yml`: - -``` yaml -theme: - favicon: images/favicon.png -``` - - [Favicon support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [Favicon default]: https://github.com/squidfunk/mkdocs-material/blob/master/material/assets/images/favicon.png - -## Customization - -### Additional icons - -In order to use custom icons, [extend the theme] and create a new folder named -`.icons` in the [`custom_dir`][custom_dir] you want to use for overrides. -Next, add your `*.svg` icons into a subfolder of the `.icons` folder. Let's say -you downloaded and unpacked the [Bootstrap] icon set, and want to add it to -your project documentation. The structure of your project should look like this: - -``` { .sh .no-copy } -. -├─ overrides/ -│ └─ .icons/ -│ └─ bootstrap/ -│ └─ *.svg -└─ mkdocs.yml -``` - -Then, add the following lines to `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg - options: - custom_icons: - - overrides/.icons -``` - -You can now use all :fontawesome-brands-bootstrap: Bootstrap icons anywhere in -Markdown files, as well as everywhere icons can be used in `mkdocs.yml`. -However, note that the syntaxes are slightly different: - -- __Using icons in configuration__: take the path of the `*.svg` icon file - starting at the `.icons` folder and drop the file extension, e.g. for - `.icons/bootstrap/envelope-paper.svg`, use: - - ``` yaml - theme: - icon: - logo: bootstrap/envelope-paper - ``` - -- __Using icons in Markdown files__: additionally to taking the path from the - `.icons` folder as noted above, replace all `/` with `-` and enclose the icon - shortcode in two colons: - - ``` - :bootstrap-envelope-paper: - ``` - -For further notes on icon usage, please consult the [icon reference]. - - [extend the theme]: ../customization.md#extending-the-theme - [custom_dir]: https://www.mkdocs.org/user-guide/configuration/#custom_dir - [Bootstrap]: https://icons.getbootstrap.com/ - [icon reference]: ../reference/icons-emojis.md#using-icons diff --git a/docs/setup/dependencies/image-processing.md b/docs/setup/dependencies/image-processing.md deleted file mode 100644 index ae053e05f5a45c5f59d70bf5a6b4ffd0178f87ca..0000000000000000000000000000000000000000 --- a/docs/setup/dependencies/image-processing.md +++ /dev/null @@ -1,118 +0,0 @@ -# Image processing - -Material for MkDocs depends on several libraries to allow for image processing -as part of the build pipeline, including [social cards] and [image optimization]. -For this reason, a few external libraries must be installed on the host system. -This section explains how to install them. - - [social cards]: ../setting-up-social-cards.md - [image optimization]: ../building-an-optimized-site.md - -## Dependencies - -Install the Python dependencies for image processing with: - -``` -pip install pillow cairosvg -``` - -### Cairo Graphics - -[Cairo Graphics] is a graphics library and dependency of [Pillow], which -Material for MkDocs makes use of for generating [social cards] and performing -[image optimization]. See the following section which explains how to install -[Cairo Graphics] and its dependencies on your system: - -=== ":material-apple: macOS" - - Make sure [Homebrew] is installed, which is a modern package manager for - macOS. Next, use the following command to install all necessary - dependencies: - - ``` - brew install cairo freetype libffi libjpeg libpng zlib - ``` - -=== ":fontawesome-brands-windows: Windows" - - As stated in the [installation guide], the easiest way to get up and running - with the [Cairo Graphics] library on Windows is by installing [GTK+], since - it has Cairo as a dependency. You can also download and install a - precompiled [GTK runtime]. - -=== ":material-linux: Linux" - - There are several package managers for Linux with varying availability per - distribution. The [installation guide] explains how to install the [Cairo - Graphics] library for your distribution: - - === ":material-ubuntu: Ubuntu" - - ``` - apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev - ``` - - === ":material-fedora: Fedora" - - ``` - yum install cairo-devel freetype-devel libffi-devel libjpeg-devel libpng-devel zlib-devel - ``` - - === ":fontawesome-brands-suse: openSUSE" - - ``` - zypper install cairo-devel freetype-devel libffi-devel libjpeg-devel libpng-devel zlib-devel - ``` - -The following environments come with a preinstalled version of [Cairo Graphics]: - -- [x] No installation needed in [Docker image] -- [x] No installation needed in [GitHub Actions] (Ubuntu) - - [Cairo Graphics]: https://www.cairographics.org/ - [Pillow]: https://pillow.readthedocs.io/ - [CairoSVG]: https://cairosvg.org/ - [Homebrew]: https://brew.sh/ - [installation guide]: https://www.cairographics.org/download/ - [GTK+]: https://www.gtk.org/docs/installations/windows/ - [GTK runtime]: https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases - [Docker image]: https://hub.docker.com/r/squidfunk/mkdocs-material/ - [GitHub Actions]: ../../publishing-your-site.md#with-github-actions - -### pngquant - -[pngquant] is an excellent library for lossy PNG compression, and a direct -dependency of the [built-in optimize plugin]. See the following section which -explains how to install [pngquant] system: - -=== ":material-apple: macOS" - - Make sure [Homebrew] is installed, which is a modern package manager for - macOS. Next, use the following command to install all necessary - dependencies: - - ``` - brew install pngquant - ``` - -=== ":fontawesome-brands-windows: Windows" - - Installing [pngquant] on Windows is a little more involved. The - [pngquant-winbuild] repository contains a guide on how to set up an - environment for building [pngquant] on Windows. - -=== ":material-linux: Linux" - - All popular Linux distributions, regardless of package manager, should - allow to install [pngquant] with the bundled package manager. For example, - on Ubuntu, [pngquant] can be installed with: - - ``` - apt-get install pngquant - ``` - - The same is true for `yum` and `zypper`. - - [pngquant]: https://pngquant.org/ - [built-in optimize plugin]: ../building-an-optimized-site.md#built-in-optimize-plugin - [pngquant-winbuild]: https://github.com/jibsen/pngquant-winbuild diff --git a/docs/setup/ensuring-data-privacy.md b/docs/setup/ensuring-data-privacy.md deleted file mode 100644 index 6a1b35db55b313a8aa8dccdaf8be502687a93104..0000000000000000000000000000000000000000 --- a/docs/setup/ensuring-data-privacy.md +++ /dev/null @@ -1,556 +0,0 @@ -# Ensuring data privacy - -Material for MkDocs makes compliance with data privacy regulations very easy, -as it offers a native [cookie consent] solution to seek explicit consent from -users before setting up [analytics]. Additionally, external assets can be -automatically downloaded for [self-hosting]. - - [cookie consent]: #cookie-consent - [analytics]: setting-up-site-analytics.md - [self-hosting]: #built-in-privacy-plugin - -## Configuration - -### Cookie consent - -[:octicons-tag-24: 8.4.0][Cookie consent support] · -:octicons-milestone-24: Default: _none_ · -:octicons-beaker-24: Experimental - -Material for MkDocs ships a native and extensible cookie consent form which -asks the user for consent prior to sending requests to third parties. Add the -following to `mkdocs.yml`: - -``` yaml -extra: - consent: - title: Cookie consent - description: >- # (1)! - We use cookies to recognize your repeated visits and preferences, as well - as to measure the effectiveness of our documentation and whether users - find what they're searching for. With your consent, you're helping us to - make our documentation better. -``` - -1. You can add arbitrary HTML tags in the `description`, e.g. to link to your - terms of service or other parts of the site. - -The following properties are available: - -[`title`](#+consent.title){ #+consent.title } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property sets the title of the cookie consent, which is rendered at the - top of the form and must be set to a non-empty string. - -[`description`](#+consent.description){ #+consent.description } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property sets the description of the cookie consent, is rendered below - the title, and may include raw HTML (e.g. a links to the terms of service). - -[`cookies`](#+consent.cookies){ #+consent.cookies } - -: :octicons-milestone-24: Default: _none_ – This property allows to add custom - cookies or change the initial `checked` state and name of built-in cookies. - Currently, the following cookies are built-in: - - - __Google Analytics__ – `analytics` (enabled by default) - - __GitHub__ – `github` (enabled by default) - - Each cookie must receive a unique identifier which is used as a key in the - `cookies` map, and can be either set to a string, or to a map defining - `name` and `checked` state: - - === "Custom cookie name" - - ``` yaml - extra: - consent: - cookies: - analytics: Custom name - ``` - - === "Custom initial state" - - ``` yaml - extra: - consent: - cookies: - analytics: - name: Google Analytics - checked: false - ``` - - === "Custom cookie" - - ``` yaml - extra: - consent: - cookies: - analytics: Google Analytics # (1)! - custom: Custom cookie - ``` - - 1. If you define a custom cookie as part of the `cookies` property, - the `analytics` cookie must be added back explicitly, or analytics - won't be triggered. - - If Google Analytics was configured via `mkdocs.yml`, the cookie consent will - automatically include a setting for the user to disable it. [Custom cookies] - can be used from JavaScript. - -[`actions`](#+consent.actions){ #+consent.actions } - -: :octicons-milestone-24: Default: `[accept, manage]` – This property defines - which buttons are shown and in which order, e.g. to allow the user to accept - cookies and manage settings: - - ``` yaml - extra: - consent: - actions: - - accept - - manage # (1)! - ``` - - 1. If the `manage` settings button is omitted from the `actions` property, - the settings are always shown. - - The cookie consent form includes three types of buttons: - - - `accept` – Button to accept selected cookies - - `reject` – Button to reject all cookies - - `manage` – Button to manage settings - -When a user first visits your site, a cookie consent form is rendered: - -[![Cookie consent enabled]][Cookie consent enabled] - - [Custom cookies]: #custom-cookies - [Cookie consent support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.4.0 - [Cookie consent enabled]: ../assets/screenshots/consent.png - -#### Change cookie settings - -In order to comply with GDPR, users must be able to change their cookie settings -at any time. This can be done by adding a simple link to your [copyright notice] -in `mkdocs.yml`: - -``` yaml -copyright: > - Copyright © 2016 - 2023 Martin Donath – - <a href="#__consent">Change cookie settings</a> -``` - - [copyright notice]: setting-up-the-footer.md#copyright-notice - -### Built-in privacy plugin - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.9.0][Insiders] · -:octicons-cpu-24: Plugin · -:octicons-beaker-24: Experimental - -The built-in privacy plugin automatically identifies [external assets] as part -of the build process and downloads all assets for very simple self-hosting. Add -the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - privacy -``` - -> If you need to be able to build your documentation with and without -> [Insiders], please refer to the [built-in plugins] section to learn how -> shared configurations help to achieve this. - -The following configuration options are available: - -[`enabled`](#+privacy.enabled){ #+privacy.enabled } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - the plugin is enabled when building your project. If you want to speed up - local builds, you can use an [environment variable]: - - ``` yaml - plugins: - - privacy: - enabled: !ENV [CI, false] - ``` - -[`concurrency`](#+privacy.concurrency){ #+privacy.concurrency } :material-alert-decagram:{ .mdx-pulse title="Added on February 6, 2023" } - -: :octicons-milestone-24: Default: _number of CPUs_ – This option specifies - how many CPUs the plugin is allowed to use when downloading external assets. - With more CPUs, the plugin can do more work in the same time, thus complete - its work faster. Concurrent processing can be disabled with: - - ``` yaml - plugins: - - privacy: - concurrency: 1 - ``` - - [Insiders]: ../insiders/index.md - [built-in plugins]: ../insiders/getting-started.md#built-in-plugins - -#### External assets - -The following configuration options are available for external assets: - -[`external_assets`](#+privacy.external_assets){ #+privacy.external_assets } - -: :octicons-milestone-24: Default: `bundle` – This option specifies what the - plugin should do when encountering external assets. There are two options: - while `report` will issue warning messages during the build, `bundle` will - automatically download all external files and adjust all references: - - ``` yaml - plugins: - - privacy: - external_assets: bundle - ``` - - If you've removed all external assets from your project via [customization], - it's still a good idea to enable the plugin and set the mode to `report`, - as the plugin will make sure that there are no hidden external links in any - Markdown files that were unintentionally added. - - Using `report` in [strict mode] will make the build fail when external - assets are detected. - -[`external_assets_dir`](#+privacy.external_assets_dir){ #+privacy.external_assets_dir } - -: :octicons-milestone-24: Default: `assets/external` – This option - specifies where the downloaded [external assets] will be stored. It's - normally not necessary to change this option: - - ``` yaml - plugins: - - privacy: - external_assets_dir: assets/external - ``` - - The path must be defined relative to [`docs_dir`][docs_dir]. - -[`external_assets_include`](#+privacy.external_assets_include){ #+privacy.external_assets_include } :material-alert-decagram:{ .mdx-pulse title="Added on February 6, 2023" } - -: :octicons-milestone-24: Default: _none_ – This option allows to only include - certain external assets for processing by the privacy plugin, so they will - be downloaded and bundled during the build: - - ``` yaml - plugins: - - privacy: - external_assets_include: - - unsplash.com/* - ``` - - !!! tip "Hosting images externally and optimizing them automatically" - - This option makes the [built-in privacy plugin] an excellent choice for - when you want to host assets like images outside of your git repository - in another location to keep them fresh and your repository lean. - - Additionally, as of [:octicons-tag-24: insiders-4.30.0][Insiders], the - built-in privacy plugin was entirely rewritten and now works perfectly - with the [built-in optimize plugin], which means that external assets - can be passed through the same optimization pipeline as the rest of your - documentation. This means you can store and edit unoptimized files - outside of your repository, and let both plugins built a highly - optimized site for you. - - If you want to implement separate pipelines, i.e., optimize some images - differently from others or exclude some images from downloading, you can - use multiple instances of the [built-in privacy plugin]. - -[`external_assets_exclude`](#+privacy.external_assets_exclude){ #+privacy.external_assets_exclude } - -: :octicons-milestone-24: Default: _none_ – This option allows to exclude - certain external assets from processing by the privacy plugin, so they will - not be downloaded and bundled during the build: - - ``` yaml - plugins: - - privacy: - external_assets_exclude: # (1)! - - cdn.jsdelivr.net/npm/mathjax@3/* - - giscus.app/* - ``` - - 1. [MathJax] loads web fonts for typesetting of mathematical content - through relative URLs, and thus cannot be automatically bundled by the - privacy plugin. [MathJax can be self-hosted]. - - Giscus, which we recommend to use as a [comment system], uses a technique - called code-splitting to load only the code that is necessary, which - is implemented via relative URLs. [Giscus can be self-hosted] as well. - - Excluding specific external assets can be necessary if they contain - dynamically created or relative URLs, which can't be resolved by the privacy - plugin due to [technical limitations]. - -!!! question "Why can't Material for MkDocs bundle all assets by design?" - - The primary reason why Material for MkDocs can't just bundle all of its own - assets is the integration with [Google Fonts], which offers over a thousand - different fonts that can be used to render your documentation. Most of the - fonts include several weights and are split up into different character sets - to keep the download size small, so the browser only downloads what is - really needed. For Roboto, our default [regular font], this results in [42 - `*.woff2` files in total][example]. - - If Material for MkDocs would bundle all font files, the download size would - be in the hundreds of megabytes, slowing down automated builds. Furthermore, - authors might add external assets like third-party scripts or style sheets - that would need to be remembered to be defined as further local assets. - - This is the very reason the [built-in privacy plugin] exists — it automates - the process of downloading all external assets manually to ensure compliance - with GDPR with some some [technical limitations]. - - [customization]: ../customization.md - [strict mode]: https://www.mkdocs.org/user-guide/configuration/#strict - [docs_dir]: https://www.mkdocs.org/user-guide/configuration/#docs_dir - [MathJax]: ../reference/mathjax.md - [MathJax can be self-hosted]: https://docs.mathjax.org/en/latest/web/hosting.html - [Giscus can be self-hosted]: https://github.com/giscus/giscus/blob/main/SELF-HOSTING.md - [comment system]: adding-a-comment-system.md - [external assets]: #how-it-works - [environment variable]: https://www.mkdocs.org/user-guide/configuration/#environment-variables - [Google Fonts]: changing-the-fonts.md - [regular font]: changing-the-fonts.md#regular-font - [example]: #example - [technical limitations]: #limitations - [built-in optimize plugin]: building-an-optimized-site.md#built-in-optimize-plugin - -#### External links :material-alert-decagram:{ .mdx-pulse title="Added on October 18, 2022" } - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.26.0][Insiders] · -:octicons-beaker-24: Experimental - -The following configuration options are available for external links: - -[`external_links`](#+privacy.external_links){ #+privacy.external_links } - -: :octicons-milestone-24: Default: `true` – This option specifies whether the - plugin should parse and process external links. If you want to speed up - local builds, you can use an [environment variable]: - - ``` yaml - plugins: - - privacy: - external_links: !ENV [CI, false] - ``` - -[`external_links_attr_map`](#+privacy.external_links_attr_map){ #+privacy.external_links_attr_map } - -: :octicons-milestone-24: Default: _None_ – This option specifies custom - attributes that should be added to external links, like for example - `target="_blank"` so all external links open in a new window: - - ``` yaml - plugins: - - privacy: - external_links_attr_map: - target: _blank - ``` - -[`external_links_noopener`](#+privacy.external_links_noopener){ #+privacy.external_links_noopener } - -: :octicons-milestone-24: Default: `true` – This option specifies whether the - plugin should automatically add [`rel="noopener"`][noopener] to all links - with `target="_blank"` for security reasons: - - ``` yaml - plugins: - - privacy: - external_links_noopener: true - ``` - - [noopener]: https://mathiasbynens.github.io/rel-noopener/ - -#### How it works - -The [built-in privacy plugin] scans the resulting HTML for links to external -resources, including external scripts, style sheets, images and web fonts, and -downloads them to bundle them with your documentation site. Every URL referring -to an external resource, no matter if part of a template or Markdown file, is -then replaced with the URL to the local copy. An example: - -``` html -<script src="https://example.com/script.js"></script> -``` - -The external script is downloaded, and the link is replaced with: - -``` html -<script src="assets/external/example.com/script.js"></script> -``` - -Style sheets are scanned for external `url(...)` references, e.g. images and -web fonts, which are then also downloaded and bundled with your documentation -site. This means that [Google Fonts] can be configured in `mkdocs.yml` as usual, -as the [built-in privacy plugin] automatically downloads and bundles all -dependent resources. - -As a third measure, [`preconnect`][preconnect] hints used for DNS pre-fetching -which might also leak the visitors IP address to a third party are automatically -removed during the build process. - -??? example "Expand to inspect example" - - For the official documentation, the [built-in privacy plugin] downloads the - following resources: - - ``` { .sh .no-copy #example } - . - └─ assets/external/ - ├─ unpkg.com/tablesort@5.3.0/dist/tablesort.min.js - ├─ fonts.googleapis.com/css - ├─ fonts.gstatic.com/s/ - │ ├─ roboto/v29/ - │ │ ├─ KFOjCnqEu92Fr1Mu51TjASc-CsTKlA.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TjASc0CsTKlA.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TjASc1CsTKlA.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TjASc2CsTKlA.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TjASc3CsTKlA.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TjASc5CsTKlA.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TjASc6CsQ.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TzBic-CsTKlA.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TzBic0CsTKlA.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TzBic1CsTKlA.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TzBic2CsTKlA.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TzBic3CsTKlA.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TzBic5CsTKlA.woff2 - │ │ ├─ KFOjCnqEu92Fr1Mu51TzBic6CsQ.woff2 - │ │ ├─ KFOkCnqEu92Fr1Mu51xEIzIFKw.woff2 - │ │ ├─ KFOkCnqEu92Fr1Mu51xFIzIFKw.woff2 - │ │ ├─ KFOkCnqEu92Fr1Mu51xGIzIFKw.woff2 - │ │ ├─ KFOkCnqEu92Fr1Mu51xHIzIFKw.woff2 - │ │ ├─ KFOkCnqEu92Fr1Mu51xIIzI.woff2 - │ │ ├─ KFOkCnqEu92Fr1Mu51xLIzIFKw.woff2 - │ │ ├─ KFOkCnqEu92Fr1Mu51xMIzIFKw.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmSU5fABc4EsA.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmSU5fBBc4.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmSU5fBxc4EsA.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmSU5fCBc4EsA.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmSU5fCRc4EsA.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmSU5fChc4EsA.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmSU5fCxc4EsA.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmWUlfABc4EsA.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmWUlfBBc4.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmWUlfBxc4EsA.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmWUlfCBc4EsA.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmWUlfCRc4EsA.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmWUlfChc4EsA.woff2 - │ │ ├─ KFOlCnqEu92Fr1MmWUlfCxc4EsA.woff2 - │ │ ├─ KFOmCnqEu92Fr1Mu4WxKOzY.woff2 - │ │ ├─ KFOmCnqEu92Fr1Mu4mxK.woff2 - │ │ ├─ KFOmCnqEu92Fr1Mu5mxKOzY.woff2 - │ │ ├─ KFOmCnqEu92Fr1Mu72xKOzY.woff2 - │ │ ├─ KFOmCnqEu92Fr1Mu7GxKOzY.woff2 - │ │ ├─ KFOmCnqEu92Fr1Mu7WxKOzY.woff2 - │ │ └─ KFOmCnqEu92Fr1Mu7mxKOzY.woff2 - │ └─ robotomono/v13/ - │ ├─ L0xTDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vrtSM1J-gEPT5Ese6hmHSV0mf0h.woff2 - │ ├─ L0xTDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vrtSM1J-gEPT5Ese6hmHSZ0mf0h.woff2 - │ ├─ L0xTDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vrtSM1J-gEPT5Ese6hmHSd0mf0h.woff2 - │ ├─ L0xTDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vrtSM1J-gEPT5Ese6hmHSh0mQ.woff2 - │ ├─ L0xTDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vrtSM1J-gEPT5Ese6hmHSt0mf0h.woff2 - │ ├─ L0xTDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vrtSM1J-gEPT5Ese6hmHSx0mf0h.woff2 - │ ├─ L0xdDF4xlVMF-BfR8bXMIjhOsXG-q2oeuFoqFrlnAIe2Imhk1T8rbociImtElOUlYIw.woff2 - │ ├─ L0xdDF4xlVMF-BfR8bXMIjhOsXG-q2oeuFoqFrlnAIe2Imhk1T8rbociImtEleUlYIw.woff2 - │ ├─ L0xdDF4xlVMF-BfR8bXMIjhOsXG-q2oeuFoqFrlnAIe2Imhk1T8rbociImtEluUlYIw.woff2 - │ ├─ L0xdDF4xlVMF-BfR8bXMIjhOsXG-q2oeuFoqFrlnAIe2Imhk1T8rbociImtEm-Ul.woff2 - │ ├─ L0xdDF4xlVMF-BfR8bXMIjhOsXG-q2oeuFoqFrlnAIe2Imhk1T8rbociImtEmOUlYIw.woff2 - │ └─ L0xdDF4xlVMF-BfR8bXMIjhOsXG-q2oeuFoqFrlnAIe2Imhk1T8rbociImtEn-UlYIw.woff2 - └─ polyfill.io/v3/polyfill.min.js - ``` - - [built-in privacy plugin]: #built-in-privacy-plugin - [preconnect]: https://developer.mozilla.org/en-US/docs/Web/Performance/dns-prefetch - -#### Caching <small>recommended</small> { #caching data-toc-label="Caching" } - -All downloaded files are written to the `.cache` directory, significantly -reducing the duration of subsequent builds as only replacements need to be -carried out. You might want to: - -1. Ignore the `.cache` directory in your project, by adding it to `.gitignore`. -2. When building your site for publishing, use a build cache to save the - `.cache` directory in between builds. Taking the example from the - [publishing guide], add the following lines: - - ``` yaml hl_lines="15-18" - name: ci - on: - push: - branches: - - master - - main - jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: 3.x - - uses: actions/cache@v2 - with: - key: ${{ github.ref }} - path: .cache - - run: pip install mkdocs-material - - run: mkdocs gh-deploy --force - ``` - - [publishing guide]: ../publishing-your-site.md#with-github-actions - -#### Limitations - -Note that dynamically created URLs as part of scripts are not detected, and thus -cannot be automatically downloaded. The [built-in privacy plugin] does not -execute scripts – it can only detect fully qualified URLs to download and -replace. - -In short, don't do this: - -``` js -const cdn = "https://polyfill.io" -const url = `${cdn}/v3/polyfill.min.js` -``` - -Instead, always use fully qualified URLs: - -``` js -const url ="https://polyfill.io/v3/polyfill.min.js" -``` - -## Customization - -### Custom cookies - -If you've customized the [cookie consent] and added a `custom` cookie, the user -will be prompted to accept your custom cookie. Use [additional JavaScript] to -check whether the user accepted it: - -=== ":octicons-file-code-16: `docs/javascripts/consent.js`" - - ``` js - var consent = __md_get("__consent") - if (consent && consent.custom) { - /* The user accepted the cookie */ - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_javascript: - - javascripts/consent.js - ``` - - [additional JavaScript]: ../customization.md#additional-javascript diff --git a/docs/setup/extensions/index.md b/docs/setup/extensions/index.md deleted file mode 100644 index db440bc340b0a239bc313d2197c681d9fe8bf69c..0000000000000000000000000000000000000000 --- a/docs/setup/extensions/index.md +++ /dev/null @@ -1,137 +0,0 @@ ---- -title: Extensions ---- - -# Extensions - -Markdown is a very small language with a kind-of reference implementation called -[John Gruber's Markdown]. [Python Markdown] and [Python Markdown Extensions] -are two packages that enhance the Markdown writing experience, adding useful -syntax extensions for technical writing. - - [John Gruber's Markdown]: https://daringfireball.net/projects/markdown/ - [Python Markdown]: python-markdown.md - [Python Markdown Extensions]: python-markdown-extensions.md - -## Supported extensions - -The following extensions are all supported by Material for MkDocs and therefore -strongly recommended. Click on each extension to learn about its purpose and -configuration: - -<div class="mdx-columns" markdown> - -- [Abbreviations] -- [Admonition] -- [Arithmatex] -- [Attribute Lists] -- [BetterEm] -- [Caret, Mark & Tilde] -- [Critic] -- [Definition Lists] -- [Details] -- [Emoji] -- [Footnotes] -- [Highlight] -- [Keys] -- [Markdown in HTML] -- [SmartSymbols] -- [Snippets] -- [SuperFences] -- [Tabbed] -- [Table of Contents] -- [Tables] -- [Tasklist] - -</div> - - [Abbreviations]: python-markdown.md#abbreviations - [Admonition]: python-markdown.md#admonition - [Arithmatex]: python-markdown-extensions.md#arithmatex - [Attribute Lists]: python-markdown.md#attribute-lists - [BetterEm]: python-markdown-extensions.md#betterem - [Caret, Mark & Tilde]: python-markdown-extensions.md#caret-mark-tilde - [Critic]: python-markdown-extensions.md#critic - [Definition Lists]: python-markdown.md#definition-lists - [Details]: python-markdown-extensions.md#details - [Emoji]: python-markdown-extensions.md#emoji - [Footnotes]: python-markdown.md#footnotes - [Highlight]: python-markdown-extensions.md#highlight - [Keys]: python-markdown-extensions.md#keys - [Markdown in HTML]: python-markdown.md#markdown-in-html - [SmartSymbols]: python-markdown-extensions.md#smartsymbols - [Snippets]: python-markdown-extensions.md#snippets - [SuperFences]: python-markdown-extensions.md#superfences - [Tabbed]: python-markdown-extensions.md#tabbed - [Table of Contents]: python-markdown.md#table-of-contents - [Tables]: python-markdown.md#tables - [Tasklist]: python-markdown-extensions.md#tasklist - -## Configuration - -Extensions are configured as part of `mkdocs.yml` – the MkDocs configuration -file. The following sections contain two example configurations to bootstrap -your documentation project. - - [overview]: #advanced-configuration - -### Minimal configuration - -This configuration is a good starting point for when you're using Material for -MkDocs for the first time. The best idea is to explore the [reference], and -gradually add what you want to use: - -``` yaml -markdown_extensions: - - # Python Markdown - - toc: - permalink: true - - # Python Markdown Extensions - - pymdownx.highlight - - pymdownx.superfences -``` - - [reference]: ../../reference/index.md - -### Recommended configuration - -This configuration enables all Markdown-related features of Material for MkDocs -and is great for experienced users bootstrapping a new documentation project: - -``` yaml -markdown_extensions: - - # Python Markdown - - abbr - - admonition - - attr_list - - def_list - - footnotes - - md_in_html - - toc: - permalink: true - - # Python Markdown Extensions - - pymdownx.arithmatex: - generic: true - - pymdownx.betterem: - smart_enable: all - - pymdownx.caret - - pymdownx.details - - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg - - pymdownx.highlight - - pymdownx.inlinehilite - - pymdownx.keys - - pymdownx.mark - - pymdownx.smartsymbols - - pymdownx.superfences - - pymdownx.tabbed: - alternate_style: true - - pymdownx.tasklist: - custom_checkbox: true - - pymdownx.tilde -``` diff --git a/docs/setup/extensions/python-markdown-extensions.md b/docs/setup/extensions/python-markdown-extensions.md deleted file mode 100644 index 4e3e744dae016003f141aec75f38831fbe0109f6..0000000000000000000000000000000000000000 --- a/docs/setup/extensions/python-markdown-extensions.md +++ /dev/null @@ -1,757 +0,0 @@ -# Python Markdown Extensions - -The [Python Markdown Extensions] package is an excellent collection of -additional extensions perfectly suited for advanced technical writing. Material -for MkDocs lists this package as an explicit dependency, so it's automatically -installed with a supported version. - - [Python Markdown Extensions]: https://facelessuser.github.io/pymdown-extensions/ - -## Supported extensions - -In general, all extensions that are part of [Python Markdown Extensions] should -work with Material for MkDocs. The following list includes all extensions that -are natively supported, meaning they work without any further adjustments. - -### Arithmatex - -[:octicons-tag-24: 1.0.0][Arithmatex support] · -[:octicons-workflow-24: Extension][Arithmatex] - -The [Arithmatex] extension allows for rendering of block and inline block -equations and integrates seamlessly with [MathJax][^1] – a library for -mathematical typesetting. Enable it via `mkdocs.yml`: - - [^1]: - Other libraries like [KaTeX] are also supported and can be integrated with - some additional effort. See the [Arithmatex documentation on KaTeX] for - further guidance, as this is beyond the scope of Material for MkDocs. - -``` yaml -markdown_extensions: - - pymdownx.arithmatex: - generic: true -``` - -Besides enabling the extension in `mkdocs.yml`, a MathJax configuration and -the JavaScript runtime need to be included, which can be done with a few lines -of [additional JavaScript]: - -=== ":octicons-file-code-16: `docs/javascripts/mathjax.js`" - - ``` js - window.MathJax = { - tex: { - inlineMath: [["\\(", "\\)"]], - displayMath: [["\\[", "\\]"]], - processEscapes: true, - processEnvironments: true - }, - options: { - ignoreHtmlClass: ".*|", - processHtmlClass: "arithmatex" - } - }; - - document$.subscribe(() => { - MathJax.typesetPromise() - }) - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_javascript: - - javascripts/mathjax.js - - https://polyfill.io/v3/polyfill.min.js?features=es6 - - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js - ``` - -The other configuration options of this extension are not officially supported -by Material for MkDocs, which is why they may yield unexpected results. Use -them at your own risk. - -See reference for usage: - -- [Using block syntax] -- [Using inline block syntax] - - [Arithmatex]: https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/ - [Arithmatex support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.0.0 - [Arithmatex documentation on KaTeX]: https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/#loading-katex - [MathJax]: https://www.mathjax.org/ - [KaTeX]: https://github.com/Khan/KaTeX - [additional JavaScript]: ../../customization.md#additional-javascript - [Using block syntax]: ../../reference/mathjax.md#using-block-syntax - [Using inline block syntax]: ../../reference/mathjax.md#using-inline-block-syntax - -### BetterEm - -[:octicons-tag-24: 0.1.0][BetterEm support] · -[:octicons-workflow-24: Extension][BetterEm] - -The [BetterEm] extension improves the detection of Markup to emphasize text -in Markdown using special characters, i.e. for `**bold**` and `_italic_` -formatting. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.betterem -``` - -The configuration options of this extension are not specific to Material for -MkDocs, as they only impact the Markdown parsing stage. See the [BetterEm -documentation][BetterEm] for more information. - - [BetterEm]: https://facelessuser.github.io/pymdown-extensions/extensions/betterem/ - [BetterEm support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - -### Caret, Mark & Tilde - -[:octicons-tag-24: 1.0.0][Caret support] · -[:octicons-workflow-24: Extension][Caret] - -The [Caret], [Mark] and [Tilde] extensions add the ability to highlight text -and define sub- and superscript using a simple syntax. Enable them together -via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.caret - - pymdownx.mark - - pymdownx.tilde -``` - -The configuration options of this extension are not specific to Material for -MkDocs, as they only impact the Markdown parsing stage. See the [Caret], [Mark] -and [Tilde documentation][Tilde] for guidance. - -See reference for usage: - -- [Highlighting text] -- [Sub- and superscripts] - - [Caret]: https://facelessuser.github.io/pymdown-extensions/extensions/caret/ - [Caret support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.0.0 - [Mark]: https://facelessuser.github.io/pymdown-extensions/extensions/mark/ - [Tilde]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/ - [Highlighting text]: ../../reference/formatting.md#highlighting-text - [Sub- and superscripts]: ../../reference/formatting.md#sub-and-superscripts - -### Critic - -[:octicons-tag-24: 1.0.0][Critic support] · -[:octicons-workflow-24: Extension][Critic] - -The [Critic] extension allows for the usage of [Critic Markup] to highlight -added, deleted or updated sections in a document, i.e. for tracking changes in -Markdown syntax. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.critic -``` - -The following configuration options are supported: - -[`mode`](#+pymdownx.critic.mode){ #+pymdownx.critic.mode } - -: :octicons-milestone-24: Default: `view` – This option defines how the markup - should be parsed, i.e. whether to just `view` all suggested changes, or - alternatively `accept` or `reject` them: - - === "View changes" - - ``` yaml - markdown_extensions: - - pymdownx.critic: - mode: view - ``` - - === "Accept changes" - - ``` yaml - markdown_extensions: - - pymdownx.critic: - mode: accept - ``` - - === "Reject changes" - - ``` yaml - markdown_extensions: - - pymdownx.critic: - mode: reject - ``` - -See reference for usage: - -- [Highlighting changes] - - [Critic]: https://facelessuser.github.io/pymdown-extensions/extensions/critic/ - [Critic support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.0.0 - [Critic Markup]: https://github.com/CriticMarkup/CriticMarkup-toolkit - [Highlighting changes]: ../../reference/formatting.md#highlighting-changes - -### Details - -[:octicons-tag-24: 1.9.0][Details support] · -[:octicons-workflow-24: Extension][Details] - -The [Details] extension supercharges the [Admonition] extension, making the -resulting _call-outs_ collapsible, allowing them to be opened and closed by the -user. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.details -``` - -No configuration options are available. See reference for usage: - -- [Collapsible blocks] - - [Details]: https://facelessuser.github.io/pymdown-extensions/extensions/details/ - [Details support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.9.0 - [Admonition]: python-markdown.md#admonition - [Collapsible blocks]: ../../reference/admonitions.md#collapsible-blocks - -### Emoji - -[:octicons-tag-24: 1.0.0][Emoji support] · -[:octicons-workflow-24: Extension][Emoji] - -The [Emoji] extension automatically inlines bundled and custom icons and emojis -in `*.svg` file format into the resulting HTML page. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji # (1)! - emoji_generator: !!python/name:materialx.emoji.to_svg -``` - -1. [Python Markdown Extensions] uses the `pymdownx` namespace, but in order to - support the inlining of icons, the `materialx` namespace must be used, as it - extends the functionality of `pymdownx`. - -The following configuration options are supported: - -[`emoji_index`](#+pymdownx.emoji.emoji_index){ #+pymdownx.emoji.emoji_index } - -: :octicons-milestone-24: Default: `emojione` – This option defines which set - of emojis is used for rendering. Note that the use of `emojione` is not - recommended due to [restrictions in licensing][Emoji index]: - - ``` yaml - markdown_extensions: - - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - ``` - -[`emoji_generator`](#+pymdownx.emoji.emoji_generator){ #+pymdownx.emoji.emoji_generator } - -: :octicons-milestone-24: Default: `to_png` – This option defines how the - resolved emoji or icon shortcode is render. Note that icons can only be - used together with the `to_svg` configuration: - - ``` yaml - markdown_extensions: - - pymdownx.emoji: - emoji_generator: !!python/name:materialx.emoji.to_svg - ``` - -[`options.custom_icons`](#+pymdownx.emoji.options.custom_icons){ #+pymdownx.emoji.options.custom_icons } - -: :octicons-milestone-24: Default: _none_ – This option allows to list folders - with additional icon sets to be used in Markdown or `mkdocs.yml`, which is - explained in more detail in the [icon customization guide]: - - ``` yaml - markdown_extensions: - - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg - options: - custom_icons: - - overrides/.icons - ``` - -The other configuration options of this extension are not officially supported -by Material for MkDocs, which is why they may yield unexpected results. Use -them at your own risk. - -See reference for usage: - -- [Using emojis] -- [Using icons] -- [Using icons in templates] - - [Emoji]: https://facelessuser.github.io/pymdown-extensions/extensions/emoji/ - [Emoji support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.0.0 - [Emoji index]: https://facelessuser.github.io/pymdown-extensions/extensions/emoji/#default-emoji-indexes - [icon customization guide]: ../changing-the-logo-and-icons.md#additional-icons - [Using emojis]: ../../reference/icons-emojis.md#using-emojis - [Using icons]: ../../reference/icons-emojis.md#using-icons - [Using icons in templates]: ../../reference/icons-emojis.md#using-icons-in-templates - -### Highlight - -[:octicons-tag-24: 5.0.0][Highlight support] · -[:octicons-workflow-24: Extension][Highlight] · -:octicons-zap-24: Supersedes [CodeHilite] - -The [Highlight] extension adds support for syntax highlighting of code blocks -(with the help of [SuperFences][pymdownx.superfences]) and inline code blocks -(with the help of [InlineHilite][pymdownx.inlinehilite]). Enable it via -`mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.highlight: - anchor_linenums: true - - pymdownx.superfences # (1)! -``` - -1. [Highlight] is used by the [SuperFences][pymdownx.superfences] extension to - perform syntax highlighting on code blocks, not the other way round, which - is why this extension also needs to be enabled. - -The following configuration options are supported: - -[`use_pygments`](#+pymdownx.highlight.use_pygments){ #+pymdownx.highlight.use_pygments } - -: :octicons-milestone-24: Default: `true` – This option allows to control - whether highlighting should be carried out during build time using - [Pygments] or in the browser with a JavaScript syntax highlighter: - - === "Pygments" - - ``` yaml - markdown_extensions: - - pymdownx.highlight: - use_pygments: true - - pymdownx.superfences - ``` - - === "JavaScript" - - ``` yaml - markdown_extensions: - - pymdownx.highlight: - use_pygments: false - ``` - - As an example, [Highlight.js], a JavaScript syntax highlighter, can be - integrated with some [additional JavaScript] and an [additional style - sheet] in `mkdocs.yml`: - - === ":octicons-file-code-16: `docs/javascripts/highlight.js`" - - ``` js - document$.subscribe(() => { - hljs.highlightAll() - }) - ``` - - === ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_javascript: - - https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js - - javascripts/highlight.js - extra_css: - - https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/default.min.css - ``` - - Note that [Highlight.js] has no affiliation with the - [Highlight][pymdownx.highlight] extension. - - All following configuration options are only compatible with build-time - syntax highlighting using [Pygments], so they don't apply if `use_pygments` - is set to `false`. - -[`auto_title`](#+pymdownx.highlight.auto_title){ #+pymdownx.highlight.auto_title } - -: :octicons-milestone-24: Default: `false` – This option will automatically - add a [title] to all code blocks that shows the name of the language being - used, e.g. `Python` is printed for a `py` block: - - ``` yaml - markdown_extensions: - - pymdownx.highlight: - auto_title: true - ``` - -[`linenums`](#+pymdownx.highlight.linenums){ #+pymdownx.highlight.linenums } - -: :octicons-milestone-24: Default: `false` – This option will add line numbers - to _all_ code blocks. If you wish to add line numbers to _some_, but not all - code blocks, consult the section on [adding line numbers][Adding line - numbers] in the code block reference, which also contains some tips on - working with line numbers: - - ``` yaml - markdown_extensions: - - pymdownx.highlight: - linenums: true - ``` - -[`linenums_style`](#+pymdownx.highlight.linenums_style){ #+pymdownx.highlight.linenums_style } - -: :octicons-milestone-24: Default: `table` – The [Highlight] extension - provides three ways to add line numbers, two of which are supported by - Material for MkDocs. While `table` wraps a code block in a `<table>` - element, `pymdownx-inline` renders line numbers as part of the line itself: - - ``` yaml - markdown_extensions: - - pymdownx.highlight: - linenums_style: pymdownx-inline - ``` - - Note that `inline` will put line numbers next to the actual code, which - means that they will be included when selecting text with the cursor or - copying a code block to the clipboard. Thus, the usage of either `table` - or `pymdownx-inline` is recommended. - -[`anchor_linenums`](#+pymdownx.highlight.anchor_linenums){ #+pymdownx.highlight.anchor_linenums } - -: [:octicons-tag-24: 8.1.0][anchor_linenums support] · :octicons-milestone-24: - Default: `false` – If a code blocks contains line numbers, enabling this - setting will wrap them with anchor links, so they can be hyperlinked and - shared more easily: - - ``` yaml - markdown_extensions: - - pymdownx.highlight: - anchor_linenums: true - ``` - -The other configuration options of this extension are not officially supported -by Material for MkDocs, which is why they may yield unexpected results. Use -them at your own risk. - -See reference for usage: - -- [Using code blocks] -- [Adding a title] -- [Adding line numbers] -- [Highlighting specific lines] -- [Custom syntax theme] - - [Highlight]: https://facelessuser.github.io/pymdown-extensions/extensions/highlight/ - [Highlight support]: https://github.com/squidfunk/mkdocs-material/releases/tag/5.0.0 - [CodeHilite]: python-markdown.md#codehilite - [pymdownx.superfences]: #superfences - [pymdownx.inlinehilite]: #inlinehilite - [Pygments]: https://pygments.org - [additional style sheet]: ../../customization.md#additional-css - [Highlight.js]: https://highlightjs.org/ - [title]: ../../reference/code-blocks.md#adding-a-title - [anchor_linenums support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.1.0 - [Adding line numbers]: ../../reference/code-blocks.md#adding-line-numbers - [Using code blocks]: ../../reference/code-blocks.md#usage - [Adding a title]: ../../reference/code-blocks.md#adding-a-title - [Highlighting specific lines]: ../../reference/code-blocks.md#highlighting-specific-lines - [Custom syntax theme]: ../../reference/code-blocks.md#custom-syntax-theme - -### InlineHilite - -[:octicons-tag-24: 5.0.0][InlineHilite support] · -[:octicons-workflow-24: Extension][InlineHilite] - -The [InlineHilite] extension add support for syntax highlighting of inline code -blocks. It's built on top of the [Highlight][pymdownx.highlight] extension, from -which it sources its configuration. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.highlight - - pymdownx.inlinehilite -``` - -The configuration options of this extension are not specific to Material for -MkDocs, as they only impact the Markdown parsing stage. The only exception is -the [`css_class`][InlineHilite options] option, which must not be changed. See the -[InlineHilite documentation][InlineHilite] for guidance. - -See reference for usage: - -- [Highlighting inline code blocks] - - [InlineHilite]: https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/ - [InlineHilite support]: https://github.com/squidfunk/mkdocs-material/releases/tag/5.0.0 - [InlineHilite options]: https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/#options - [pymdownx.highlight]: #highlight - [Highlighting inline code blocks]: ../../reference/code-blocks.md#highlighting-inline-code-blocks - -### Keys - -[:octicons-tag-24: 1.0.0][Keys support] · -[:octicons-workflow-24: Extension][Keys] - -The [Keys] extension adds a simple syntax to allow for the rendering of keyboard -keys and combinations, e.g. ++ctrl+alt+del++. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.keys -``` - -The configuration options of this extension are not specific to Material for -MkDocs, as they only impact the Markdown parsing stage. The only exception is -the [`class`][Keys options] option, which must not be changed. See the -[Keys documentation][Keys] for more information. - -See reference for usage: - -- [Adding keyboard keys] - - [Keys]: https://facelessuser.github.io/pymdown-extensions/extensions/keys/ - [Keys support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.0.0 - [Keys options]: https://facelessuser.github.io/pymdown-extensions/extensions/keys/#options - [Adding keyboard keys]: ../../reference/formatting.md#adding-keyboard-keys - -### SmartSymbols - -[:octicons-tag-24: 0.1.0][SmartSymbols support] · -[:octicons-workflow-24: Extension][SmartSymbols] - -The [SmartSymbols] extension converts some sequences of characters into their -corresponding symbols, e.h. copyright symbols or fractions. Enable it via -`mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.smartsymbols -``` - -The configuration options of this extension are not specific to Material for -MkDocs, as they only impact the Markdown parsing stage. See the [SmartSymbols -documentation][SmartSymbols] for guidance. - - [SmartSymbols]: https://facelessuser.github.io/pymdown-extensions/extensions/smartsymbols/ - [SmartSymbols support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - -### Snippets - -[:octicons-tag-24: 0.1.0][Snippets support] · -[:octicons-workflow-24: Extension][Snippets] - -The [Snippets] extension adds the ability to embed content from arbitrary files -into a document, including other documents or source files, by using a simple -syntax. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.snippets -``` - -The configuration options of this extension are not specific to Material for -MkDocs, as they only impact the Markdown parsing stage. See the [Snippets -documentation][Snippets] for more information. - -See reference for usage: - -- [Adding a glossary] -- [Embedding external files] - - [Snippets]: https://facelessuser.github.io/pymdown-extensions/extensions/snippets/ - [Snippets support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [Adding a glossary]: ../../reference/tooltips.md#adding-a-glossary - [Embedding external files]: ../../reference/code-blocks.md#embedding-external-files - -### SuperFences - -[:octicons-tag-24: 0.1.0][SuperFences support] · -[:octicons-workflow-24: Extension][SuperFences] · -:octicons-zap-24: Supersedes [Fenced Code Blocks] - -The [SuperFences] extension allows for arbitrary nesting of code and content -blocks inside each other, including admonitions, tabs, lists and all other -elements. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.superfences -``` - -The following configuration options are supported: - -[`custom_fences`](#+pymdownx.superfences.custom_fences){ #+pymdownx.superfences.custom_fences } - -: :octicons-milestone-24: Default: _none_ – This option allows to define a - handler for custom fences, e.g. to preserve the definitions of [Mermaid.js] - diagrams to be interpreted in the browser: - - ``` yaml - markdown_extensions: - - pymdownx.superfences: - custom_fences: - - name: mermaid - class: mermaid - format: !!python/name:pymdownx.superfences.fence_code_format - ``` - - Note that this will primarily prevent syntax highlighting from being - applied. See the reference on [diagrams] to learn how Mermaid.js is - integrated with Material for MkDocs. - -The other configuration options of this extension are not officially supported -by Material for MkDocs, which is why they may yield unexpected results. Use -them at your own risk. - -See reference for usage: - -- [Using annotations] -- [Using code blocks] -- [Using content tabs] -- [Using flowcharts] -- [Using sequence diagrams] -- [Using state diagrams] -- [Using class diagrams] -- [Using entity-relationship diagrams] - - [SuperFences]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/ - [SuperFences support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [Fenced Code Blocks]: python-markdown.md#fenced-code-blocks - [Mermaid.js]: https://mermaid-js.github.io/mermaid/ - [diagrams]: ../../reference/diagrams.md - [Using annotations]: ../../reference/annotations.md#usage - [Using content tabs]: ../../reference/content-tabs.md#usage - [Using flowcharts]: ../../reference/diagrams.md#using-flowcharts - [Using sequence diagrams]: ../../reference/diagrams.md#using-sequence-diagrams - [Using state diagrams]: ../../reference/diagrams.md#using-state-diagrams - [Using class diagrams]: ../../reference/diagrams.md#using-class-diagrams - [Using entity-relationship diagrams]: ../../reference/diagrams.md#using-entity-relationship-diagrams - -### Tabbed - -[:octicons-tag-24: 5.0.0][Tabbed support] · -[:octicons-workflow-24: Extension][Tabbed] - -The [Tabbed] extension allows the usage of content tabs, a simple way to group -related content and code blocks under accessible tabs. Enable it via -`mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.tabbed: - alternate_style: true -``` - -The following configuration options are supported: - -[`alternate_style`](#+pymdownx.tabbed.alternate_style){ #+pymdownx.tabbed.alternate_style } - -: [:octicons-tag-24: 7.3.1][Tabbed alternate support] · - :octicons-milestone-24: Default: `false` · :octicons-alert-24: __Required__ - – This option enables the content tabs [alternate style], which has - [better behavior on mobile viewports], and is the only supported style: - - ``` yaml - markdown_extensions: - - pymdownx.tabbed: - alternate_style: true - ``` - -[`slugify`](#+pymdownx.tabbed.slugify){ #+pymdownx.tabbed.slugify } - -: :octicons-milestone-24: Default: `headerid.slugify` – This option allows for - customization of the slug function. For some languages, the default may not - produce good and readable identifiers – consider using another slug function - like for example those from [Python Markdown Extensions][Slugs]: - - === "Unicode" - - ``` yaml - markdown_extensions: - - pymdownx.tabbed: - slugify: !!python/object/apply:pymdownx.slugs.slugify - kwds: - case: lower - ``` - - === "Unicode, case-sensitive" - - ``` yaml - markdown_extensions: - - pymdownx.tabbed: - slugify: !!python/object/apply:pymdownx.slugs.slugify - ``` - -The other configuration options of this extension are not officially supported -by Material for MkDocs, which is why they may yield unexpected results. Use -them at your own risk. - -See reference for usage: - -- [Grouping code blocks] -- [Grouping other content] -- [Embedded content] - - [Tabbed]: https://facelessuser.github.io/pymdown-extensions/extensions/tabbed/ - [Tabbed support]: https://github.com/squidfunk/mkdocs-material/releases/tag/5.0.0 - [Tabbed alternate support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.3.1 - [alternate style]: https://facelessuser.github.io/pymdown-extensions/extensions/tabbed/#alternate-style - [better behavior on mobile viewports]: https://twitter.com/squidfunk/status/1424740370596958214 - [Grouping code blocks]: ../../reference/content-tabs.md#grouping-code-blocks - [Grouping other content]: ../../reference/content-tabs.md#grouping-other-content - [Embedded content]: ../../reference/content-tabs.md#embedded-content - [Slugs]: https://facelessuser.github.io/pymdown-extensions/extras/slugs/ - -### Tasklist - -[:octicons-tag-24: 1.0.0][Tasklist support] · -[:octicons-workflow-24: Extension][Tasklist] - -The [Tasklist] extension allows for the usage of [GitHub Flavored Markdown] -inspired [task lists][Tasklist specification], following the same syntactical -conventions. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - pymdownx.tasklist: - custom_checkbox: true -``` - -The following configuration options are supported: - -[`custom_checkbox`](#+pymdownx.tasklist.custom_checkbox){ #+pymdownx.tasklist.custom_checkbox } - -: :octicons-milestone-24: Default: `false` · This option toggles the rendering - style of checkboxes, replacing native checkbox styles with beautiful icons, - and is therefore recommended: - - ``` yaml - markdown_extensions: - - pymdownx.tasklist: - custom_checkbox: true - ``` - -[`clickable_checkbox`](#+pymdownx.tasklist.clickable_checkbox){ #+pymdownx.tasklist.clickable_checkbox } - -: :octicons-milestone-24: Default: `false` · This option toggles whether - checkboxes are clickable. As the state is not persisted, the use of this - option is _rather discouraged_ from a user experience perspective: - - ``` yaml - markdown_extensions: - - pymdownx.tasklist: - clickable_checkbox: true - ``` - -The other configuration options of this extension are not officially supported -by Material for MkDocs, which is why they may yield unexpected results. Use -them at your own risk. - -See reference for usage: - -- [Using task lists] - - [Tasklist]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/ - [Tasklist support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.0.0 - [GitHub Flavored Markdown]: https://github.github.com/gfm/ - [Tasklist specification]: https://github.github.com/gfm/#task-list-items-extension- - [Using task lists]: ../../reference/lists.md#using-task-lists diff --git a/docs/setup/extensions/python-markdown.md b/docs/setup/extensions/python-markdown.md deleted file mode 100644 index 0c581b6a7b6c144635b488d4b6c537c7bc084a07..0000000000000000000000000000000000000000 --- a/docs/setup/extensions/python-markdown.md +++ /dev/null @@ -1,358 +0,0 @@ -# Python Markdown - -Material for MkDocs supports a large number of [Python Markdown] extensions, -which is part of what makes it so attractive for technical writing. Following -is a list of all supported extensions, linking to the relevant sections of the -reference for which features they need to be enabled. - - [Python Markdown]: https://python-markdown.github.io/ - -## Supported extensions - -### Abbreviations - -[:octicons-tag-24: 1.0.0][Abbreviations support] · -[:octicons-workflow-24: Extension][Abbreviations] - -The [Abbreviations] extension adds the ability to add a small tooltip to an -element, by wrapping it with an `abbr` tag. Only plain text (no markup) is -supported. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - abbr -``` - -No configuration options are available. See reference for usage: - -- [Adding abbreviations] -- [Adding a glossary] - - [Abbreviations]: https://python-markdown.github.io/extensions/abbreviations/ - [Abbreviations support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.0.0 - [Adding abbreviations]: ../../reference/tooltips.md#adding-abbreviations - [Adding a glossary]: ../../reference/tooltips.md#adding-a-glossary - -### Admonition - -[:octicons-tag-24: 0.1.0][Admonition support] · -[:octicons-workflow-24: Extension][Admonition] - -The [Admonition] extension adds support for admonitions, more commonly known as -_call-outs_, which can be defined in Markdown by using a simple syntax. Enable -it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - admonition -``` - -No configuration options are available. See reference for usage: - -- [Adding admonitions] -- [Changing the title] -- [Removing the title] -- [Supported types] - - [Admonition]: https://python-markdown.github.io/extensions/admonition/ - [Admonition support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [Adding admonitions]: ../../reference/admonitions.md#usage - [Changing the title]: ../../reference/admonitions.md#changing-the-title - [Removing the title]: ../../reference/admonitions.md#removing-the-title - [Supported types]: ../../reference/admonitions.md#supported-types - -### Attribute Lists - -[:octicons-tag-24: 0.1.0][Attribute Lists support] · -[:octicons-workflow-24: Extension][Attribute Lists] - -The [Attribute Lists] extension allows to add HTML attributes and CSS classes -to [almost every][Attribute Lists limitations] Markdown inline- and block-level -element with a special syntax. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - attr_list -``` - -No configuration options are available. See reference for usage: - -- [Using annotations] -- [Using grids] -- [Adding buttons] -- [Adding tooltips] -- [Using icons with colors] -- [Using icons with animations] -- [Image alignment] -- [Image lazy-loading] - - [Attribute Lists]: https://python-markdown.github.io/extensions/attr_list/ - [Attribute Lists support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [Attribute Lists limitations]: https://python-markdown.github.io/extensions/attr_list/#limitations - [Using grids]: ../../reference/grids.md#using-grids - [Adding buttons]: ../../reference/buttons.md#adding-buttons - [Adding tooltips]: ../../reference/tooltips.md#adding-tooltips - [Using icons with colors]: ../../reference/icons-emojis.md#with-colors - [Using icons with animations]: ../../reference/icons-emojis.md#with-animations - [Image alignment]: ../../reference/images.md#image-alignment - [Image lazy-loading]: ../../reference/images.md#image-lazy-loading - -### Definition Lists - -[:octicons-tag-24: 1.1.0][Definition Lists support] · -[:octicons-workflow-24: Extension][Definition Lists] - -The [Definition Lists] extension adds the ability to add definition lists (more -commonly known as [description lists] – `dl` in HTML) via Markdown to a -document. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - def_list -``` - -No configuration options are available. See reference for usage: - -- [Using definition lists] - - [Definition Lists]: https://python-markdown.github.io/extensions/definition_lists/ - [Definition Lists support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.1.0 - [description lists]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl - [Using definition lists]: ../../reference/lists.md#using-definition-lists - -### Footnotes - -[:octicons-tag-24: 1.0.0][Footnotes support] · -[:octicons-workflow-24: Extension][Footnotes] - -The [Footnotes] extension allows to define inline footnotes, which are then -rendered below all Markdown content of a document. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - footnotes -``` - -No configuration options are supported. See reference for usage: - -- [Adding footnote references] -- [Adding footnote content] - - [Footnotes]: https://python-markdown.github.io/extensions/footnotes/ - [Footnotes support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.0.0 - [Adding footnote references]: ../../reference/footnotes.md#adding-footnote-references - [Adding footnote content]: ../../reference/footnotes.md#adding-footnote-content - -### Markdown in HTML - -[:octicons-tag-24: 0.1.0][Markdown in HTML support] · -[:octicons-workflow-24: Extension][Markdown in HTML] - -The [Markdown in HTML] extension allows for writing Markdown inside of HTML, -which is useful for wrapping Markdown content with custom elements. Enable it -via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - md_in_html -``` - -> By default, Markdown ignores any content within a raw HTML block-level -> element. With the `md_in_html` extension enabled, the content of a raw HTML -> block-level element can be parsed as Markdown by including a `markdown` -> attribute on the opening tag. The `markdown` attribute will be stripped from -> the output, while all other attributes will be preserved. - -No configuration options are available. See reference for usage: - -- [Using annotations] -- [Using grids] -- [Image captions] - - [Markdown in HTML]: https://python-markdown.github.io/extensions/md_in_html/ - [Markdown in HTML support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [Using annotations]: ../../reference/annotations.md#usage - [Using grids]: ../../reference/grids.md#usage - [Image captions]: ../../reference/images.md#image-captions - -### Table of Contents - -[:octicons-tag-24: 0.1.0][Table of Contents support] · -[:octicons-workflow-24: Extension][Table of Contents] - -The [Table of Contents] extension automatically generates a table of contents -from a document, which Material for MkDocs will render as part of the resulting -page. Enable it via `mkdocs.yml`: - -``` yaml -markdown_extensions: - - toc: - permalink: true -``` - -The following configuration options are supported: - -[`title`](#+toc.title){ #+toc.title } - -: [:octicons-tag-24: 7.3.5][title support] · - :octicons-milestone-24: Default: _automatically set_ – This option sets the - title of the table of contents in the right navigation sidebar, which is - normally automatically sourced from the translations for the [site language] - as set in `mkdocs.yml`: - - ``` yaml - markdown_extensions: - - toc: - title: On this page - ``` - -[`permalink`](#+toc.permalink){ #+toc.permalink } - -: :octicons-milestone-24: Default: `false` – This option adds an anchor link - containing the paragraph symbol `¶` or another custom symbol at the end of - each headline, exactly like on the page you're currently viewing, which - Material for MkDocs will make appear on hover: - - === "¶" - - ``` yaml - markdown_extensions: - - toc: - permalink: true - ``` - - === "⚓︎" - - ``` yaml - markdown_extensions: - - toc: - permalink: ⚓︎ - ``` - -[`permalink_title`](#+toc.permalink_title){ #+toc.permalink_title } - -: :octicons-milestone-24: Default: `Permanent link` – This option sets the - title of the anchor link which is shown on hover and read by screen readers. - For accessibility reasons, it might be beneficial to change it to a more - discernable name, stating that the anchor links to the section itself: - - ``` yaml - markdown_extensions: - - toc: - permalink_title: Anchor link to this section for reference - ``` - -[`slugify`](#+toc.slugify){ #+toc.slugify } - -: :octicons-milestone-24: Default: `headerid.slugify` – This option allows for - customization of the slug function. For some languages, the default may not - produce good and readable identifiers – consider using another slug function - like for example those from [Python Markdown Extensions][Slugs]: - - === "Unicode" - - ``` yaml - markdown_extensions: - - toc: - slugify: !!python/object/apply:pymdownx.slugs.slugify - kwds: - case: lower - ``` - - === "Unicode, case-sensitive" - - ``` yaml - markdown_extensions: - - toc: - slugify: !!python/object/apply:pymdownx.slugs.slugify - ``` - -[`toc_depth`](#+toc.toc_depth){ #+toc.toc_depth } - -: :octicons-milestone-24: Default: `6` – Define the range of levels to be - included in the table of contents. This may be useful for project - documentation with deeply structured headings to decrease the length of the - table of contents, or to remove the table of contents altogether: - - === "Hide levels 4-6" - - ``` yaml - markdown_extensions: - - toc: - toc_depth: 3 - ``` - - === "Hide table of contents" - - ``` yaml - markdown_extensions: - - toc: - toc_depth: 0 - ``` - -The other configuration options of this extension are not officially supported -by Material for MkDocs, which is why they may yield unexpected results. Use -them at your own risk. - - [Table of Contents]: https://python-markdown.github.io/extensions/toc/ - [Table of Contents support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [title support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.3.5 - [site language]: ../changing-the-language.md#site-language - [Slugs]: https://facelessuser.github.io/pymdown-extensions/extras/slugs/ - -### Tables - -[:octicons-tag-24: 0.1.0][Tables support] · -[:octicons-workflow-24: Extension][Tables] - -The [Tables] extension adds the ability to create tables in Markdown by using a -simple syntax. Enable it via `mkdocs.yml` (albeit it should be enabled by -default): - -``` yaml -markdown_extensions: - - tables -``` - -No configuration options are available. See reference for usage: - -- [Using data tables] -- [Column alignment] - - [Tables]: https://python-markdown.github.io/extensions/tables/ - [Tables support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [Using data tables]: ../../reference/data-tables.md#usage - [Column alignment]: ../../reference/data-tables.md#column-alignment - -## Superseded extensions - -The following [Python Markdown] extensions are not (or might not be) supported -anymore, and are therefore not recommended for use. Instead, the alternatives -should be considered. - -### Fenced Code Blocks - -[:octicons-tag-24: 0.1.0][Fenced Code Blocks support] · -[:octicons-workflow-24: Extension][Fenced Code Blocks] - -Superseded by [SuperFences]. This extension might still work, but the -[SuperFences] extension is superior in many ways, as it allows for arbitrary -nesting, and is therefore recommended. - - [Fenced Code Blocks]: https://python-markdown.github.io/extensions/fenced_code_blocks/ - [Fenced Code Blocks support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [SuperFences]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/ - -### CodeHilite - -[:octicons-tag-24: 0.1.0 ... 5.5.14][CodeHilite support] · -[:octicons-workflow-24: Extension][CodeHilite] - -Superseded by [Highlight]. Support for CodeHilite was dropped in -:octicons-tag-24: 6.0.0, as [Highlight] has a better integration with other -essential extensions like [SuperFences] and [InlineHilite]. - - [CodeHilite]: https://python-markdown.github.io/extensions/code_hilite/ - [CodeHilite support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [Highlight]: https://facelessuser.github.io/pymdown-extensions/extensions/highlight/ - [InlineHilite]: https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/ diff --git a/docs/setup/setting-up-a-blog.md b/docs/setup/setting-up-a-blog.md deleted file mode 100644 index ff869fca9e0f67226dbc3a64c13067bf23070f75..0000000000000000000000000000000000000000 --- a/docs/setup/setting-up-a-blog.md +++ /dev/null @@ -1,1337 +0,0 @@ -# Setting up a blog - -Material for MkDocs makes it very easy to build a blog, either as a sidecar to -your documentation or standalone. Focus on your content while the engine does -all the heavy lifting, automatically generating [archive] and [category] -indexes, [post slugs], configurable [pagination] and more. - ---- - -__Check out our [blog], which is created with the new [built-in blog plugin]!__ - - [archive]: #archive - [category]: #categories - [post slugs]: #+blog.post_url_format - [pagination]: #pagination - [blog]: ../blog/index.md - -## Configuration - -### Built-in blog plugin - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.23.0][Insiders] · -:octicons-cpu-24: Plugin · -:octicons-beaker-24: Experimental - -The built-in blog plugin adds support for building a blog from a folder of -posts, which are annotated with dates and other structured data. First, add the -following lines to `mkdocs.yml`: - -``` yaml -plugins: - - blog -``` - -> If you need to be able to build your documentation with and without -> [Insiders], please refer to the [built-in plugins] section to learn how -> shared configurations help to achieve this. - -By default, the built-in blog plugin assumes that your blog is hosted inside -the `blog` subfolder of your documentation ([this is configurable]). Next, -you need to create the following structure: - -``` { .sh .no-copy } -. -├─ docs/ -│ └─ blog/ -│ ├─ posts/ -│ └─ index.md -└─ mkdocs.yml -``` - -Since the built-in blog plugin auto-generates [archive] and [category] indexes, -it must know where to add those to the navigation. Thus, make sure to add a -`blog/index.md` file in `mkdocs.yml`: - -``` yaml -nav: - - Blog: - - blog/index.md # (1)! -``` - -1. Within this file, you can specify the title of your blog, which is then - picked up and used by the built-in blog plugin: - - ``` markdown - # Blog - ``` - -The following configuration options are available: - -[`enabled`](#+blog.enabled){ #+blog.enabled } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - the plugin is enabled when building your project. If you want to speed up - local builds, you can use an [environment variable]: - - ``` yaml - plugins: - - blog: - enabled: !ENV [CI, false] - ``` - -[`blog_dir`](#+blog.blog_dir){ #+blog.blog_dir } - -: :octicons-milestone-24: Default: `blog` – This option specifies the folder - where your posts and metadata live. The name of the folder will also be - included in the generated URLs as a prefix to all blog-related pages. If - you want to build a standalone blog, change it to `.`: - - === "Subdirectory" - - ``` yaml - plugins: - - blog: - blog_dir: path/to/folder - ``` - - === "Standalone" - - ``` yaml - plugins: - - blog: - blog_dir: . - ``` - - The path must be defined relative to [`docs_dir`][docs_dir]. - -__The built-in blog plugin has dozens of options that allow for advanced -configuration. It's a good idea to [start writing your first post], and come -back here later for fine-tuning the output.__ - ---- - - [Insiders]: ../insiders/index.md - [built-in plugins]: ../insiders/getting-started.md#built-in-plugins - [this is configurable]: #+blog.blog_dir - [environment variable]: https://www.mkdocs.org/user-guide/configuration/#environment-variables - [docs_dir]: https://www.mkdocs.org/user-guide/configuration/#docs_dir - [start writing your first post]: #writing-your-first-post - -#### Posts - -The following configuration options are available for posts: - -[`post_date_format`](#+blog.post_date_format){ #+blog.post_date_format } - -: :octicons-milestone-24: Default: `long` – This option specifies the date - format that is used when posts are rendered. Under the hood, the - [built-in blog plugin] leverages [Babel] to render dates locale-aware using - the configured [site language]. The following formats are supported: - - === "Monday, January 31, 2022" - - ``` yaml - plugins: - - blog: - post_date_format: full - ``` - - === "January 31, 2022" - - ``` yaml - plugins: - - blog: - post_date_format: long - ``` - - === "Jan 31, 2022" - - ``` yaml - plugins: - - blog: - post_date_format: medium - ``` - - === "1/31/22" - - ``` yaml - plugins: - - blog: - post_date_format: short - ``` - - Note that depending on the [site language], formats might look different - for other languages. Additionally, [Babel] supports a [pattern syntax] - which allows for custom formats. - -[`post_url_date_format`](#+blog.post_url_date_format){ #+blog.post_url_date_format } - -: :octicons-milestone-24: Default: `yyyy/MM/dd` – This option specifies the - date format that is used in the URL of the post. The format string must - adhere to [Babel]'s [pattern syntax]. Some examples: - - === ":material-link: blog/2022/01/31/:material-dots-horizontal:/" - - ``` yaml - plugins: - - blog: - post_url_date_format: yyyy/MM/dd - ``` - - === ":material-link: blog/2022/01/:material-dots-horizontal:/" - - ``` yaml - plugins: - - blog: - post_url_date_format: yyyy/MM - ``` - - === ":material-link: blog/2022/:material-dots-horizontal:/" - - ``` yaml - plugins: - - blog: - post_url_date_format: yyyy - ``` - - If you want to exclude the date altogether, e.g. when your blog features - mostly evergreen content, you can remove the `date` placeholder from - the format string (see below). - -[`post_url_format`](#+blog.post_url_format){ #+blog.post_url_format } - -: :octicons-milestone-24: Default: `{date}/{slug}` – This option specifies the - format string that is used for the URL of the post. The following - placeholders are currently supported: - - - `categories` – Replaced with the post's slugified [categories]. - - - `date` – Replaced with the post's date, as configured in - [`post_url_date_format`][post_url_date_format]. - - - `slug` – Replaced with a slug generated from the post's title. - - - `file` – Replaced with the post's file name. - - === ":material-link: blog/2022/:material-dots-horizontal:/" - - ``` yaml - plugins: - - blog: - post_url_format: "{date}/{slug}" - ``` - - === ":material-link: blog/:material-dots-horizontal:/" - - ``` yaml - plugins: - - blog: - post_url_format: "{slug}" - ``` - - If you remove the `date` placeholder, make sure that post URLs don't - collide with other the URLs of other pages added to the blog section, as - this leads to undefined behavior. - -[`post_url_max_categories`](#+blog.post_url_max_categories){ #+blog.post_url_max_categories } - -: :octicons-milestone-24: Default: `1` – This option specifies the number of - categories that are included in the URL if the `categories` placeholder is - part of [`post_url_format`][post slugs]. If a post is assigned to multiple - categories, they are joined with `/`: - - ``` yaml - plugins: - - blog: - post_url_format: "{categories}/{slug}" - post_url_max_categories: 2 - ``` - -[`post_slugify`](#+blog.post_slugify){ #+blog.post_slugify } - -: :octicons-milestone-24: Default: `headerid.slugify` – This option specifies - which function to use for generating URL-compatible slugs from post titles. - [Python Markdown Extensions] comes with several Unicode-aware - slug functions which should be a good choice for non-ASCII languages: - - === "Unicode" - - ``` yaml - plugins: - - blog: - post_slugify: !!python/object/apply:pymdownx.slugs.slugify - kwds: - case: lower - ``` - - === "Unicode, case-sensitive" - - ``` yaml - plugins: - - blog: - post_slugify: !!python/object/apply:pymdownx.slugs.slugify - ``` - -[`post_slugify_separator`](#+blog.post_slugify_separator){ #+blog.post_slugify_separator } - -: :octicons-milestone-24: Default: `-` – This option specifies the separator - which is used by the slug function. By default, a hyphen is used, but it can - be changed to any string, including the empty string: - - ``` yaml - plugins: - - blog: - post_slugify_separator: "-" - ``` - -[`post_excerpt`](#+blog.post_excerpt){ #+blog.post_excerpt } - -: :octicons-milestone-24: Default: `optional` – This option specifies whether - [post excerpts] should be considered being optional or required by the - [built-in blog plugin] when generating indexes. If excerpts are required, - the plugin terminates with an error if a post doesn't define an excerpt: - - === "Optional" - - ``` yaml - plugins: - - blog: - post_excerpt: optional - ``` - - === "Required" - - ``` yaml - plugins: - - blog: - post_excerpt: required - ``` - -[`post_excerpt_max_authors`](#+blog.post_excerpt_max_authors){ #+blog.post_excerpt_max_authors } - -: :octicons-milestone-24: Default: `1` – This option specifies the number of - authors rendered in post excerpts. While each post may be written by - multiple authors, this setting allows to limit the display to just a few or - even a single author, or disable authors in excerpts altogether: - - === "Render up to 2 authors in excerpts" - - ``` yaml - plugins: - - blog: - post_excerpt_max_authors: 2 - ``` - - === "Disable authors in excerpts" - - ``` yaml - plugins: - - blog: - post_excerpt_max_authors: 0 - ``` - -[`post_excerpt_max_categories`](#+blog.post_excerpt_max_categories){ #+blog.post_excerpt_max_categories } - -: :octicons-milestone-24: Default: `5` – This option specifies the number of - categories rendered in post excerpts. While each post may be assigned to - multiple categories, the [built-in blog plugin] can be instructed to only - show the first `n` categories to keep it short and concise: - - === "Render up to 2 categories in excerpts" - - ``` yaml - plugins: - - blog: - post_excerpt_max_categories: 2 - ``` - - === "Disable categories in excerpts" - - ``` yaml - plugins: - - blog: - post_excerpt_max_categories: 0 - ``` - -[`post_excerpt_separator`](#+blog.post_excerpt_separator){ #+blog.post_excerpt_separator } - -: :octicons-milestone-24: Default: `<!-- more -->` – This option specifies - the separator the [built-in blog plugin] will look for in a post's content - when generating [post excerpts]. All content after the separator is not - considered to be part of the excerpt. - -[`post_readtime`](#+blog.post_readtime){ #+blog.post_readtime } - -: :octicons-milestone-24: Default: `true` – This option specifies whether the - [built-in blog plugin] should compute the reading time of a post - automatically, which is then rendered in post excerpts, as well as in the - posts themselves. If you want to disable reading time computation, add: - - ``` yaml - plugins: - - blog: - post_readtime: false - ``` - -[`post_readtime_words_per_minute`](#+blog.post_readtime_words_per_minute){ #+blog.post_readtime_words_per_minute } - -: :octicons-milestone-24: Default: `265` – This option specifies the number - of words that a reader is expected to read per minute when computing the - reading time of a post. If you feel that estimation is not quite right, - you can fine-tune reading time computation with the following setting: - - ``` yaml - plugins: - - blog: - post_readtime_words_per_minute: 265 - ``` - - [built-in blog plugin]: #built-in-blog-plugin - [site language]: changing-the-language.md#site-language - [Babel]: https://pypi.org/project/Babel/ - [pattern syntax]: https://babel.pocoo.org/en/latest/dates.html#pattern-syntax - [post_url_date_format]: #+blog.post_url_date_format - [post excerpts]: #adding-an-excerpt - [Python Markdown Extensions]: https://facelessuser.github.io/pymdown-extensions/extras/slugs/ - -#### Archive - -The following configuration options are available for archive index generation: - -[`archive`](#+blog.archive){ #+blog.archive } - -: :octicons-milestone-24: Default: `true` – This option specifies whether the - [built-in blog plugin] should generate archive indexes. An archive indexes - shows all posts for a specific interval (e.g. year, month, etc.) in - reverse chronological order. If you want to disable archive index - generation, add: - - ``` yaml - plugins: - - blog: - archive: false - ``` - -[`archive_name`](#+blog.archive_name){ #+blog.archive_name } - -: :octicons-milestone-24: Default: _automatically set_ – This option specifies - the title of the archive section which the [built-in blog plugin] will - generate and add to the navigation. If this setting is omitted, it's - sourced from the translations, falling back to English. Change it with: - - ``` yaml - plugins: - - blog: - archive_name: Archive - ``` - -[`archive_date_format`](#+blog.archive_date_format){ #+blog.archive_date_format } - -: :octicons-milestone-24: Default: `yyyy` – This option specifies the date - format that is used when archive indexes are rendered. The format string - must adhere to [Babel]'s [pattern syntax]. Popular settings are: - - === "2022" - - ``` yaml - plugins: - - blog: - archive_date_format: yyyy - ``` - - === "January 2022" - - ``` yaml - plugins: - - blog: - archive_date_format: MMMM yyyy - ``` - -[`archive_url_date_format`](#+blog.archive_url_date_format){ #+blog.archive_url_date_format } - -: :octicons-milestone-24: Default: `yyyy` – This option specifies the date - format that is used in the archive index URL. The format string must adhere - to [Babel]'s [pattern syntax]. Some examples: - - === ":material-link: blog/archive/2022/" - - ``` yaml - plugins: - - blog: - archive_url_date_format: yyyy - ``` - - === ":material-link: blog/archive/2022/01/" - - ``` yaml - plugins: - - blog: - archive_url_date_format: yyyy/MM - ``` - -[`archive_url_format`](#+blog.archive_url_format){ #+blog.archive_url_format } - -: :octicons-milestone-24: Default: `archive/{date}` – This option specifies - the format string that is used for the URL of the archive index, and can - be used to localize the URL: - - === ":material-link: blog/archive/2022/" - - ``` yaml - plugins: - - blog: - archive_url_format: "archive/{date}" - ``` - - === ":material-link: blog/2022/" - - ``` yaml - plugins: - - blog: - archive_url_format: "{date}" - ``` - -#### Categories - -The following configuration options are available for category index generation: - -[`categories`](#+blog.categories){ #+blog.categories } - -: :octicons-milestone-24: Default: `true` – This option specifies whether the - [built-in blog plugin] should generate category indexes. A category index - shows all posts for a specific category in reverse chronological order. If - you want to disable category index generation, add: - - ``` yaml - plugins: - - blog: - categories: false - ``` - -[`categories_name`](#+blog.categories_name){ #+blog.categories_name } - -: :octicons-milestone-24: Default: _automatically set_ – This option specifies - the title of the category section which the [built-in blog plugin] will - generate and add to the navigation. If this setting is omitted, it's - sourced from the translations, falling back to English. Change it with: - - ``` yaml - plugins: - - blog: - categories_name: Categories - ``` - -[`categories_url_format`](#+blog.categories_url_format){ #+blog.categories_url_format } - -: :octicons-milestone-24: Default: `category/{slug}` – This option specifies - the format string that is used for the URL of a category index, and can be - used to localize the URL: - - === ":material-link: blog/category/:material-dots-horizontal:/" - - ``` yaml - plugins: - - blog: - categories_url_format: "category/{slug}" - ``` - - === ":material-link: blog/:material-dots-horizontal:/" - - ``` yaml - plugins: - - blog: - categories_url_format: "{slug}" - ``` - -[`categories_slugify`](#+blog.categories_slugify){ #+blog.categories_slugify } - -: :octicons-milestone-24: Default: `headerid.slugify` – This option specifies - which function to use for generating URL-compatible slugs from categories. - [Python Markdown Extensions] comes with several Unicode-aware - slug functions which should be a good choice for non-ASCII languages: - - === "Unicode" - - ``` yaml - plugins: - - blog: - categories_slugify: !!python/object/apply:pymdownx.slugs.slugify - kwds: - case: lower - ``` - - === "Unicode, case-sensitive" - - ``` yaml - plugins: - - blog: - categories_slugify: !!python/object/apply:pymdownx.slugs.slugify - ``` - -[`categories_slugify_separator`](#+blog.categories_slugify_separator){ #+blog.categories_slugify_separator } - -: :octicons-milestone-24: Default: `-` – This option specifies the separator - which is used by the slug function. By default, a hyphen is used, but it can - be changed to any string, including the empty string: - - ``` yaml - plugins: - - blog: - categories_slugify_separator: "-" - ``` - -[`categories_toc`](#+blog.categories_toc){ #+blog.categories_toc } - -: :octicons-milestone-24: Default: `false` – This option specifies whether a - category index includes a table of contents with all post titles on the - right side as an overview: - - ``` yaml - plugins: - - blog: - categories_toc: true - ``` - -[`categories_allowed`](#+blog.categories_allowed){ #+blog.categories_allowed } - -: :octicons-milestone-24: Default: _none_ – This option specifies the - categories that are allowed to be used in posts. If this setting is omitted, - the [built-in blog plugin] will not check category names. Use this option to - define a list of categories in order to catch typos: - - ``` yaml - plugins: - - blog: - categories_allowed: - - General - - Search - - Performance - ``` - -#### Pagination - -The following configuration options are available for index pagination: - -[`pagination`](#+blog.pagination){ #+blog.pagination } - -: :octicons-milestone-24: Default: `true` – This option specifies whether the - [built-in blog plugin] should paginate the index. The index shows all posts - in reverse chronological order, which can be many. If you want to disable - index pagination, add: - - ``` yaml - plugins: - - blog: - pagination: false - ``` - -[`pagination_per_page`](#+blog.pagination_per_page){ #+blog.pagination_per_page } - -: :octicons-milestone-24: Default: `10` – This option specifies the number - of posts rendered on a single index page. If more posts are found, they are - assigned to a 2nd page, and so on. If you have large [post excerpts], it - might be a good idea to reduce the number of posts per page: - - ``` yaml - plugins: - - blog: - pagination_per_page: 5 - ``` - -[`pagination_url_format`](#+blog.pagination_url_format){ #+blog.pagination_url_format } - -: :octicons-milestone-24: Default: `page/{page}` – This option specifies - the format string that is used for the URL of the paginated index, and can - be used to localize the URL: - - === ":material-link: blog/page/n/" - - ``` yaml - plugins: - - blog: - pagination_url_format: "page/{page}" - ``` - - === ":material-link: blog/n/" - - ``` yaml - plugins: - - blog: - pagination_url_format: "{page}" - ``` - -[`pagination_template`](#+blog.pagination_template){ #+blog.pagination_template } - -: :octicons-milestone-24: Default: `~2~` – This option specifies the format - string that is provided to the [paginate] module, which allows to customize - how pagination is constructed. Popular choices: - - === "1 2 3 .. n" - - ``` yaml - plugins: - - blog: - pagination_template: "~2~" - ``` - - === "1 2 3 .. n :material-chevron-right: :material-chevron-double-right:" - - ``` yaml - plugins: - - blog: - pagination_template: "$link_first $link_previous ~2~ $link_next $link_last" - ``` - - === "1 :material-chevron-right:" - - ``` yaml - plugins: - - blog: - pagination_template: "$link_previous $page $link_next" - ``` - - The [paginate] module exposes the following placeholders: - - - `$first_page` – number of first reachable page - - `$last_page` – number of last reachable page - - `$page` – number of currently selected page - - `$page_count` – number of reachable pages - - `$items_per_page` – maximal number of items per page - - `$first_item` – index of first item on the current page - - `$last_item` – index of last item on the current page - - `$item_count` – total number of items - - `$link_first` – link to first page (unless this is first page) - - `$link_last` – link to last page (unless this is last page) - - `$link_previous` – link to previous page (unless this is first page) - - `$link_next` – link to next page (unless this is last page) - - [paginate]: https://pypi.org/project/paginate/ - -[`pagination_keep_content`](#+blog.pagination_keep_content){ #+blog.pagination_keep_content } - -: :octicons-milestone-24: Default: `false` – This option specifies whether - paginated index pages should inherit the custom content from the index - page, i.e. the content of `blog/index.md`: - - ``` yaml - plugins: - - blog: - pagination_keep_content: true - ``` - -#### Authors - -The following configuration options are available for author info: - -[`authors`](#+blog.authors){ #+blog.authors } - -: :octicons-milestone-24: Default: `true` – This option specifies whether the - [built-in blog plugin] should generate author info. If it is enabled, the - plugin will look up authors in a file called `.authors.yml` and include - authors in indexes and in posts. If you want to disable this behavior, add: - - ``` yaml - plugins: - - blog: - authors: false - ``` - -[`authors_file`](#+blog.authors_file){ #+blog.authors_file } - -: :octicons-milestone-24: Default: `.authors.yml` – This option specifies the - name of the file where the authors for your posts resides. The default - settings assumes that the file is called `.authors.yml` (mind the `.` at - the beginning): - - ``` yaml - plugins: - - blog: - authors_file: .authors.yml - ``` - - The path must be defined relative to [`blog_dir`][this is configurable]. - Also see the section on [adding authors]. - - [adding authors]: #adding-authors - -#### Drafts - -The following configuration options are available for drafts: - -[`draft`](#+blog.draft){ #+blog.draft } - -: :octicons-milestone-24: Default: `false` – This option specifies whether the - [built-in blog plugin] should also include posts marked as drafts when the - site is being built. Including draft posts might be desired in deploy - previews, which is why it exists in the first place: - - === "Render drafts" - - ``` yaml - plugins: - - blog: - draft: true - ``` - - === "Don't render drafts" - - ``` yaml - plugins: - - blog: - draft: false - ``` - -[`draft_on_serve`](#+blog.draft_on_serve){ #+blog.draft_on_serve } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - posts marked as drafts should be included [when previewing your site] with - `mkdocs serve`. By default, drafts are rendered when previewing, but skipped - when the site is being built: - - ``` yaml - plugins: - - blog: - draft_on_serve: true - ``` - -[`draft_if_future_date`](#+blog.draft_if_future_date){ #+blog.draft_if_future_date } - -: :octicons-milestone-24: Default: `false` – This option specifies whether the - [built-in blog plugin] should mark posts with a future date as drafts. When - the date passed today, the post is automatically unmarked and included when - the site is being built: - - ``` yaml - plugins: - - blog: - draft_if_future_date: true - ``` - - [when previewing your site]: ../creating-your-site.md#previewing-as-you-write - -### RSS - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.23.0][Insiders] · -[:octicons-cpu-24: Plugin][rss] - -The [built-in blog plugin] integrates seamlessly with the [RSS plugin][rss], -which provides a simple way to add an RSS feed to your blog (or to your whole -documentation). Install it with `pip`: - -``` -pip install mkdocs-rss-plugin -``` - -Then, add the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - rss: - match_path: blog/posts/.* # (1)! - date_from_meta: - as_creation: date - categories: - - categories - - tags # (2)! -``` - -1. The RSS plugin allows to filter for URLs to be included in the feed. In - this example, only blog posts will be part of the feed. - -2. If you want to include a post's categories as well as its tags in the feed, - add both `categories` and `tags` here. - -The following configuration options are supported: - -[`enabled`](#+rss.enabled){ #+rss.enabled } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - the plugin is enabled when building your project. If you want to speed up - local builds, you can use an [environment variable]: - - ``` yaml - plugins: - - rss: - enabled: !ENV [CI, false] - ``` - -[`match_path`](#+rss.match_path){ #+rss.match_path } - -: :octicons-milestone-24: Default: `.*` – This option specifies which - pages should be included in the feed. For example, to only include blog - posts in the feed, use the following regular expression: - - ``` yaml - plugins: - - rss: - match_path: blog/posts/.* - ``` - -[`date_from_meta`](#+rss.date_from_meta){ #+rss.date_from_meta } - -: :octicons-milestone-24: Default: _none_ – This option specifies which - front matter property should be used as a creation date of a page in the - feed. It's recommended to use the `date` property: - - ``` yaml - plugins: - - rss: - date_from_meta: - as_creation: date - ``` - -[`categories`](#+rss.categories){ #+rss.categories } - -: :octicons-milestone-24: Default: _none_ – This option specifies which - front matter properties are used as categories as part of the feed. If you - use [categories] and [tags], add both with the following lines: - - ``` yaml - plugins: - - rss: - categories: - - categories - - tags - ``` - -[`comments_path`](#+rss.comments_path){ #+rss.comments_path } - -: :octicons-milestone-24: Default: _none_ – This option specifies the anchor - at which comments for a post or page can be found. If you've integrated a - [comment system], add the following lines: - - ``` yaml - plugins: - - rss: - comments_path: "#__comments" - ``` - -Material for MkDocs will automatically add the [necessary metadata] to your site -which will make the RSS feed discoverable by browsers and feed readers. Note -that the [RSS plugin][rss] comes with several other configuration options. -For further information, see the [documentation]. - - [rss]: https://guts.github.io/mkdocs-rss-plugin/ - [categories]: #categories - [tags]: setting-up-tags.md#built-in-tags-plugin - [comment system]: adding-a-comment-system.md - [necessary metadata]: https://guts.github.io/mkdocs-rss-plugin/configuration/#integration - [theme extension]: ../customization.md - [documentation]: https://guts.github.io/mkdocs-rss-plugin/configuration/ - -## Usage - -### Writing your first post - -After you've successfully set up the [built-in blog plugin], it's time to write -your first post. The plugin doesn't assume any specific directory structure, so -you're completely free in how you organize your posts, as long as they are all -located inside the `posts` directory: - -``` { .sh .no-copy } -. -├─ docs/ -│ └─ blog/ -│ ├─ posts/ -│ │ └─ hello-world.md # (1)! -│ └─ index.md -└─ mkdocs.yml -``` - -1. If you'd like to arrange posts differently, you're free to do so. The URLs - are built from the format specified in [`post_url_format`][post slugs] and - the titles and dates of posts, no matter how they are organized - inside the `posts` directory. - -Create a new file called `hello-world.md` and add the following lines: - -``` yaml ---- -draft: true # (1)! -date: 2022-01-31 -categories: - - Hello - - World ---- - -# Hello world! -... -``` - -1. If you mark a post as a [draft], a red marker appears next to the post date - on index pages. When the site is built, drafts are not included in the - output. [This behavior can be changed], e.g. for rendering drafts when - building deploy previews. - -When you spin up the [live preview server], you should be greeted by your first -post! You'll also realize, that [archive] and [category] indexes have been -automatically generated for you. - - [draft]: #drafts - [This behavior can be changed]: #+blog.draft - [live preview server]: ../creating-your-site.md#previewing-as-you-write - -#### Adding an excerpt - -The blog index, as well as [archive] and [category] indexes can either list the -entire content of each post, or excerpts of posts. An excerpt can be created by -adding a `<!-- more -->` separator after the first few paragraphs of a post: - -``` py -# Hello world! - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod -nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor -massa, nec semper lorem quam in massa. - -<!-- more --> -... -``` - -When the [built-in blog plugin] generates all indexes, the content before the -[excerpt separator] is automatically extracted, allowing the user to start -reading a post before deciding to jump in. - - [excerpt separator]: #+blog.post_excerpt_separator - -#### Adding authors - -In order to add a little more personality to your posts, you can associate each -post with one or multiple [authors]. First, create the -[`.authors.yml`][authors_file] file in your blog directory, and add an author: - -``` yaml -squidfunk: - name: Martin Donath - description: Creator - avatar: https://github.com/squidfunk.png -``` - -The [`.authors.yml`][authors_file] file associates each author with an -identifier (in this example `squidfunk`), which can then be used in posts. -The following properties are available for each author: - -[`name`](#+blog.authors_file.name){ #+blog.authors_file.name } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property must define a name for the author. The name is displayed in - the left sidebar of each post as part of the author info. - -[`description`](#+blog.authors_file.description){ #+blog.authors_file.description } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property can be used to add a short description for the author, e.g. - the role or profession of the author, or any other title. - -[`avatar`](#+blog.authors_file.avatar){ #+blog.authors_file.avatar } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property must point to a valid image URL, internal or external, and is - used as part of posts and excerpts as the author's avatar. - -Now, you can assign one or more authors to a post by referencing their -identifiers in the front matter of the Markdown file under the `authors` -property. For each author, a small profile is rendered in the left sidebar of -each post, as well as in post excerpts on index pages: - -``` yaml ---- -date: 2022-01-31 -authors: - - squidfunk - ... ---- - -# Hello world! -... -``` - - [authors]: #authors - [authors_file]: #+blog.authors_file - -#### Adding categories - -Categories are an excellent way for grouping your posts thematically on -dedicated index pages. This way, a user interested in a specific topic can -explore all of your posts on this topic. Make sure [categories] are enabled and -add them to the front matter `categories` property: - -``` yaml ---- -date: 2022-01-31 -categories: - - Hello - - World ---- - -# Hello world! -... -``` - -If you want to save yourself from typos when typing out categories, you can -define your desired categories in `mkdocs.yml` as part of the -[`categories_allowed`][categories_allowed] configuration option. The -[built-in blog plugin] will stop the build if a category is not found within -the list. - - [categories_allowed]: #+blog.categories_allowed - -#### Adding tags - -Besides [categories], the [built-in blog plugin] also integrates with the -[built-in tags plugin]. If you add tags in the front matter `tags` property as -part of a post, the post is linked from the [tags index]: - -``` yaml ---- -date: 2022-01-31 -tags: - - Foo - - Bar ---- - -# Hello world! -... -``` - -As usual, the tags are rendered above the main headline and posts are linked -on the tags index page, if configured. Note that posts are, as pages, only -linked with their titles. - - [built-in tags plugin]: setting-up-tags.md#built-in-tags-plugin - [tags index]: setting-up-tags.md#adding-a-tags-index - -#### Adding related links - -Related links offer the perfect way to prominently add a _further reading_ -section to your post that is included in the left sidebar, guiding the user to -other destinations of your documentation. Use the front matter `links` property -to add related links to a post: - -``` yaml ---- -date: 2022-01-31 -links: - - setup/setting-up-site-search.md#built-in-search-plugin - - insiders/index.md#how-to-become-a-sponsor ---- - -# Hello world! -... -``` - -You can use the exact same syntax as for the [`nav`][nav] section in -`mkdocs.yml`, which means you can set explicit titles for links, add external -links and even use nesting: - -``` yaml ---- -date: 2022-01-31 -links: - - setup/setting-up-site-search.md#built-in-search-plugin - - insiders/index.md#how-to-become-a-sponsor - - Nested section: - - External link: https://example.com - - setup/setting-up-site-search.md ---- - -# Hello world! -... -``` - -If you look closely, you'll realize that you can even use an anchor to link to -a specific section of a document, extending the possiblities of the [`nav`][nav] -syntax in `mkdocs.yml`. The [built-in blog plugin] resolves the anchor and sets -the title of the anchor as a [subtitle] of the related link. - -Note that all links must be relative to [`docs_dir`][docs_dir], as is also the -case for the [`nav`][nav] setting. - - [nav]: https://www.mkdocs.org/user-guide/configuration/#nav - [subtitle]: ../reference/index.md#setting-the-page-subtitle - -#### Linking from and to posts - -While [post URLs][post slugs] are dynamically computed, the [built-in blog -plugin] ensures that all links from and to posts and a post's assets are -correct. If you want to link to a post, just use the path to the Markdown file -as a link reference (links must be relative): - -``` markdown -[Hello World!](blog/posts/hello-world.md) -``` - -Linking from a post to a page, e.g. the index, follows the same method: - -``` markdown -[Blog](../index.md) -``` - -All assets inside the `posts` directory are copied to the `blog/assets` folder -when the site is being built. Of course, you can also reference assets from -posts outside of the `posts` directory. The [built-in blog plugin] ensures that -all links are correct. - -#### Setting the reading time - -When [enabled], the [readtime] package is used to compute the expected reading -time of each post, which is rendered as part of the post and post excerpt. -Nowadays, many blogs show reading times, which is why the [built-in blog plugin] -offers this capability as well. - -Sometimes, however, the computed reading time might not feel accurate, or -result in odd and unpleasant numbers. For this reason, reading time can be -overridden and explicitly set with the front matter `readtime` property for a -post: - -``` yaml ---- -date: 2022-01-31 -readtime: 15 ---- - -# Hello world! -... -``` - -This will disable automatic reading time computation. - - [readtime]: https://pypi.org/project/readtime/ - [enabled]: #+blog.post_readtime - -#### Setting defaults - -If you have a lot of posts, it might feel redundant to define all of the above -for each post. Luckily, the [built-in meta plugin] allows to set default front -matter properties per folder. You can group your posts by categories, or -authors, and add a `.meta.yml` file to set common properties: - -``` { .sh .no-copy } -. -├─ docs/ -│ └─ blog/ -│ ├─ posts/ -│ ├─ .meta.yml # (1)! -│ └─ index.md -└─ mkdocs.yml -``` - -1. As already noted, you can also place a `.meta.yml` file in nested folders - of the `posts` directory. This file then can define all front matter - properties that are valid in posts, e.g.: - - ``` yaml - authors: - - squidfunk - categories: - - Hello - - World - ``` - -Note that order matters – the [built-in meta plugin] must be defined before the -blog plugin in `mkdocs.yml`, so that all set defaults are correctly picked up -by the [built-in blog plugin]: - -``` yaml -plugins: - - meta - - blog -``` - -Lists and dictionaries in `.meta.yml` files are merged and deduplicated with the -values defined for a post, which means you can define common properties in -`.meta.yml` and then add specific properties or overrides for each post. - - [built-in meta plugin]: ../reference/index.md#built-in-meta-plugin - -### Adding pages - -Besides posts, it's also possible to add static pages to your blog by listing -the pages in the [`nav`][nav] section of `mkdocs.yml`. All generated indexes -are included after the last specified page. For example, to add a page on the -authors of the blog, add the following to `mkdocs.yml`: - -``` yaml -nav: - - Blog: - - blog/index.md - - blog/authors.md - ... -``` - -## Customization - -### Custom index pages - -[:octicons-tag-24: insiders-4.24.0][Insiders] · -:octicons-beaker-24: Experimental - -If you want to add custom content to automatically generated [archive] and -[category] indexes, e.g. to add a category description prior to the list of -posts, you can manually create the category page in the same location where -the [built-in blog plugin] would create it: - -``` { .sh .no-copy } -. -├─ docs/ -│ └─ blog/ -│ ├─ category/ -│ │ └─ hello.md #(1)! -│ ├─ posts/ -│ └─ index.md -└─ mkdocs.yml -``` - -1. The easiest way is to first [add the category] to the blog post, then take - the URL generated by the [built-in blog plugin] and create the file at the - corresponding location in the [`blog_dir`][this is configurable] folder. - - Note that the shown directory listing is based on the default configuration. - If you specify different values for the following options, be sure to adjust - the path accordingly: - - - [`blog_dir`][this is configurable] - - [`categories_url_format`][categories_url_format] - - [`categories_slugify`][categories_slugify] - -You can now add arbitrary content to the newly created file, or set specific -front matter properties for this page, e.g. to change the [page description]: - -``` yaml ---- -description: Nullam urna elit, malesuada eget finibus ut, ac tortor. ---- - -# Hello -... -``` - -All post excerpts belonging to the category are automatically appended. - - [add the category]: #adding-categories - [page description]: ../reference/index.md#setting-the-page-description - [categories_url_format]: #+blog.categories_url_format - [categories_slugify]: #+blog.categories_slugify - -### Overriding templates - -The [built-in blog plugin] is built on the same basis as Material for MkDocs, -which means you can override all templates used for the blog by using -[theme extension] as usual. - -The following templates are added by the [built-in blog plugin]: - -- [`blog.html`][blog.html] – Template for blog index -- [`blog-post.html`][blog-post.html] – Template for blog post -- [`blog-archive.html`][blog-archive.html] – Template for blog archive index -- [`blog-category.html`][blog-category.html] – Template for blog category index - - [theme extension]: ../customization.md#extending-the-theme - - [blog.html]: https://github.com/squidfunk/mkdocs-material-insiders/blob/master/src/blog.html - [blog-post.html]: https://github.com/squidfunk/mkdocs-material-insiders/blob/master/src/blog-post.html - [blog-archive.html]: https://github.com/squidfunk/mkdocs-material-insiders/blob/master/src/blog-archive.html - [blog-category.html]: https://github.com/squidfunk/mkdocs-material-insiders/blob/master/src/blog-category.html diff --git a/docs/setup/setting-up-navigation.md b/docs/setup/setting-up-navigation.md deleted file mode 100644 index ed81f698e266487373bd6d2213e793ab6c8a5030..0000000000000000000000000000000000000000 --- a/docs/setup/setting-up-navigation.md +++ /dev/null @@ -1,487 +0,0 @@ -# Setting up navigation - -A clear and concise navigation structure is an important aspect of good project -documentation. Material for MkDocs provides a multitude of options to configure -the behavior of navigational elements, including [tabs] and [sections], and one -of its flagship features: [instant loading]. - - [tabs]: #navigation-tabs - [sections]: #navigation-sections - [instant loading]: #instant-loading - -## Configuration - -### Instant loading - -[:octicons-tag-24: 5.0.0][Instant loading support] · -:octicons-unlock-24: Feature flag - -When instant loading is enabled, clicks on all internal links will be -intercepted and dispatched via [XHR] without fully reloading the page. Add -the following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - navigation.instant -``` - -The resulting page is parsed and injected and all event handlers and components -are rebound automatically, i.e., __Material for MkDocs now behaves like a Single -Page Application__. Now, the search index survives navigation, which is -especially useful for large documentation sites. - - [Instant loading support]: https://github.com/squidfunk/mkdocs-material/releases/tag/5.2.0 - [XHR]: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest - -### Anchor tracking - -[:octicons-tag-24: 8.0.0][Anchor tracking support] · -:octicons-unlock-24: Feature flag - -When anchor tracking is enabled, the URL in the address bar is automatically -updated with the active anchor as highlighted in the table of contents. Add the -following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - navigation.tracking -``` - - [Anchor tracking support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.0.0 - -### Navigation tabs - -[:octicons-tag-24: 1.1.0][Navigation tabs support] · -:octicons-unlock-24: Feature flag - -When tabs are enabled, top-level sections are rendered in a menu layer below -the header for viewports above `1220px`, but remain as-is on mobile.[^1] Add -the following lines to `mkdocs.yml`: - - [^1]: - Prior to :octicons-tag-24: 6.2.0, navigation tabs had a slightly different - behavior. All top-level pages (i.e. all top-level entries directly - referring to a `*.md` file) defined inside the `nav` entry of `mkdocs.yml` - were grouped under the first tab which received the title of the first page. - This made it impossible to include a top-level page (or external link) as a - tab item, as was reported in #1884 and #2072. From :octicons-tag-24: 6.2.0 - on, navigation tabs include all top-level pages and sections. - -``` yaml -theme: - features: - - navigation.tabs -``` - -=== "With tabs" - - [![Navigation tabs enabled]][Navigation tabs enabled] - -=== "Without" - - [![Navigation tabs disabled]][Navigation tabs disabled] - - [Navigation tabs support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.1.0 - [Navigation tabs enabled]: ../assets/screenshots/navigation-tabs.png - [Navigation tabs disabled]: ../assets/screenshots/navigation.png - -#### Sticky navigation tabs - -[:octicons-tag-24: 7.3.0][Sticky navigation tabs support] · -:octicons-unlock-24: Feature flag - -When sticky tabs are enabled, navigation tabs will lock below the header and -always remain visible when scrolling down. Just add the following two feature -flags to `mkdocs.yml`: - -``` yaml -theme: - features: - - navigation.tabs - - navigation.tabs.sticky -``` - -=== "With sticky tabs" - - [![Sticky navigation tabs enabled]][Sticky navigation tabs enabled] - -=== "Without" - - [![Sticky navigation tabs disabled]][Sticky navigation tabs disabled] - - [Sticky navigation tabs support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.3.0 - [Sticky navigation tabs enabled]: ../assets/screenshots/navigation-tabs-sticky.png - [Sticky navigation tabs disabled]: ../assets/screenshots/navigation-tabs-collapsed.png - -### Navigation sections - -[:octicons-tag-24: 6.2.0][Navigation sections support] · -:octicons-unlock-24: Feature flag - -When sections are enabled, top-level sections are rendered as groups in the -sidebar for viewports above `1220px`, but remain as-is on mobile. Add the -following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - navigation.sections -``` - -=== "With sections" - - [![Navigation sections enabled]][Navigation sections enabled] - -=== "Without" - - [![Navigation sections disabled]][Navigation sections disabled] - - [Navigation sections support]: https://github.com/squidfunk/mkdocs-material/releases/tag/6.2.0 - [Navigation sections enabled]: ../assets/screenshots/navigation-sections.png - [Navigation sections disabled]: ../assets/screenshots/navigation.png - -Both feature flags, [`navigation.tabs`][tabs] and -[`navigation.sections`][sections], can be combined with each other. If both -feature flags are enabled, sections are rendered for level 2 navigation items. - -### Navigation expansion - -[:octicons-tag-24: 6.2.0][Navigation expansion support] · -:octicons-unlock-24: Feature flag - -When expansion is enabled, the left sidebar will expand all collapsible -subsections by default, so the user doesn't have to open subsections manually. -Add the following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - navigation.expand -``` - -=== "With expansion" - - [![Navigation expansion enabled]][Navigation expansion enabled] - -=== "Without" - - [![Navigation expansion disabled]][Navigation expansion disabled] - - [Navigation expansion support]: https://github.com/squidfunk/mkdocs-material/releases/tag/6.2.0 - [Navigation expansion enabled]: ../assets/screenshots/navigation-expand.png - [Navigation expansion disabled]: ../assets/screenshots/navigation.png - -### Navigation path <small>Breadcrumbs</small> { id=navigation-path } - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.28.0][Insiders] · -:octicons-beaker-24: Experimental - -When navigation paths are activated, a breadcrumb navigation is rendered above -the title of each page, which might make orientation easier for users visiting your -documentation on devices with smaller screens. Add the following lines to -`mkdocs.yml`: - -``` yaml -theme: - features: - - navigation.path -``` - -=== "With navigation path" - - [![Navigation path enabled]][Navigation path enabled] - -=== "Without" - - [![Navigation path disabled]][Navigation path disabled] - - [Navigation path enabled]: ../assets/screenshots/navigation-path-on.png - [Navigation path disabled]: ../assets/screenshots/navigation-path-off.png - -### Navigation pruning - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.16.0][Insiders] · -:octicons-beaker-24: Experimental - -When pruning is enabled, only the visible navigation items are included in the -rendered HTML, __reducing the size of the built site by 33% or more__. Add the -following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - navigation.prune # (1)! -``` - -1. This feature flag is not compatible with - [`navigation.expand`][navigation.expand], as navigation expansion requires - the complete navigation structure. - -This feature flag is especially useful for documentation sites with 100+ or even -1,000+ of pages, as the navigation makes up a significant fraction of the HTML. -Navigation pruning will replace all expandable sections with links to the first -page in that section (or the section index page). - - [Insiders]: ../insiders/index.md - [navigation.expand]: #navigation-expansion - -### Section index pages - -[:octicons-tag-24: 7.3.0][Section index pages support] · -:octicons-unlock-24: Feature flag - -When section index pages are enabled, documents can be directly attached to -sections, which is particularly useful for providing overview pages. Add the -following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - navigation.indexes # (1)! -``` - -1. This feature flag is not compatible with [`toc.integrate`][toc.integrate], - as sections cannot host the table of contents due to missing space. - -=== "With section index pages" - - [![Section index pages enabled]][Section index pages enabled] - -=== "Without" - - [![Section index pages disabled]][Section index pages disabled] - -In order to link a page to a section, create a new document with the name -`index.md` in the respective folder, and add it to the beginning of your -navigation section: - -``` yaml -nav: - - Section: - - section/index.md - - Page 1: section/page-1.md - ... - - Page n: section/page-n.md -``` - - [Section index pages support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.3.0 - [Section index pages enabled]: ../assets/screenshots/navigation-index-on.png - [Section index pages disabled]: ../assets/screenshots/navigation-index-off.png - [toc.integrate]: #navigation-integration - -### Table of contents - -#### Anchor following - -[:octicons-tag-24: 8.5.0][Anchor following support] · -:octicons-beaker-24: Experimental - -When anchor following for the [table of contents] is enabled, the sidebar is -automatically scrolled so that the active anchor is always visible. Add the -following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - toc.follow -``` - - [Anchor following support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.5.0 - -#### Navigation integration - -[:octicons-tag-24: 6.2.0][Navigation integration support] · -:octicons-unlock-24: Feature flag - -When navigation integration for the [table of contents] is enabled, it is always -rendered as part of the navigation sidebar on the left. Add the following lines -to `mkdocs.yml`: - -``` yaml -theme: - features: - - toc.integrate # (1)! -``` - -1. This feature flag is not compatible with - [`navigation.indexes`][navigation.indexes], as sections cannot host the - table of contents due to missing space. - -=== "With navigation integration" - - [![Navigation integration enabled]][Navigation integration enabled] - -=== "Without" - - [![Navigation integration disabled]][Navigation integration disabled] - - [table of contents]: extensions/python-markdown.md#table-of-contents - [Navigation integration support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.3.0 - [Navigation integration enabled]: ../assets/screenshots/toc-integrate.png - [Navigation integration disabled]: ../assets/screenshots/navigation-tabs.png - [navigation.indexes]: #section-index-pages - -### Back-to-top button - -[:octicons-tag-24: 7.1.0][Back-to-top button support] · -:octicons-unlock-24: Feature flag - -A back-to-top button can be shown when the user, after scrolling down, starts -to scroll up again. It's rendered centered and just below the header. Add the -following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - navigation.top -``` - - [Back-to-top button support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.1.0 - -## Usage - -### Hiding the sidebars - -The navigation and/or table of contents sidebars can be hidden for a document -with the front matter `hide` property. Add the following lines at the top of a -Markdown file: - -``` yaml ---- -hide: - - navigation - - toc ---- - -# Document title -... -``` - -=== "Hide navigation" - - [![Hide navigation enabled]][Hide navigation enabled] - -=== "Hide table of contents" - - [![Hide table of contents enabled]][Hide table of contents enabled] - -=== "Hide both" - - [![Hide both enabled]][Hide both enabled] - - [Hide navigation enabled]: ../assets/screenshots/hide-navigation.png - [Hide table of contents enabled]: ../assets/screenshots/hide-toc.png - [Hide both enabled]: ../assets/screenshots/hide-navigation-toc.png - -### Hiding the navigation path - -While the [navigation path] is rendered above the main headline, sometimes, it -might be desirable to hide it for a specific page, which can be achieved with -the front matter `hide` property: - -``` yaml ---- -hide: - - path ---- - -# Document title -... -``` - - [navigation path]: #navigation-path - -## Customization - -### Keyboard shortcuts - -Material for MkDocs includes several keyboard shortcuts that make it possible -to navigate your project documentation via keyboard. There are two modes: - -[`search`](#mode:search){ #mode:search } - -: This mode is active when the _search is focused_. It provides several key - bindings to make search accessible and navigable via keyboard: - - * ++arrow-down++ , ++arrow-up++ : select next / previous result - * ++esc++ , ++tab++ : close search dialog - * ++enter++ : follow selected result - -[`global`](#mode:global){ #mode:global } - -: This mode is active when _search is not focussed_ and when there's no other - focussed element that is susceptible to keyboard input. The following keys - are bound: - - * ++f++ , ++s++ , ++slash++ : open search dialog - * ++p++ , ++comma++ : go to previous page - * ++n++ , ++period++ : go to next page - -Let's say you want to bind some action to the ++x++ key. By using [additional -JavaScript], you can subscribe to the `keyboard$` observable and attach -your custom event listener: - -=== ":octicons-file-code-16: `docs/javascripts/shortcuts.js`" - - ``` js - keyboard$.subscribe(function(key) { - if (key.mode === "global" && key.type === "x") { - /* Add custom keyboard handler here */ - key.claim() // (1)! - } - }) - ``` - - 1. The call to `key.claim()` will execute `preventDefault()` on the - underlying event, so the keypress will not propagate further and - touch other event listeners. - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_javascript: - - javascripts/shortcuts.js - ``` - - [additional JavaScript]: ../customization.md#additional-javascript - -### Content area width - -The width of the content area is set so the length of each line doesn't exceed -80-100 characters, depending on the width of the characters. While this -is a reasonable default, as longer lines tend to be harder to read, it may be -desirable to increase the overall width of the content area, or even make it -stretch to the entire available space. - -This can easily be achieved with an [additional style sheet] and a few lines -of CSS: - -=== ":octicons-file-code-16: `docs/stylesheets/extra.css`" - - ``` css - .md-grid { - max-width: 1440px; /* (1)! */ - } - ``` - - 1. If you want the content area to always stretch to the available screen - space, reset `max-width` with the following CSS: - - ``` css - .md-grid { - max-width: initial; - } - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_css: - - stylesheets/extra.css - ``` - - [additional style sheet]: ../customization.md#additional-css diff --git a/docs/setup/setting-up-site-analytics.md b/docs/setup/setting-up-site-analytics.md deleted file mode 100644 index e27c1f1430531231eaa070af37e766cd963f39ca..0000000000000000000000000000000000000000 --- a/docs/setup/setting-up-site-analytics.md +++ /dev/null @@ -1,323 +0,0 @@ -# Setting up site analytics - -As with any other service offered on the web, understanding how your project -documentation is actually used can be an essential success factor. Material for -MkDocs natively integrates with [Google Analytics] and offers a customizable -[cookie consent] and a [feedback widget]. - - [Google Analytics]: https://developers.google.com/analytics - [cookie consent]: ensuring-data-privacy.md#cookie-consent - [feedback widget]: #was-this-page-helpful - -## Configuration - -### Google Analytics - -[:octicons-tag-24: 7.1.8][Google Analytics support] · -:octicons-milestone-24: Default: _none_ - -Material for MkDocs integrates with both, Google Analytics 4 and the now phasing -out Universal Analytics. Depending on the given property prefix, add the -following lines to `mkdocs.yml`: - -=== ":material-google-analytics: Google Analytics 4" - - ``` yaml - extra: - analytics: - provider: google - property: G-XXXXXXXXXX - ``` - -=== ":material-google-analytics: Universal Analytics" - - ``` yaml - extra: - analytics: - provider: google - property: UA-XXXXXXXX-X - ``` - - [Google Analytics support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.1.8 - -??? question "How to measure site search usage?" - - Besides page views and events, [site search] can be tracked to better - understand how people use your documentation and what they expect to find. - In order to enable site search tracking, the following steps are required: - - === ":material-google-analytics: Google Analytics 4" - - 1. Go to your Google Analytics __admin settings__ - 2. Select the property for the respective tracking code - 3. Select the __data streams__ tab and click the corresponding URL - 4. Click the gear icon within the __enhanced measurement__ section - 5. Ensure that __site search__ is enabled - - === ":material-google-analytics: Universal Analytics" - - 1. Go to your Google Analytics __admin settings__ - 2. Select the property for the respective tracking code - 3. Go to the __view settings__ tab - 4. Scroll down and enable __site search settings__ - 5. Set the __query parameter__ to `q` - - [site search]: setting-up-site-search.md - -### Was this page helpful? - -[:octicons-tag-24: 8.4.0][Was this page helpful? support] · -:octicons-milestone-24: Default: _none_ - -A simple [feedback widget] can be included at the bottom of each page, -encouraging users to give instant feedback whether a page was helpful or not. -Add the following lines to `mkdocs.yml`: - -``` yaml -extra: - analytics: # (1)! - feedback: - title: Was this page helpful? - ratings: - - icon: material/emoticon-happy-outline - name: This page was helpful - data: 1 - note: >- - Thanks for your feedback! - - icon: material/emoticon-sad-outline - name: This page could be improved - data: 0 - note: >- # (2)! - Thanks for your feedback! Help us improve this page by - using our <a href="..." target="_blank" rel="noopener">feedback form</a>. -``` - -1. This feature is natively integrated with [Google Analytics][analytics], - which is why `provider` and `property` are also required. However, it's also - possible to provide a [custom feedback integration]. - -2. You can add arbitrary HTML tags to the note which is shown after the user - submitted the feedback, e.g. to link to a feedback form. - -Both properties, `title` and `ratings`, are required. Note that it's allowed to -define more than two ratings, e.g. to implement a 1-5 star rating. Since the -feedback widget sends data to a third-party service, it is, of course, natively -integrated with the [cookie consent] feature[^1]. - - [^1]: - If the user doesn't accept the `analytics` cookie, the feedback widget is - not shown. - -??? question "How to visualize the collected feedback ratings?" - - To visualize feedback ratings you'll need to create a custom report with - [Google Analytics] that will quickly show you the worst- and best-rated - pages of your project documentation. - - === ":material-google-analytics: Google Analytics 4" - - 1. Go to your Google Analytics __dashboard__ - - 2. Go to the __configure__ page on the left hand menu, then select - __custom definitions__ - - 3. Click the __custom metrics__ tab and then __create custom metrics__, - enter the following values: - - * Metric name: Page helpful - * Description: Was this page helpful? - * Event parameter: `data` - * Unit of measurement: Standard - - 4. Go to the __explore__ page on the left hand menu, create a new - __blank exploration__ - - 5. Configure the report as follows: - - * Dimensions: Add `Event name` and `Page location` - * Metrics: Add `Event count` and `Page helpful` - (the custom metric created in step 3) - * Rows: `Page location` - * Values: Drag in both `Event count` and `Page helpful` - * Filters: Add a new filter for - `Event name / exactly matches / feedback` - - !!! warning "Delay in data availability" - - The report may take 24 hours or longer to begin displaying data - - === ":material-google-analytics: Universal Analytics" - - 1. Go to your Google Analytics __dashboard__ - 2. Open the __customization__ panel on the left and go to __custom reports__ - 3. Create a __new custom report__ and set a custom __title__ and __name__ - 4. Add `Avg. Value` and `Total Events` to __metric group__ - 5. Add `Event Label` to __dimension drilldown__ - 6. Add `Event Category` to __filters__ and filter for the value __feedback__ - - Now, after you've saved the report and collected some feedback ratings, - you'll have a list of all pages with the total number of ratings, and an - average rating per page. This should help you identify pages that need to - be improved: - - [![feedback report]][feedback report] - -The following properties are available for each rating: - -[`icon`](#+analytics.feedback.ratings.icon){ #+analytics.feedback.ratings.icon } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property must point to a valid icon path referencing [any icon bundled - with the theme][custom icons], or the build will not succeed. Some popular - combinations: - - * :material-emoticon-happy-outline: + :material-emoticon-sad-outline: – `material/emoticon-happy-outline` + `material/emoticon-sad-outline` - * :material-thumb-up-outline: + :material-thumb-down-outline: – `material/thumb-up-outline` + `material/thumb-down-outline` - * :material-heart: + :material-heart-broken: – `material/heart` + `material/heart-broken` - -[`name`](#+analytics.feedback.ratings.name){ #+analytics.feedback.ratings.name } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - The value of this property is shown on user interaction (i.e. keyboard focus - or mouse hover), explaining the meaning of the rating behind the icon. - -[`data`](#+analytics.feedback.ratings.data){ #+analytics.feedback.ratings.data } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - The value of this property is sent as a data value with the custom event - that is transmitted to Google Analytics[^2] (or any custom integration). - - [^2]: - Note that for Google Analytics, the data value must be an integer. - -[`note`](#+analytics.feedback.ratings.note){ #+analytics.feedback.ratings.note } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - The value of this property is shown after the user selected the rating. - It may contain arbitrary HTML tags, which is especially useful to ask the - user to provide more detailed feedback for the current page through a form. - It's also possible to pre-fill forms with the URL and title of the current - page by using the following placeholders: - - - `{url}` – Page URL - - `{title}` – Page title - - ``` - https://github.com/.../issues/new/?title=[Feedback]+{title}+-+{url} - ``` - - In this example, when clicking the link, the user is redirected to the "new - issue" form of your repository, with a pre-filled title including the path - of the current document, e.g.: - - ``` - [Feedback] Setting up site analytics – /setup/setting-up-site-analytics/ - ``` - - An alternative to GitHub issues is [Google Forms]. - - [Was this page helpful? support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.4.0 - [feedback widget]: #feedback - [analytics]: #google-analytics - [feedback report]: ../assets/screenshots/feedback-report.png - [custom feedback integration]: #custom-site-feedback - [custom icons]: https://github.com/squidfunk/mkdocs-material/tree/master/material/.icons - [Google Forms]: https://www.google.com/forms/about/ - -## Usage - -### Hiding the feedback widget - -The [feedback widget] can be hidden for a document with the front matter `hide` -property. Add the following lines at the top of a Markdown file: - -``` yaml ---- -hide: - - feedback ---- - -# Document title -... -``` - -## Customization - -### Custom site analytics - -In order to integrate another analytics service provider offering a -JavaScript-based tracking solution, just follow the guide on [theme extension] -and create a new partial in the `overrides` folder. The name of the partial is -used to configure the custom integration via `mkdocs.yml`: - -=== ":octicons-file-code-16: `overrides/partials/integrations/analytics/custom.html`" - - ``` html - <script> - /* Add custom analytics integration here, e.g. */ - var property = "{{ config.extra.analytics.property }}" // (1)! - - /* Wait for page to load and application to mount */ - document.addEventListener("DOMContentLoaded", function() { - location$.subscribe(function(url) { - /* Add custom page event tracking here */ // (2)! - }) - }) - </script> - ``` - - 1. As an example, this variable receives the value set in `mkdocs.yml`, - which is `"foobar"` for `property`. - 2. If you're using [instant loading], you can use the `location$` - observable to listen for navigation events, which always emits the - current `URL`. - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra: - analytics: - provider: custom - property: foobar # (1)! - ``` - - 1. You can add arbitrary key-value combinations to configure your - custom integration. This is especially useful if you're sharing the - custom integration across multiple repositories. - - [theme extension]: ../customization.md#extending-the-theme - [instant loading]: setting-up-navigation.md#instant-loading - -### Custom site feedback - -A custom feedback widget integration just needs to process the events that are -generated by users interacting with the feedback widget with the help of some -[additional JavaScript]: - -=== ":octicons-file-code-16: `docs/javascripts/feedback.js`" - - ``` js - var feedback = document.forms.feedback - feedback.addEventListener("submit", function(ev) { - ev.preventDefault() - - /* Retrieve page and feedback value */ - var page = document.location.pathname - var data = ev.submitter.getAttribute("data-md-value") - - /* Send feedback value */ - console.log(page, data) - }) - ``` - -=== ":octicons-file-code-16: `mkdocs.yml`" - - ``` yaml - extra_javascript: - - javascripts/feedback.js - ``` - - -{ #feedback style="margin: 0; height: 0" } - - [additional JavaScript]: ../customization.md#additional-javascript diff --git a/docs/setup/setting-up-site-search.md b/docs/setup/setting-up-site-search.md deleted file mode 100644 index 937daf02c88b3aa8b916987ce35f064e9e859908..0000000000000000000000000000000000000000 --- a/docs/setup/setting-up-site-search.md +++ /dev/null @@ -1,440 +0,0 @@ ---- -search: - boost: 1.05 ---- - -# Setting up site search - -Material for MkDocs provides an excellent client-side search implementation, -omitting the need for the integration of third-party services, which might -not be compliant with privacy regulations. Moreover, search even works -[offline], allowing users to download your documentation. - - [offline]: building-for-offline-usage.md - -## Configuration - -### Built-in search plugin - -[:octicons-tag-24: 0.1.0][Search support] · -:octicons-cpu-24: Plugin - -The built-in search plugin integrates seamlessly with Material for MkDocs, -adding multilingual client-side search with [lunr] and [lunr-languages]. It's -enabled by default, but must be re-added to `mkdocs.yml` when other plugins -are used: - -``` yaml -plugins: - - search -``` - -The following configuration options are supported: - -[`lang`](#+search.lang){ #+search.lang } - -: :octicons-milestone-24: Default: _automatically set_ – This option allows - to include the language-specific stemmers provided by [lunr-languages]. - Note that Material for MkDocs will set this automatically based on the - [site language], but it may be overridden, e.g. to support multiple - languages: - - === "A single language" - - ``` yaml - plugins: - - search: - lang: en - ``` - - === "Multiple languages" - - ``` yaml - plugins: - - search: - lang: # (1)! - - en - - de - ``` - - 1. Be aware that including support for other languages increases the - general JavaScript payload by around 20kb (before `gzip`) and by - another 15-30kb per language. - - The following languages are supported by [lunr-languages]: - - <div class="mdx-columns" markdown> - - - `ar` – Arabic - - `da` – Danish - - `de` – German - - `du` – Dutch - - `en` – English - - `es` – Spanish - - `fi` – Finnish - - `fr` – French - - `hu` – Hungarian - - `it` – Italian - - `ja` – Japanese - - `no` – Norwegian - - `pt` – Portuguese - - `ro` – Romanian - - `ru` – Russian - - `sv` – Swedish - - `th` – Thai - - `tr` – Turkish - - `vi` – Vietnamese - - </div> - - Material for MkDocs goes to great lengths to support languages that are not - part of this list by automatically falling back to the stemmer yielding the - best result. - -[`separator`](#+search.separator){ #+search.separator } - -: :octicons-milestone-24: Default: _automatically set_ – The separator for - indexing and query tokenization can be customized, making it possible to - index parts of words separated by other characters than whitespace and `-`, - e.g. by including `.`: - - ``` yaml - plugins: - - search: - separator: '[\s\-\.]+' - ``` - - With :octicons-tag-24: 9.0.0, a faster and more flexible tokenizer method - is shipped, allowing for __tokenizing with lookahead__, which yields more - influence on the way documents are indexed. As a result, we use the - following separator setting for this site's search: - - ``` yaml - plugins: - - search: - separator: '[\s\-,:!=\[\]()"/]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;' - ``` - - Broken into its parts, the separator induces the following behavior: - - === "Special characters" - - ``` - [\s\-,:!=\[\]()"/]+ - ``` - - The first part of the expression inserts token boundaries for each - document before and after whitespace, hyphens, commas, brackets and - other special characters. If several of those special characters are - adjacent, they are treated as one. - - === "Case changes" - - ``` - (?!\b)(?=[A-Z][a-z]) - ``` - - Many programming languages have naming conventions like `PascalCase` or - `camelCase`. By adding this subexpression to the separator, - [words are split at case changes], tokenizing the word `PascalCase` - into `Pascal` and `Case`. - - [:octicons-arrow-right-24: Read more on tokenizing case changes] - [tokenize case changes] - - === "Version strings" - - ``` - \.(?!\d) - ``` - - When adding `.` to the separator, version strings like `1.2.3` are split - into `1`, `2` and `3`, which makes them undiscoverable via search. When - using this subexpression, a small lookahead is introduced which will - [preserve version strings] and keep them discoverable. - - [:octicons-arrow-right-24: Read more on tokenizing version numbers] - [tokenize version numbers] - - === "HTML/XML tags" - - ``` - &[lg]t; - ``` - - If your documentation includes HTML/XML code examples, you may want to allow - users to find specific tag names. Unfortunately, the `<` and `>` control - characters are encoded in code blocks as `<` and `>`. Adding this - subexpression to the separator allows for just that. - - [:octicons-arrow-right-24: Read more on tokenizing HTML/XML tags] - [tokenize html-xml tags] - - [Search support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - [lunr]: https://lunrjs.com - [lunr-languages]: https://github.com/MihaiValentin/lunr-languages - [lunr's default tokenizer]: https://github.com/olivernn/lunr.js/blob/aa5a878f62a6bba1e8e5b95714899e17e8150b38/lunr.js#L413-L456 - [site language]: changing-the-language.md#site-language - [words are split at case changes]: ?q=searchHighlight - [preserve version strings]: ?q=9.0.0 - [tokenize case changes]: ../blog/posts/search-better-faster-smaller.md#case-changes - [tokenize version numbers]: ../blog/posts/search-better-faster-smaller.md#version-numbers - [tokenize html-xml tags]: ../blog/posts/search-better-faster-smaller.md#htmlxml-tags - -#### Chinese language support - -[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · -[:octicons-tag-24: insiders-4.14.0][Insiders] · -:octicons-beaker-24: Experimental - -[Insiders] adds search support for the Chinese language (see our [blog article] -[chinese search] from May 2022) by integrating with the text segmentation -library [jieba], which can be installed with `pip`. - -``` sh -pip install jieba -``` - -If [jieba] is installed, the [built-in search plugin] automatically detects -Chinese characters and runs them through the segmenter. The following -configuration options are available: - -[`jieba_dict`](#+search.jieba_dict){ #+search.jieba_dict } - -: [:octicons-tag-24: insiders-4.17.2][Insiders] · :octicons-milestone-24: - Default: _none_ – This option allows for specifying a [custom dictionary] - to be used by [jieba] for segmenting text, replacing the default dictionary: - - ``` yaml - plugins: - - search: - jieba_dict: dict.txt # (1)! - ``` - - 1. The following alternative dictionaries are provided by [jieba]: - - - [dict.txt.small] – å 用内å˜è¾ƒå°çš„è¯å…¸æ–‡ä»¶ - - [dict.txt.big] – 支æŒç¹ä½“åˆ†è¯æ›´å¥½çš„è¯å…¸æ–‡ä»¶ - -[`jieba_dict_user`](#+search.jieba_dict_user){ #+search.jieba_dict_user } - -: [:octicons-tag-24: insiders-4.17.2][Insiders] · :octicons-milestone-24: - Default: _none_ – This option allows for specifying an additional - [user dictionary] to be used by [jieba] for segmenting text, augmenting the - default dictionary: - - ``` yaml - plugins: - - search: - jieba_dict_user: user_dict.txt - ``` - - User dictionaries can be used for tuning the segmenter to preserve - technical terms. - - [Insiders]: ../insiders/index.md - [chinese search]: ../blog/posts/chinese-search-support.md - [jieba]: https://pypi.org/project/jieba/ - [built-in search plugin]: #built-in-search-plugin - [custom dictionary]: https://github.com/fxsjy/jieba#%E5%85%B6%E4%BB%96%E8%AF%8D%E5%85%B8 - [dict.txt.small]: https://github.com/fxsjy/jieba/raw/master/extra_dict/dict.txt.small - [dict.txt.big]: https://github.com/fxsjy/jieba/raw/master/extra_dict/dict.txt.big - [user dictionary]: https://github.com/fxsjy/jieba#%E8%BD%BD%E5%85%A5%E8%AF%8D%E5%85%B8 - -### Search suggestions - -[:octicons-tag-24: 7.2.0][Search suggestions support] · -:octicons-unlock-24: Feature flag · -:octicons-beaker-24: Experimental - -When search suggestions are enabled, the search will display the likeliest -completion for the last word which can be accepted with the ++arrow-right++ key. -Add the following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - search.suggest -``` - -Searching for [:octicons-search-24: search su][Search suggestions example] -yields ^^search suggestions^^ as a suggestion. - - [Search suggestions support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.2.0 - [Search suggestions example]: ?q=search+su - -### Search highlighting - -[:octicons-tag-24: 7.2.0][Search highlighting support] · -:octicons-unlock-24: Feature flag · -:octicons-beaker-24: Experimental - -When search highlighting is enabled and a user clicks on a search result, -Material for MkDocs will highlight all occurrences after following the link. -Add the following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - search.highlight -``` - -Searching for [:octicons-search-24: code blocks][Search highlighting example] -highlights all occurrences of both terms. - - [Search highlighting support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.2.0 - [Search highlighting example]: ../reference/code-blocks.md?h=code+blocks - -### Search sharing - -[:octicons-tag-24: 7.2.0][Search sharing support] · -:octicons-unlock-24: Feature flag - -When search sharing is activated, a :material-share-variant: share button is -rendered next to the reset button, which allows to deep link to the current -search query and result. Add the following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - search.share -``` - -When a user clicks the share button, the URL is automatically copied to the -clipboard. - - [Search sharing support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.2.0 - -## Usage - -### Search boosting - -[:octicons-tag-24: 8.3.0][boost support] - -Pages can be boosted in search with the front matter `search.boost` property, -which will make them rank higher. Add the following lines at the top of a -Markdown file: - -=== ":material-arrow-up-circle: Rank up" - - ``` yaml - --- - search: - boost: 2 # (1)! - --- - - # Document title - ... - ``` - - 1. :woman_in_lotus_position: When boosting pages, be gentle and start with - __low values__. - -=== ":material-arrow-down-circle: Rank down" - - ``` yaml - --- - search: - boost: 0.5 - --- - - # Document title - ... - ``` - - [boost support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.3.0 - -### Search exclusion - -[:octicons-tag-24: 9.0.0][exclusion support] · -:octicons-beaker-24: Experimental - -Pages can be excluded from search with the front matter `search.exclude` -property, removing them from the index. Add the following lines at the top of a -Markdown file: - -``` yaml ---- -search: - exclude: true ---- - -# Document title -... -``` - - [exclusion support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.0.0 - -#### Excluding sections - -When [Attribute Lists] is enabled, specific sections of pages can be excluded -from search by adding the `data-search-exclude` pragma after a Markdown -heading: - -=== ":octicons-file-code-16: `docs/page.md`" - - ``` markdown - # Document title - - ## Section 1 - - The content of this section is included - - ## Section 2 { data-search-exclude } - - The content of this section is excluded - ``` - -=== ":octicons-codescan-16: `search_index.json`" - - ``` json - { - ... - "docs": [ - { - "location":"page/", - "text":"", - "title":"Document title" - }, - { - "location":"page/#section-1", - "text":"<p>The content of this section is included</p>", - "title":"Section 1" - } - ] - } - ``` - - [Attribute Lists]: extensions/python-markdown.md#attribute-lists - -#### Excluding blocks - -When [Attribute Lists] is enabled, specific sections of pages can be excluded -from search by adding the `data-search-exclude` pragma after a Markdown -inline- or block-level element: - -=== ":octicons-file-code-16: `docs/page.md`" - - ``` markdown - # Document title - - The content of this block is included - - The content of this block is excluded - { data-search-exclude } - ``` - -=== ":octicons-codescan-16: `search_index.json`" - - ``` json - { - ... - "docs": [ - { - "location":"page/", - "text":"<p>The content of this block is included</p>", - "title":"Document title" - } - ] - } - ``` diff --git a/docs/setup/setting-up-social-cards.md b/docs/setup/setting-up-social-cards.md deleted file mode 100644 index b89206d23c540000de2214cc33db13c42ce9dae1..0000000000000000000000000000000000000000 --- a/docs/setup/setting-up-social-cards.md +++ /dev/null @@ -1,320 +0,0 @@ -# Setting up social cards - -Social cards, also known as social previews, are images that are displayed when -a link to your project documentation is shared on social media. Material for -MkDocs can generate beautiful social cards automatically, using the [colors], -[fonts] and [logo][^1] defined in `mkdocs.yml`, -e.g.: - -<figure markdown> - -[![Social cards preview]][Social cards preview] - - <figcaption markdown> - -The social preview image for the page on [setting up site analytics]. -[Twitter's Card validator] shows how it will look when shared. - - </figcaption> -</figure> - - [^1]: - Both types of logos, images (`theme.logo`) and icons (`theme.icon.logo`) - are supported. While an image logo is used as-is, icons are filled with the - color used in the header (white or black), which depends on the primary - color. - - [colors]: changing-the-colors.md#primary-color - [fonts]: changing-the-fonts.md#regular-font - [logo]: changing-the-logo-and-icons.md#logo - [Social cards preview]: ../assets/screenshots/social-cards.png - [setting up site analytics]: setting-up-site-analytics.md - [Twitter's Card validator]: https://cards-dev.twitter.com/validator - -## Configuration - -### Built-in social plugin - -[:octicons-tag-24: 8.5.0][Social cards support] · -:octicons-cpu-24: Plugin · -:octicons-beaker-24: Experimental - -First, ensure you've installed all [dependencies] and have a valid [`site_url`] -[site_url], as social preview images must be referenced via absolute URLs. -Then, add the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - social -``` - -The following configuration options are available: - -[`cards`](#+social.cards){ #+social.cards } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - to generate social card images. If you want to switch the plugin off, e.g. - for local builds, you can use an [environment variable]: - - ``` yaml - plugins: - - social: - cards: !ENV [CARDS, false] - ``` - -[`cards_color`](#+social.cards_color){ #+social.cards_color } - -: :octicons-milestone-24: Default: [`theme.palette.primary`][palette.primary] - – This option specifies the colors for the background `fill` and foreground - `text` when generating the social card: - - ``` yaml - plugins: - - social: - cards_color: - fill: "#0FF1CE" # (1)! - text: "#FFFFFF" - ``` - - 1. Colors can either be defined as HEX colors, or as [CSS color keywords]. - Note that HEX colors must be enclosed in quotes. - -[`cards_font`](#+social.cards_font){ #+social.cards_font } - -: :octicons-milestone-24: Default: [`theme.font.text`][font.text] – This - option specifies which font to use for rendering the social card, which can - be any font hosted on [Google Fonts]: - - ``` yaml - plugins: - - social: - cards_font: Roboto - ``` - - !!! question "Why do social cards render boxes for CJK languages?" - - Some fonts do not contain CJK characters, like for example the - [default font, `Roboto`][font.text]. In case your `site_name`, - `site_description`, or [page title] contain CJK characters, choose - another font from [Google Fonts] which comes with CJK characters, e.g. - one from the `Noto Sans` font family: - - === "Chinese (Simplified)" - - ``` yaml - plugins: - - social: - cards_font: Noto Sans SC - ``` - - === "Chinese (Traditional)" - - ``` yaml - plugins: - - social: - cards_font: Noto Sans TC - ``` - - === "Japanese" - - ``` yaml - plugins: - - social: - cards_font: Noto Sans JP - ``` - - === "Korean" - - ``` yaml - plugins: - - social: - cards_font: Noto Sans KR - ``` - -[`cards_dir`](#+social.cards_dir){ #+social.cards_dir } - -: :octicons-milestone-24: Default: `assets/images/social` – This option - specifies where the generated social card images will be written to. It's - normally not necessary to change this option: - - ``` yaml - plugins: - - social: - cards_dir: path/to/folder - ``` - - [Social cards support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.5.0 - [dependencies]: #dependencies - [site_url]: https://www.mkdocs.org/user-guide/configuration/#site_url - [palette.primary]: changing-the-colors.md#primary-color - [font.text]: changing-the-fonts.md#regular-font - [environment variable]: https://www.mkdocs.org/user-guide/configuration/#environment-variables - [CSS color keywords]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#color_keywords - [Google Fonts]: https://fonts.google.com - [page title]: ../reference/index.md#setting-the-page-title - -#### Dependencies - -Two Python libraries must be installed alongside Material for MkDocs to generate -the social preview images, both of which are based on [Cairo Graphics] – -[Pillow] and [CairoSVG]: - -``` -pip install pillow cairosvg -``` - -Both libraries are built with native extensions which need to be installed as -well. The [Docker image] comes with all dependencies pre-installed. If you don't -want to use Docker, see the following section which explains how to install all -dependencies on your system: - -=== ":material-apple: macOS" - - Make sure [Homebrew] is installed, which is a modern package manager for - macOS. Next, use the following command to install all necessary - dependencies: - - ``` - brew install cairo freetype libffi libjpeg libpng zlib - ``` - -=== ":fontawesome-brands-windows: Windows" - - As stated in the [installation guide], the easiest way to get up and running - with the [Cairo Graphics] library on Windows is by installing [GTK+], since - it has Cairo as a dependency. You can also download and install a - precompiled [GTK runtime]. - -=== ":material-linux: Linux" - - There are several package managers for Linux with varying availability per - distribution. The [installation guide] explains how to install the [Cairo - Graphics] library for your distribution: - - === ":material-ubuntu: Ubuntu" - - ``` - apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev - ``` - - === ":material-fedora: Fedora" - - ``` - yum install cairo-devel freetype-devel libffi-devel libjpeg-devel libpng-devel zlib-devel - ``` - - === ":fontawesome-brands-suse: openSUSE" - - ``` - zypper install cairo-devel freetype-devel libffi-devel libjpeg-devel libpng-devel zlib-devel - ``` - - [Cairo Graphics]: https://www.cairographics.org/ - [Pillow]: https://pillow.readthedocs.io/ - [CairoSVG]: https://cairosvg.org/ - [Docker image]: https://hub.docker.com/r/squidfunk/mkdocs-material/ - [Homebrew]: https://brew.sh/ - [installation guide]: https://www.cairographics.org/download/ - [GTK+]: https://www.gtk.org/docs/installations/windows/ - [GTK runtime]: https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases - -#### Caching <small>recommended</small> { #caching data-toc-label="Caching" } - -The [built-in social plugin] automatically fetches the fonts you define in -`mkdocs.yml` from Google Fonts, and uses them to render the text that is -displayed on the social card. The font files and generated cards are both -written to the `.cache` directory, which is used in subsequent builds to detect -whether the social cards need to be regenerated. You might want to: - -1. Ignore the `.cache` directory in your project, by adding it to `.gitignore`. -2. When building your site for publishing, use a build cache to save the - `.cache` directory in between builds. Taking the example from the - [publishing guide], add the following lines: - - ``` yaml hl_lines="15-18" - name: ci - on: - push: - branches: - - master - - main - jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: 3.x - - uses: actions/cache@v2 - with: - key: ${{ github.ref }} - path: .cache - - run: pip install mkdocs-material - - run: mkdocs gh-deploy --force - ``` - - [built-in social plugin]: #built-in-social-plugin - [publishing guide]: ../publishing-your-site.md#with-github-actions - -#### Meta tags - -The [built-in social plugin] automatically sets all necessary `meta` tags, -equivalent to the following two customizations, which you can set manually when -you don't want to use it: - -=== ":material-graph: Open Graph" - - ``` html - {% extends "base.html" %} - - {% block extrahead %} - {% set title = config.site_name %} - {% if page and page.meta and page.meta.title %} - {% set title = title ~ " - " ~ page.meta.title %} - {% elif page and page.title and not page.is_homepage %} - {% set title = title ~ " - " ~ page.title %} - {% endif %} - <meta property="og:type" content="website" /> - <meta property="og:title" content="{{ title }}" /> - <meta property="og:description" content="{{ config.site_description }}" /> - <meta property="og:url" content="{{ page.canonical_url }}" /> - <meta property="og:image" content="<url>" /> - <meta property="og:image:type" content="image/png" /> - <meta property="og:image:width" content="1200" /> - <meta property="og:image:height" content="630" /> - {% endblock %} - ``` - -=== ":fontawesome-brands-twitter: Twitter Cards" - - ``` html - {% extends "base.html" %} - - {% block extrahead %} - {% set title = config.site_name %} - {% if page and page.meta and page.meta.title %} - {% set title = title ~ " - " ~ page.meta.title %} - {% elif page and page.title and not page.is_homepage %} - {% set title = title ~ " - " ~ page.title %} - {% endif %} - <meta name="twitter:card" content="summary_large_image" /> - <meta name="twitter:title" content="{{ title }}" /> - <meta name="twitter:description" content="{{ config.site_description }}" /> - <meta name="twitter:image" content="<url>" /> - {% endblock %} - ``` - - [Twitter Cards]: https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards - -## Usage - -If you want to adjust the title or set a custom description for the social card, -you can set the front matter `title` and `description` properties, which take -precedence over the default values. - -- [Changing the title] -- [Changing the description] - - [Changing the title]: ../reference/index.md#setting-the-page-title - [Changing the description]: ../reference/index.md#setting-the-page-description diff --git a/docs/setup/setting-up-tags.md b/docs/setup/setting-up-tags.md deleted file mode 100644 index 30ed0c935d2204e316886996c4fcea2af0dfe6d5..0000000000000000000000000000000000000000 --- a/docs/setup/setting-up-tags.md +++ /dev/null @@ -1,346 +0,0 @@ -# Setting up tags - -Material for MkDocs adds first-class support for categorizing pages with tags, -which adds the possibility to group related pages and make them discoverable -via search and a dedicated [tags index]. If your documentation is large, tags -can help to discover relevant information faster. - - [tags index]: #adding-a-tags-index - -## Configuration - -### Built-in tags plugin - -[:octicons-tag-24: 8.2.0][Tags support] · -:octicons-cpu-24: Plugin - -The built-in tags plugin adds the ability to categorize any page with tags -as part of the front matter of the page. In order to add support for tags, add -the following lines to `mkdocs.yml`: - -``` yaml -plugins: - - tags -``` - -The following configuration options are available: - -[`enabled`](#+tags.enabled){ #+tags.enabled } - -: :octicons-milestone-24: Default: `true` – This option specifies whether - the plugin is enabled when building your project. If you want to speed up - local builds, you can use an [environment variable]: - - ``` yaml - plugins: - - tags: - enabled: !ENV [CI, false] - ``` - -[`tags_file`](#+tags.tags_file){ #+tags.tags_file } - -: :octicons-milestone-24: Default: _none_ – This option specifies which page - should be used to render the tags index. See the section on [adding a tags - index][tags index] for more information. If this option is specified, tags - become clickable, pointing to the corresponding section in the tags index: - - ``` yaml - plugins: - - tags: - tags_file: tags.md - ``` - - The page holding the tags index can be linked anywhere in the `nav` section - of `mkdocs.yml`. Note, however, that this options is not required – only use - it if you want a tags index page. - -[`tags_extra_files`](#+tags.tags_extra_files){ #+tags.tags_extra_files } - -: [:octicons-tag-24: insiders-4.20.0][Insiders] · :octicons-milestone-24: - Default: _none_ – This option specifies additional pages, i.e. to render - subsets of the [tags index], in order to provide scoped tags indexes for - specific sections: - - ``` yaml - plugins: - - tags: - tags_extra_files: - compatibility.md: - - compat # (1)! - web.md: - - html - - js - - css - ``` - - 1. Each page can be assigned a list of [tag identifiers], which must be - defined as part of `extra.tags` in `mkdocs.yml`: - - ``` yaml - extra: - tags: - Compatibility: compat - HTML5: html - JavaScript: js - CSS: css - ``` - - In this example, all pages with the tag `Compatibility` will be included - in the additional tags index on `compatibility.md`, all pages defining - at least one of the tags `HTML5`, `JavaScript` or `CSS` will be included - in the additional tags index on `web.md`. - - Note that the values listed under each tags extra file must be alphanumeric - [tag identifiers], not tags themselves. See #3864 for more information. - -[`tags_slugify`](#+tags.tags_slugify){ #+tags.tags_slugify } - -: [:octicons-tag-24: insiders-4.25.0][Insiders] · :octicons-milestone-24: - Default: `headerid.slugify` – This option specifies which function to use for - generating URL-compatible slugs from tags. [Python Markdown Extensions] - includes several Unicode-aware slug functions which are a good choice for - non-ASCII languages: - - === "Unicode" - - ``` yaml - plugins: - - tags: - tags_slugify: !!python/object/apply:pymdownx.slugs.slugify - kwds: - case: lower - ``` - - === "Unicode, case-sensitive" - - ``` yaml - plugins: - - tags: - tags_slugify: !!python/object/apply:pymdownx.slugs.slugify - ``` - -[`tags_slugify_separator`](#+tags.tags_slugify_separator){ #+tags.tags_slugify_separator } - -: [:octicons-tag-24: insiders-4.25.0][Insiders] · :octicons-milestone-24: - Default: `-` – This option specifies the separator which is used by the slug function. By default, a hyphen is used, but it can - be changed to any string: - - ``` yaml - plugins: - - tags: - tags_slugify_separator: "-" - ``` - -[`tags_compare`](#+tags.tags_compare){ #+tags.tags_compare } - -: [:octicons-tag-24: insiders-4.26.2][Insiders] · :octicons-milestone-24: - Default: `None` – This option specifies which function to use when - comparing tag values for sorting. If you wish to compare tags irregardless - of casing, use: - - ``` yaml - plugins: - - tags: - tags_compare: !!python/name:material.plugins.tags.plugin.casefold - ``` - - You can also define your own comparison function which must return a tag - value (as a string) that is used for sorting, and reference it accordingly. - -[`tags_compare_reverse`](#+tags.tags_compare_reverse){ #+tags.tags_compare_reverse } - -: [:octicons-tag-24: insiders-4.26.2][Insiders] · :octicons-milestone-24: - Default: `false` – This option specifies whether tags are sorted in reverse - order. It is mainly provided for completeness. To change direction, use: - - ``` yaml - plugins: - - tags: - tags_compare_reverse: true - ``` - -[`tags_allowed`](#+tags.tags_allowed){ #+tags.tags_allowed } - -: [:octicons-tag-24: insiders-4.25.0][Insiders] · :octicons-milestone-24: - Default: _none_ – This option allows the author to define explicitly which - tags are allowed to be used on pages. If this setting is omitted, the - [built-in tags plugin] won't check tag names. Use this option to define a - list of tags in order to catch typos: - - ``` yaml - plugins: - - tags: - tags_allowed: - - HTML5 - - JavaScript - - CSS - ``` - - [Tags support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.2.0 - [environment variable]: https://www.mkdocs.org/user-guide/configuration/#environment-variables - [Insiders]: ../insiders/index.md - [tag identifiers]: #tag-icons-and-identifiers - [Python Markdown Extensions]: https://facelessuser.github.io/pymdown-extensions/extras/slugs/ - -### Tag icons and identifiers - -[:octicons-tag-24: 8.5.0][Tag icons support] · -:octicons-beaker-24: Experimental - -Each tag can be associated with an icon, which is then rendered inside the tag. -Before assigning icons to tags, associate each tag with a unique identifier, -by adding the following to `mkdocs.yml`: - -``` yaml -extra: - tags: - <tag>: <identifier> # (1)! -``` - -1. The identifier can only include alphanumeric characters, as well as dashes - and underscores. For example, if you have a tag `Compatibility`, you can - set `compat` as an identifier: - - ``` yaml - extra: - tags: - Compatibility: compat - ``` - - Identifiers can be reused between tags. Tags which are not explicitly - associated will use the default tag icon which is :material-pound: - -Next, each identifier can be associated with an icon, even a [custom icon], by -adding the following lines to `mkdocs.yml` under the `theme.icon` configuration -setting: - -=== "Tag icon" - - ``` yaml - theme: - icon: - tag: - <identifier>: <icon> # (1)! - ``` - - 1. Enter a few keywords to find the perfect icon using our [icon search] and - click on the shortcode to copy it to your clipboard: - - <div class="mdx-iconsearch" data-mdx-component="iconsearch"> - <input class="md-input md-input--stretch mdx-iconsearch__input" placeholder="Search icon" data-mdx-component="iconsearch-query" value="tag" /> - <div class="mdx-iconsearch-result" data-mdx-component="iconsearch-result" data-mdx-mode="file"> - <div class="mdx-iconsearch-result__meta"></div> - <ol class="mdx-iconsearch-result__list"></ol> - </div> - </div> - -=== "Tag default icon" - - ``` yaml - theme: - icon: - tag: - default: <icon> - ``` - -??? example "Expand to inspect example" - - ``` yaml - theme: - icon: - tag: - html: fontawesome/brands/html5 - js: fontawesome/brands/js - css: fontawesome/brands/css3 - extra: - tags: - HTML5: html - JavaScript: js - CSS: css - ``` - - [Tag icons support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.5.0 - [custom icon]: changing-the-logo-and-icons.md#additional-icons - [icon search]: ../reference/icons-emojis.md#search - -## Usage - -### Adding tags - -When the [built-in tags plugin] is enabled, tags can be added for a document -with the front matter `tags` property. Add the following lines at the top of a -Markdown file: - -``` sh ---- -tags: - - HTML5 - - JavaScript - - CSS ---- - -... -``` - -The page will now render with those tags above the main headline and within the -search preview, which now allows to __find pages by tags__. - -??? question "How to set tags for an entire folder?" - - With the help of the [built-in meta plugin], you can ensure that tags are - set for an entire section and all nested pages, by creating a `.meta.yml` - file in the corresponding folder with the following content: - - ``` yaml - tags: - - HTML5 - - JavaScript - - CSS - ``` - - The tags set in `.meta.yml` are merged and deduplicated with the tags - defined for a page, which means you can define common tags in `.meta.yml` - and then add specific tags for each page. The tags in `.meta.yml` are - appended. - - [built-in tags plugin]: #built-in-tags-plugin - [built-in meta plugin]: ../reference/index.md#built-in-meta-plugin - -### Adding a tags index - -The [built-in tags plugin] allows to define a file to render a [tags index] -[tags.tags_file], which can be any page that is part of the `nav` section. To -add a tags index, create a page, e.g. `tags.md`: - -``` markdown -# Tags - -Following is a list of relevant tags: - -[TAGS] -``` - -The `[TAGS]` marker specifies the position of the tags index, i.e. it is -replaced with the actual tags index when the page is rendered. You can include -arbitrary content before and after the marker: - -[![Tags index][tags index enabled]][tags index enabled] - - [tags.tags_file]: #tags-file - [tags index enabled]: ../assets/screenshots/tags-index.png - -### Hiding tags on a page - -While the tags are rendered above the main headline, sometimes, it might be -desirable to hide them for a specific page, which can be achieved with the -front matter `hide` property: - -``` yaml ---- -hide: - - tags ---- - -# Document title -... -``` diff --git a/docs/setup/setting-up-the-footer.md b/docs/setup/setting-up-the-footer.md deleted file mode 100644 index fb91e72d24f66a45df9be9376793d5bd10b47cb8..0000000000000000000000000000000000000000 --- a/docs/setup/setting-up-the-footer.md +++ /dev/null @@ -1,193 +0,0 @@ -# Setting up the footer - -The footer of your project documentation is a great place to add links to -websites or platforms you or your company are using as additional marketing -channels, e.g. :fontawesome-brands-mastodon:{ style="color: #5A4CE0" } or -:fontawesome-brands-youtube:{ style="color: #EE0F0F" }, which you can easily -configure via `mkdocs.yml`. - -## Configuration - -### Navigation - -[:octicons-tag-24: 9.0.0][Navigation footer support] · -:octicons-unlock-24: Feature flag - -The footer can include links to the previous and next page of the current page. -If you wish to enable this behavior, add the following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - navigation.footer -``` - - [Navigation footer support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.0.0 - -### Social links - -[:octicons-tag-24: 1.0.0][Social links support] · -:octicons-milestone-24: Default: _none_ - -Social links are rendered next to the copyright notice as part of the -footer of your project documentation. Add a list of social links in `mkdocs.yml` -with: - -``` yaml -extra: - social: - - icon: fontawesome/brands/mastodon # (1)! - link: https://fosstodon.org/@squidfunk -``` - -1. Enter a few keywords to find the perfect icon using our [icon search] and - click on the shortcode to copy it to your clipboard: - - <div class="mdx-iconsearch" data-mdx-component="iconsearch"> - <input class="md-input md-input--stretch mdx-iconsearch__input" placeholder="Search icon" data-mdx-component="iconsearch-query" value="mastodon" /> - <div class="mdx-iconsearch-result" data-mdx-component="iconsearch-result" data-mdx-mode="file"> - <div class="mdx-iconsearch-result__meta"></div> - <ol class="mdx-iconsearch-result__list"></ol> - </div> - </div> - -The following properties are available for each link: - -[`icon`](#+social.icon){ #+social.icon } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property must contain a valid path to any icon bundled with the theme, - or the build will not succeed. Some popular choices: - - * :fontawesome-brands-mastodon: – `fontawesome/brands/mastodon` - <small>automatically adds [`rel=me`][rel=me]</small> - * :fontawesome-brands-twitter: – `fontawesome/brands/twitter` - * :fontawesome-brands-github: – `fontawesome/brands/github` - * :fontawesome-brands-docker: – `fontawesome/brands/docker` - * :fontawesome-brands-facebook: – `fontawesome/brands/facebook` - * :fontawesome-brands-medium: – `fontawesome/brands/medium` - * :fontawesome-brands-instagram: – `fontawesome/brands/instagram` - * :fontawesome-brands-linkedin: – `fontawesome/brands/linkedin` - * :fontawesome-brands-pied-piper-alt: – `fontawesome/brands/pied-piper-alt` - * :fontawesome-brands-slack: – `fontawesome/brands/slack` - -[`link`](#+social.link){ #+social.link } - -: :octicons-milestone-24: Default: _none_ · :octicons-alert-24: __Required__ – - This property must be set to a relative or absolute URL including the URI - scheme. All URI schemes are supported, including `mailto` and `bitcoin`: - - === ":fontawesome-brands-mastodon: Mastodon" - - ``` yaml - extra: - social: - - icon: fontawesome/brands/mastodon - link: https://fosstodon.org/@squidfunk - ``` - - === ":octicons-mail-16: Email" - - ``` yaml - extra: - social: - - icon: fontawesome/solid/paper-plane - link: mailto:<email-address> - ``` - -[`name`](#+social.name){ #+social.name } - -: :octicons-milestone-24: Default: _domain name from_ `link`_, if available_ – - This property is used as the link's `title` attribute and can be set to a - discernable name to improve accessibility: - - ``` yaml - extra: - social: - - icon: fontawesome/brands/mastodon - link: https://fosstodon.org/@squidfunk - name: squidfunk on Fosstodon - ``` - - [icon search]: ../reference/icons-emojis.md#search - [Social links support]: https://github.com/squidfunk/mkdocs-material/releases/tag/1.0.0 - [rel=me]: https://docs.joinmastodon.org/user/profile/#verification - -### Copyright notice - -[:octicons-tag-24: 0.1.0][Copyright notice support] · -:octicons-milestone-24: Default: _none_ - -A custom copyright banner can be rendered as part of the footer, which is -displayed next to the social links. It can be defined as part of `mkdocs.yml`: - -``` yaml -copyright: Copyright © 2016 - 2020 Martin Donath -``` - - [Copyright notice support]: https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0 - -### Generator notice - -[:octicons-tag-24: 7.3.0][Generator notice support] · -:octicons-milestone-24: Default: `true` - -The footer displays a _Made with Material for MkDocs_ notice to denote how -the site was generated. The notice can be removed with the following option -via `mkdocs.yml`: - -``` yaml -extra: - generator: false -``` - -!!! info "Please read this before removing the generator notice" - - The subtle __Made with Material for MkDocs__ hint in the footer is one of - the reasons why this project is so popular, as it tells the user how the - site is generated, helping new users to discover this project. Before - removing please consider that you're enjoying the benefits of @squidfunk's - work for free, as this project is Open Source and has a permissive license. - Thousands of hours went into this project, most of them - without any financial return. - - Thus, if you remove this notice, please consider [sponsoring][Insiders] the - project. __Thank you__ :octicons-heart-fill-24:{ .mdx-heart .mdx-insiders } - - [Generator notice support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.3.0 - [Insiders]: ../insiders/index.md - -## Usage - -### Hiding prev/next links - -The footer navigation showing links to the previous and next page can be hidden -with the front matter `hide` property. Add the following lines at the top of a -Markdown file: - -``` yaml ---- -hide: - - footer ---- - -# Document title -... -``` - -## Customization - -### Custom copyright - -[:octicons-tag-24: 8.0.0][Custom copyright support] · -:octicons-file-symlink-file-24: Customization - -In order to customize and override the [copyright notice], [extend the theme] -and [override the `copyright.html` partial][overriding partials], which normally -includes the `copyright` property set in `mkdocs.yml`. - - [Custom copyright support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.0.0 - [copyright notice]: #copyright-notice - [generator notice]: #generator-notice - [extend the theme]: ../customization.md#extending-the-theme - [overriding partials]: ../customization.md#overriding-partials diff --git a/docs/setup/setting-up-the-header.md b/docs/setup/setting-up-the-header.md deleted file mode 100644 index 9a90094367c908a3c457fa008fd1da419756ba99..0000000000000000000000000000000000000000 --- a/docs/setup/setting-up-the-header.md +++ /dev/null @@ -1,76 +0,0 @@ -# Setting up the header - -Material for MkDocs' header can be customized to show an announcement bar that -disappears upon scrolling, and provides some options for further configuration. -It also includes the [search bar] and a place to display your project's -[git repository], as explained in those dedicated guides. - - [search bar]: setting-up-site-search.md - [git repository]: adding-a-git-repository.md - -## Configuration - -### Automatic hiding - -[:octicons-tag-24: 6.2.0][Automatic hiding support] · -:octicons-unlock-24: Feature flag - -When autohiding is enabled, the header is automatically hidden when the -user scrolls past a certain threshold, leaving more space for content. Add the -following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - header.autohide -``` - - [Automatic hiding support]: https://github.com/squidfunk/mkdocs-material/releases/tag/6.2.0 - -### Announcement bar - -[:octicons-tag-24: 5.0.0][Announcement bar support] · -:octicons-file-symlink-file-24: Customization - -Material for MkDocs includes an announcement bar, which is the perfect place to -display project news or other important information to the user. When the user -scrolls past the header, the bar will automatically disappear. In order to add -an announcement bar, [extend the theme] and [override the `announce` -block][overriding blocks], which is empty by default: - -``` html -{% extends "base.html" %} - -{% block announce %} - <!-- Add announcement here, including arbitrary HTML --> -{% endblock %} -``` - - [Announcement bar support]: https://github.com/squidfunk/mkdocs-material/releases/tag/5.0.0 - [extend the theme]: ../customization.md#extending-the-theme - [overriding blocks]: ../customization.md#overriding-blocks - -#### Mark as read - -[:octicons-tag-24: 8.4.0][dismiss support] · -:octicons-unlock-24: Feature flag · -:octicons-beaker-24: Experimental - -In order to render temporary announcements that can be marked as read by the -user, a button to dismiss the current announcement can be included. Add the -following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - announce.dismiss -``` - -When the user clicks the button, the current announcement is dismissed and not -displayed again until the content of the announcement changes. This is handled -automatically. - -[Scroll to the top of this page][top] to see it in action. - - [dismiss support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.4.0 - [top]: # diff --git a/docs/setup/setting-up-versioning.md b/docs/setup/setting-up-versioning.md deleted file mode 100644 index 00f153f00a31bd81b79d7902a4c356e1542d635d..0000000000000000000000000000000000000000 --- a/docs/setup/setting-up-versioning.md +++ /dev/null @@ -1,142 +0,0 @@ -# Setting up versioning - -Material for MkDocs makes it easy to deploy multiple versions of your project -documentation by integrating with external utilities that add those capabilities -to MkDocs, i.e. [mike]. When deploying a new version, older versions of your -documentation remain untouched. - - [mike]: https://github.com/jimporter/mike - -## Configuration - -### Versioning - -[:octicons-tag-24: 7.0.0][Versioning support] · -[:octicons-package-24: Utility][mike] - -[mike] makes it easy to deploy multiple versions of your project documentation. -It integrates natively with Material for MkDocs and can be enabled via -`mkdocs.yml`: - -``` yaml -extra: - version: - provider: mike -``` - -This renders a version selector in the header: - -<figure markdown> - -[![Version selector preview]][Version selector preview] - - <figcaption markdown> - -Check out the versioning example to see it in action – -[squidfunk.github.io/mkdocs-material-example-versioning][version example] - - </figcaption> -</figure> - -!!! quote "[Why use mike?]" - - mike is built around the idea that once you've generated your docs for a - particular version, you should never need to touch that version again. This - means you never have to worry about breaking changes in MkDocs, since your - old docs (built with an old version of MkDocs) are already generated and - sitting in your `gh-pages` branch. - - While mike is flexible, it's optimized around putting your docs in a - `<major>.<minor>` directory, with optional aliases (e.g. `latest` or `dev`) - to particularly notable versions. This makes it easy to make permalinks to - whatever version of the documentation you want to direct people to. - - [Versioning support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.0.0 - [Version selector preview]: ../assets/screenshots/versioning.png - [version example]: https://squidfunk.github.io/mkdocs-material-example-versioning/ - [Why use mike?]: https://github.com/jimporter/mike#why-use-mike - -### Version warning - -[:octicons-tag-24: 8.0.0][Version warning support] · -:octicons-file-symlink-file-24: Customization - -If you're using versioning, you might want to display a warning when the user -visits any other version than the latest version. Using [theme extension], -you can [override the `outdated` block][overriding blocks]: - -``` html -{% extends "base.html" %} - -{% block outdated %} - You're not viewing the latest version. - <a href="{{ '../' ~ base_url }}"> <!-- (1)! --> - <strong>Click here to go to latest.</strong> - </a> -{% endblock %} -``` - -1. Given this value for the `href` attribute, the link will always redirect to - the root of your site, which will then redirect to the latest version. This - ensures that older versions of your site do not depend on a specific alias, - e.g. `latest`, to allow for changing the alias later on without breaking - earlier versions. - -This will render a version warning above the header: - -[![Version warning preview]][Version warning preview] - -The default version is identified by the `latest` alias. If you wish to set -another alias as the latest version, e.g. `stable`, add the following lines -to `mkdocs.yml`: - -``` yaml -extra: - version: - default: stable -``` - -Make sure that this matches the [default version]. - - [Version warning support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.0.0 - [theme extension]: ../customization.md#extending-the-theme - [overriding blocks]: ../customization.md#overriding-blocks - [Version warning preview]: ../assets/screenshots/version-warning.png - [default version]: #setting-a-default-version - -## Usage - -While this section outlines the basic workflow for publishing new versions, -it's best to check out [mike's documentation][mike] to make yourself familiar -with its mechanics. - -### Publishing a new version - -If you want to publish a new version of your project documentation, choose a -version identifier and update the alias set as the default version with: - -``` -mike deploy --push --update-aliases 0.1 latest -``` - -Note that every version will be deployed as a subdirectory of your `site_url`, -e.g.: - -- _docs.example.com/0.1/_ -- _docs.example.com/0.2/_ -- ... - -### Setting a default version - -When starting with [mike], a good idea is to set an alias as a default version, -e.g. `latest`, and when publishing a new version, always update the alias to -point to the latest version: - -``` -mike set-default --push latest -``` - -When publishing a new version, [mike] will create a redirect in the root of -your project documentation to the version associated with the alias: - -_docs.example.com_ :octicons-arrow-right-24: _docs.example.com/0.1_ diff --git a/docs/upgrade.md b/docs/upgrade.md deleted file mode 100644 index 65e0be0713aade015143ed9ede741462cda5b12d..0000000000000000000000000000000000000000 --- a/docs/upgrade.md +++ /dev/null @@ -1,1965 +0,0 @@ -# How to upgrade - -Upgrade to the latest version with: - -``` -pip install --upgrade --force-reinstall mkdocs-material -``` - -Show the currently installed version with: - -``` -pip show mkdocs-material -``` - -## Upgrading from 8.x to 9.x - -This major release includes a brand new search implementation that is faster -and allows for rich previews, advanced tokenization and better highlighting. -It was available as part of Insiders for over a year, and now that the funding -goal was hit, makes its way into the community edition. - -### Changes to `mkdocs.yml` - -#### `content.code.copy` - -The copy-to-clipboard buttons are now opt-in and can be enabled or disabled -per block. If you wish to enable them for all code blocks, add the following -lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - content.code.copy -``` - -#### `content.action.*` - -A "view source" button can be shown next to the "edit this page" button, both -of which must now be explicitly enabled. Add the following lines to -`mkdocs.yml`: - -``` yaml -theme: - features: - - content.action.edit - - content.action.view -``` - -#### `navigation.footer` - -The _previous_ and _next_ buttons in the footer are now opt-in. If you wish to -keep them for your documentation, add the following lines to `mkdocs.yml`: - -``` yaml -theme: - features: - - navigation.footer -``` - -#### `theme.language` - -The Korean and Norwegian language codes were renamed, as they were non-standard: - -- `kr` to `ko` -- `no` to `nb` - -#### `feedback.ratings` - -The old, nameless placeholders were removed (after being deprecated for several -months). Make sure to switch to the new named placeholders `{title}` and `{url}`: - -``` -https://github.com/.../issues/new/?title=[Feedback]+{title}+-+{url} -``` - -### Changes to `*.html` files - -The templates have undergone a series of changes. If you have customized -Material for MkDocs with theme extension, be sure to incorporate the latest -changes into your templates. A good starting point is to [inspect the diff]. - -!!! warning "Built-in plugins not working after upgrade?" - - If one of the built-in plugins (search or tags) doesn't work anymore without - any apparent error or cause, it is very likely related to custom overrides. - [MkDocs 1.4.1] and above allow themes to namespace built-in plugins, which - Material for MkDocs 9 now does in order to allow authors to use third-party - plugins with the same name as built-in plugins. Search your overrides for - [`"in config.plugins"`][in config.plugins] and add the `material/` namespace. - Affected partials: - - - [`content.html`][content.html] - - [`header.html`][header.html] - - [inspect the diff]: https://github.com/squidfunk/mkdocs-material/pull/4628/files#diff-3ca112736b9164701b599f34780107abf14bb79fe110c478cac410be90899828 - [MkDocs 1.4.1]: https://github.com/mkdocs/mkdocs/releases/tag/1.4.1 - [in config.plugins]: https://github.com/squidfunk/mkdocs-material/search?q=%22in+config.plugins%22 - [content.html]: https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/content.html - [header.html]: https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/header.html - -## Upgrading from 7.x to 8.x - -### What's new? - -- Added support for code annotations -- Added support for anchor tracking -- Added support for version warning -- Added `copyright` partial for easier override -- Removed deprecated content tabs legacy implementation -- Removed deprecated `seealso` admonition type -- Removed deprecated `site_keywords` setting (unsupported by MkDocs) -- Removed deprecated prebuilt search index support -- Removed deprecated web app manifest – use customization -- Removed `extracopyright` variable – use new `copyright` partial -- Removed Disqus integration – use customization -- Switched to `:is()` selectors for simple selector lists -- Switched autoprefixer from `last 4 years` to `last 2 years` -- Improved CSS overall to match modern standards -- Improved CSS variable semantics for fonts -- Improved extensibility by restructuring partials -- Improved handling of `details` when printing -- Improved keyboard navigation for footnotes -- Fixed #3214: Search highlighting breaks site when empty - -### Changes to `mkdocs.yml` - -#### `pymdownx.tabbed` - -Support for the legacy style of the [Tabbed] extension was dropped in favor -of the new, alternate implementation which has [better behavior on mobile -viewports]: - -=== "8.x" - - ``` yaml - markdown_extensions: - - pymdownx.tabbed: - alternate_style: true - ``` - -=== "7.x" - - ``` yaml - markdown_extensions: - - pymdownx.tabbed - ``` - - [Tabbed]: setup/extensions/python-markdown-extensions.md#tabbed - [better behavior on mobile viewports]: https://twitter.com/squidfunk/status/1424740370596958214 - -#### `pymdownx.superfences` - -The `*-experimental` suffix must be removed from the [custom fence][SuperFences] -class property, which is used to target code blocks to be rendered as [diagrams] -using [Mermaid.js]: - -=== "8.x" - - ``` yaml - markdown_extensions: - - pymdownx.superfences: - custom_fences: - - name: mermaid - class: mermaid - format: !!python/name:pymdownx.superfences.fence_code_format - ``` - -=== "7.x" - - ``` yaml - markdown_extensions: - - pymdownx.superfences: - custom_fences: - - name: mermaid - class: mermaid-experimental - format: !!python/name:pymdownx.superfences.fence_code_format - ``` - - [SuperFences]: setup/extensions/python-markdown-extensions.md#superfences - [diagrams]: reference/diagrams.md - [Mermaid.js]: https://mermaid-js.github.io/mermaid/ - -#### `google_analytics` - -This option was [deprecated in MkDocs 1.2.0], as the implementation of a -JavaScript-based analytics integration is the responsibility of a theme. -The following lines must be changed: - -=== "8.x" - - ``` yaml - extra: - analytics: - provider: google - property: UA-XXXXXXXX-X - ``` - -=== "7.x" - - ``` yaml - google_analytics: - - UA-XXXXXXXX-X - - auto - ``` - - [deprecated in MkDocs 1.2.0]: https://www.mkdocs.org/about/release-notes/#backward-incompatible-changes-in-12 - -### Changes to `*.html` files { data-search-exclude } - -The templates have undergone a set of changes to make them future-proof. If -you've used theme extension to override a block or template, make sure that it -matches the new structure: - -- If you've overridden a __block__, check `base.html` for potential changes -- If you've overridden a __template__, check the respective `*.html` file for - potential changes - -=== ":octicons-file-code-16: `base.html`" - - ``` diff - @@ -13,11 +13,6 @@ - {% elif config.site_description %} - <meta name="description" content="{{ config.site_description }}"> - {% endif %} - - {% if page and page.meta and page.meta.keywords %} - - <meta name="keywords" content="{{ page.meta.keywords }}"> - - {% elif config.site_keywords %} - - <meta name="keywords" content="{{ config.site_keywords }}"> - - {% endif %} - {% if page and page.meta and page.meta.author %} - <meta name="author" content="{{ page.meta.author }}"> - {% elif config.site_author %} - @@ -61,15 +56,13 @@ - font.text | replace(' ', '+') + ':300,400,400i,700%7C' + - font.code | replace(' ', '+') - }}&display=fallback"> - - <style>:root{--md-text-font-family:"{{ font.text }}";--md-code-font-family:"{{ font.code }}"}</style> - + <style>:root{--md-text-font:"{{ font.text }}";--md-code-font:"{{ font.code }}"}</style> - {% endif %} - {% endblock %} - - {% if config.extra.manifest %} - - <link rel="manifest" href="{{ config.extra.manifest | url }}" crossorigin="use-credentials"> - - {% endif %} - {% for path in config["extra_css"] %} - <link rel="stylesheet" href="{{ path | url }}"> - {% endfor %} - + {% include "partials/javascripts/base.html" %} - {% block analytics %} - {% include "partials/integrations/analytics.html" %} - {% endblock %} - @@ -89,7 +82,6 @@ - <body dir="{{ direction }}"> - {% endif %} - {% set features = config.theme.features or [] %} - - {% include "partials/javascripts/base.html" %} - {% if not config.theme.palette is mapping %} - {% include "partials/javascripts/palette.html" %} - {% endif %} - @@ -106,13 +98,25 @@ - </div> - <div data-md-component="announce"> - {% if self.announce() %} - - <aside class="md-banner md-announce"> - - <div class="md-banner__inner md-announce__inner md-grid md-typeset"> - + <aside class="md-banner"> - + <div class="md-banner__inner md-grid md-typeset"> - {% block announce %}{% endblock %} - </div> - </aside> - {% endif %} - </div> - + {% if config.extra.version %} - + <div data-md-component="outdated" hidden> - + <aside class="md-banner md-banner--warning"> - + {% if self.outdated() %} - + <div class="md-banner__inner md-grid md-typeset"> - + {% block outdated %}{% endblock %} - + </div> - + {% include "partials/javascripts/outdated.html" %} - + {% endif %} - + </aside> - + </div> - + {% endif %} - {% block header %} - {% include "partials/header.html" %} - {% endblock %} - @@ -156,25 +160,7 @@ - <div class="md-content" data-md-component="content"> - <article class="md-content__inner md-typeset"> - {% block content %} - - {% if page.edit_url %} - - <a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-content__button md-icon"> - - {% include ".icons/material/pencil.svg" %} - - </a> - - {% endif %} - - {% if not "\x3ch1" in page.content %} - - <h1>{{ page.title | d(config.site_name, true)}}</h1> - - {% endif %} - - {{ page.content }} - - {% if page and page.meta %} - - {% if page.meta.git_revision_date_localized or - - page.meta.revision_date - - %} - - {% include "partials/source-file.html" %} - - {% endif %} - - {% endif %} - - {% endblock %} - - {% block disqus %} - - {% include "partials/integrations/disqus.html" %} - + {% include "partials/content.html" %} - {% endblock %} - </article> - </div> - ``` - - ``` diff - @@ -38,13 +38,6 @@ - <meta name="description" content="{{ config.site_description }}" /> - {% endif %} - - - <!-- Page keywords --> - - {% if page and page.meta and page.meta.keywords %} - - <meta name="keywords" content="{{ page.meta.keywords }}" /> - - {% elif config.site_keywords %} - - <meta name="keywords" content="{{ config.site_keywords }}" /> - - {% endif %} - - - <!-- Page author --> - {% if page and page.meta and page.meta.author %} - <meta name="author" content="{{ page.meta.author }}" /> - @@ -120,27 +113,21 @@ - /> - <style> - :root { - - --md-text-font-family: "{{ font.text }}"; - - --md-code-font-family: "{{ font.code }}"; - + --md-text-font: "{{ font.text }}"; - + --md-code-font: "{{ font.code }}"; - } - </style> - {% endif %} - {% endblock %} - - - <!-- Progressive Web App Manifest --> - - {% if config.extra.manifest %} - - <link - - rel="manifest" - - href="{{ config.extra.manifest | url }}" - - crossorigin="use-credentials" - - /> - - {% endif %} - - - <!-- Custom style sheets --> - {% for path in config["extra_css"] %} - <link rel="stylesheet" href="{{ path | url }}" /> - {% endfor %} - - + <!-- Helper functions for inline scripts --> - + {% include "partials/javascripts/base.html" %} - + - <!-- Analytics --> - {% block analytics %} - {% include "partials/integrations/analytics.html" %} - @@ -172,7 +159,6 @@ - - <!-- Retrieve features from configuration --> - {% set features = config.theme.features or [] %} - - {% include "partials/javascripts/base.html" %} - - <!-- User preference: color palette --> - {% if not config.theme.palette is mapping %} - @@ -214,14 +200,28 @@ - <!-- Announcement bar --> - <div data-md-component="announce"> - {% if self.announce() %} - - <aside class="md-banner md-announce"> - - <div class="md-banner__inner md-announce__inner md-grid md-typeset"> - + <aside class="md-banner"> - + <div class="md-banner__inner md-grid md-typeset"> - {% block announce %}{% endblock %} - </div> - </aside> - {% endif %} - </div> - - + <!-- Version warning --> - + {% if config.extra.version %} - + <div data-md-component="outdated" hidden> - + <aside class="md-banner md-banner--warning"> - + {% if self.outdated() %} - + <div class="md-banner__inner md-grid md-typeset"> - + {% block outdated %}{% endblock %} - + </div> - + {% include "partials/javascripts/outdated.html" %} - + {% endif %} - + </aside> - + </div> - + {% endif %} - + - <!-- Header --> - {% block header %} - {% include "partials/header.html" %} - @@ -295,49 +295,11 @@ - {% block content %} - - - - <!-- Edit button --> - - {% if page.edit_url %} - - <a - - href="{{ page.edit_url }}" - - title="{{ lang.t('edit.link.title') }}" - - class="md-content__button md-icon" - - > - - {% include ".icons/material/pencil.svg" %} - - </a> - - {% endif %} - - - - <!-- - - Hack: check whether the content contains a h1 headline. If it - - doesn't, the page title (or respectively site name) is used - - as the main headline. - - --> - - {% if not "\x3ch1" in page.content %} - - <h1>{{ page.title | d(config.site_name, true)}}</h1> - - {% endif %} - - - - <!-- Markdown content --> - - {{ page.content }} - - - - <!-- Last update of source file --> - - {% if page and page.meta %} - - {% if page.meta.git_revision_date_localized or - - page.meta.revision_date - - %} - - {% include "partials/source-file.html" %} - - {% endif %} - - {% endif %} - - {% endblock %} - - - - <!-- Disqus integration --> - - {% block disqus %} - - {% include "partials/integrations/disqus.html" %} - + {% include "partials/content.html" %} - {% endblock %} - </article> - </div> - ``` - -=== ":octicons-file-code-16: `partials/copyright.html`" - - ``` diff - @@ -0,0 +1,16 @@ - +{#- - + This file was automatically generated - do not edit - +-#} - +<div class="md-copyright"> - + {% if config.copyright %} - + <div class="md-copyright__highlight"> - + {{ config.copyright }} - + </div> - + {% endif %} - + {% if not config.extra.generator == false %} - + Made with - + <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> - + Material for MkDocs - + </a> - + {% endif %} - +</div> - ``` - -=== ":octicons-file-code-16: `partials/footer.html`" - - ``` diff - @@ -41,21 +40,10 @@ - {% endif %} - <div class="md-footer-meta md-typeset"> - <div class="md-footer-meta__inner md-grid"> - - <div class="md-footer-copyright"> - - {% if config.copyright %} - - <div class="md-footer-copyright__highlight"> - - {{ config.copyright }} - - </div> - - {% endif %} - - {% if not config.extra.generator == false %} - - Made with - - <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> - - Material for MkDocs - - </a> - - {% endif %} - - {{ extracopyright }} - - </div> - - {% include "partials/social.html" %} - + {% include "partials/copyright.html" %} - + {% if config.extra.social %} - + {% include "partials/social.html" %} - + {% endif %} - </div> - </div> - </footer> - ``` - -=== ":octicons-file-code-16: `partials/social.html`" - - ``` diff - @@ -4,17 +4,15 @@ - -{% if config.extra.social %} - - <div class="md-footer-social"> - - {% for social in config.extra.social %} - - {% set title = social.name %} - - {% if not title and "//" in social.link %} - - {% set _,url = social.link.split("//") %} - - {% set title = url.split("/")[0] %} - - {% endif %} - - <a href="{{ social.link }}" target="_blank" rel="noopener" title="{{ title | e }}" class="md-footer-social__link"> - - {% include ".icons/" ~ social.icon ~ ".svg" %} - - </a> - - {% endfor %} - - </div> - -{% endif %} - +<div class="md-social"> - + {% for social in config.extra.social %} - + {% set title = social.name %} - + {% if not title and "//" in social.link %} - + {% set _, url = social.link.split("//") %} - + {% set title = url.split("/")[0] %} - + {% endif %} - + <a href="{{ social.link }}" target="_blank" rel="noopener" title="{{ title | e }}" class="md-social__link"> - + {% include ".icons/" ~ social.icon ~ ".svg" %} - + </a> - + {% endfor %} - +</div> - ``` - -## Upgrading from 6.x to 7.x - -### What's new? - -- Added support for deploying multiple versions -- Added support for integrating a language selector -- Added support for rendering admonitions as inline blocks -- Rewrite of the underlying reactive architecture -- Removed Webpack in favor of reactive build strategy (–480 dependencies) -- Fixed keyboard navigation for code blocks after content tabs switch - -### Changes to `mkdocs.yml` - -#### `extra.version.method` - -The versioning method configuration was renamed to `extra.version.provider` to -allow for different versioning strategies in the future: - -=== "7.x" - - ``` yaml - extra: - version: - provider: mike - ``` - -=== "6.x" - - ``` yaml - extra: - version: - method: mike - ``` - -### Changes to `*.html` files { data-search-exclude } - -The templates have undergone a set of changes to make them future-proof. If -you've used theme extension to override a block or template, make sure that it -matches the new structure: - -- If you've overridden a __block__, check `base.html` for potential changes -- If you've overridden a __template__, check the respective `*.html` file for - potential changes - -=== ":octicons-file-code-16: `base.html`" - - ``` diff - @@ -61,7 +61,7 @@ - font.text | replace(' ', '+') + ':300,400,400i,700%7C' + - font.code | replace(' ', '+') - }}&display=fallback"> - - <style>body,input{font-family:"{{ font.text }}",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"{{ font.code }}",SFMono-Regular,Consolas,Menlo,monospace}</style> - + <style>:root{--md-text-font-family:"{{ font.text }}";--md-code-font-family:"{{ font.code }}"}</style> - {% endif %} - {% endblock %} - {% if config.extra.manifest %} - @@ -131,7 +131,7 @@ - {% if page and page.meta and page.meta.hide %} - {% set hidden = "hidden" if "navigation" in page.meta.hide %} - {% endif %} - - <div class="md-sidebar md-sidebar--primary" data-md-component="navigation" {{ hidden }}> - + <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" {{ hidden }}> - <div class="md-sidebar__scrollwrap"> - <div class="md-sidebar__inner"> - {% include "partials/nav.html" %} - @@ -143,7 +143,7 @@ - {% if page and page.meta and page.meta.hide %} - {% set hidden = "hidden" if "toc" in page.meta.hide %} - {% endif %} - - <div class="md-sidebar md-sidebar--secondary" data-md-component="toc" {{ hidden }}> - + <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" {{ hidden }}> - <div class="md-sidebar__scrollwrap"> - <div class="md-sidebar__inner"> - {% include "partials/toc.html" %} - @@ -152,7 +152,7 @@ - </div> - {% endif %} - {% endblock %} - - <div class="md-content"> - + <div class="md-content" data-md-component="content"> - <article class="md-content__inner md-typeset"> - {% block content %} - {% if page.edit_url %} - @@ -183,10 +183,18 @@ - {% include "partials/footer.html" %} - {% endblock %} - </div> - - {% block scripts %} - - <script src="{{ 'assets/javascripts/vendor.18f0862e.min.js' | url }}"></script> - - <script src="{{ 'assets/javascripts/bundle.994580cf.min.js' | url }}"></script> - - {%- set translations = {} -%} - + <div class="md-dialog" data-md-component="dialog"> - + <div class="md-dialog__inner md-typeset"></div> - + </div> - + {% block config %} - + {%- set app = { - + "base": base_url, - + "features": features, - + "translations": {}, - + "search": "assets/javascripts/workers/search.217ffd95.min.js" | url, - + "version": config.extra.version or None - + } -%} - + {%- set translations = app.translations -%} - {%- for key in [ - "clipboard.copy", - "clipboard.copied", - @@ -204,19 +212,12 @@ - ] -%} - {%- set _ = translations.update({ key: lang.t(key) }) -%} - {%- endfor -%} - - <script id="__lang" type="application/json"> - - {{- translations | tojson -}} - - </script> - - {% block config %}{% endblock %} - - <script> - - app = initialize({ - - base: "{{ base_url }}", - - features: {{ features or [] | tojson }}, - - search: Object.assign({ - - worker: "{{ 'assets/javascripts/worker/search.9c0e82ba.min.js' | url }}" - - }, typeof search !== "undefined" && search) - - }) - + <script id="__config" type="application/json"> - + {{- app | tojson -}} - </script> - + {% endblock %} - + {% block scripts %} - + <script src="{{ 'assets/javascripts/bundle.926459b3.min.js' | url }}"></script> - {% for path in config["extra_javascript"] %} - <script src="{{ path | url }}"></script> - {% endfor %} - ``` - -=== ":octicons-file-code-16: `partials/footer.html`" - - ``` diff - - <div class="md-footer-nav"> - - <nav class="md-footer-nav__inner md-grid" aria-label="{{ lang.t('footer.title') }}"> - - {% if page.previous_page %} - - <a href="{{ page.previous_page.url | url }}" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> - - <div class="md-footer-nav__button md-icon"> - - {% include ".icons/material/arrow-left.svg" %} - - </div> - - <div class="md-footer-nav__title"> - - <div class="md-ellipsis"> - - <span class="md-footer-nav__direction"> - - {{ lang.t("footer.previous") }} - - </span> - - {{ page.previous_page.title }} - - </div> - - </div> - - </a> - - {% endif %} - - {% if page.next_page %} - - <a href="{{ page.next_page.url | url }}" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> - - <div class="md-footer-nav__title"> - - <div class="md-ellipsis"> - - <span class="md-footer-nav__direction"> - - {{ lang.t("footer.next") }} - - </span> - - {{ page.next_page.title }} - - </div> - + <nav class="md-footer__inner md-grid" aria-label="{{ lang.t('footer.title') }}"> - + {% if page.previous_page %} - + <a href="{{ page.previous_page.url | url }}" class="md-footer__link md-footer__link--prev" rel="prev"> - + <div class="md-footer__button md-icon"> - + {% include ".icons/material/arrow-left.svg" %} - + </div> - + <div class="md-footer__title"> - + <div class="md-ellipsis"> - + <span class="md-footer__direction"> - + {{ lang.t("footer.previous") }} - + </span> - + {{ page.previous_page.title }} - </div> - - <div class="md-footer-nav__button md-icon"> - - {% include ".icons/material/arrow-right.svg" %} - + </div> - + </a> - + {% endif %} - + {% if page.next_page %} - + <a href="{{ page.next_page.url | url }}" class="md-footer__link md-footer__link--next" rel="next"> - + <div class="md-footer__title"> - + <div class="md-ellipsis"> - + <span class="md-footer__direction"> - + {{ lang.t("footer.next") }} - + </span> - + {{ page.next_page.title }} - </div> - - </a> - - {% endif %} - - </nav> - - </div> - + </div> - + <div class="md-footer__button md-icon"> - + {% include ".icons/material/arrow-right.svg" %} - + </div> - + </a> - + {% endif %} - + </nav> - {% endif %} - <div class="md-footer-meta md-typeset"> - <div class="md-footer-meta__inner md-grid"> - ``` - -=== ":octicons-file-code-16: `partials/header.html`" - - ``` diff - @@ -6,21 +6,21 @@ - {% set site_url = site_url ~ "/index.html" %} - {% endif %} - <header class="md-header" data-md-component="header"> - - <nav class="md-header-nav md-grid" aria-label="{{ lang.t('header.title') }}"> - - <a href="{{ site_url }}" title="{{ config.site_name | e }}" class="md-header-nav__button md-logo" aria-label="{{ config.site_name }}"> - + <nav class="md-header__inner md-grid" aria-label="{{ lang.t('header.title') }}"> - + <a href="{{ site_url }}" title="{{ config.site_name | e }}" class="md-header__button md-logo" aria-label="{{ config.site_name }}"> - {% include "partials/logo.html" %} - </a> - - <label class="md-header-nav__button md-icon" for="__drawer"> - + <label class="md-header__button md-icon" for="__drawer"> - {% include ".icons/material/menu" ~ ".svg" %} - </label> - - <div class="md-header-nav__title" data-md-component="header-title"> - - <div class="md-header-nav__ellipsis"> - - <div class="md-header-nav__topic"> - + <div class="md-header__title" data-md-component="header-title"> - + <div class="md-header__ellipsis"> - + <div class="md-header__topic"> - <span class="md-ellipsis"> - {{ config.site_name }} - </span> - </div> - - <div class="md-header-nav__topic"> - + <div class="md-header__topic" data-md-component="header-topic"> - <span class="md-ellipsis"> - {% if page and page.meta and page.meta.title %} - {{ page.meta.title }} - @@ -31,14 +31,35 @@ - </div> - </div> - </div> - + <div class="md-header__options"> - + {% if config.extra.alternate %} - + <div class="md-select"> - + {% set icon = config.theme.icon.alternate or "material/translate" %} - + <span class="md-header__button md-icon"> - + {% include ".icons/" ~ icon ~ ".svg" %} - + </span> - + <div class="md-select__inner"> - + <ul class="md-select__list"> - + {% for alt in config.extra.alternate %} - + <li class="md-select__item"> - + <a href="{{ alt.link | url }}" class="md-select__link"> - + {{ alt.name }} - + </a> - + </li> - + {% endfor %} - + </ul> - + </div> - + </div> - + {% endif %} - + </div> - {% if "search" in config["plugins"] %} - - <label class="md-header-nav__button md-icon" for="__search"> - + <label class="md-header__button md-icon" for="__search"> - {% include ".icons/material/magnify.svg" %} - </label> - {% include "partials/search.html" %} - {% endif %} - {% if config.repo_url %} - - <div class="md-header-nav__source"> - + <div class="md-header__source"> - {% include "partials/source.html" %} - </div> - {% endif %} - ``` - -=== ":octicons-file-code-16: `partials/source.html`" - - ``` diff - @@ -4,5 +4,5 @@ - {% import "partials/language.html" as lang with context %} - -<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source"> - +<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source" data-md-component="source"> - <div class="md-source__icon md-icon"> - {% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %} - {% include ".icons/" ~ icon ~ ".svg" %} - ``` - -=== ":octicons-file-code-16: `partials/toc.html`" - - ``` diff - @@ -12,7 +12,7 @@ - <span class="md-nav__icon md-icon"></span> - {{ lang.t("toc.title") }} - </label> - - <ul class="md-nav__list" data-md-scrollfix> - + <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> - {% for toc_item in toc %} - {% include "partials/toc-item.html" %} - {% endfor %} - ``` - -## Upgrading from 5.x to 6.x - -### What's new? - -- Improved search result look and feel -- Improved search result stability while typing -- Improved search result grouping (pages + headings) -- Improved search result relevance and scoring -- Added display of missing query terms to search results -- Reduced size of vendor bundle by 25% (84kb → 67kb) -- Reduced size of the Docker image to improve CI build performance -- Removed hero partial in favor of custom implementation -- Removed deprecated front matter features - -### Changes to `mkdocs.yml` - -Following is a list of changes that need to be made to `mkdocs.yml`. Note that -you only have to adjust the value if you defined it, so if your configuration -does not contain the key, you can skip it. - -#### `theme.features` - -All feature flags that can be set from `mkdocs.yml`, like [tabs] and -[instant loading], are now prefixed with the name of the component or -function they apply to, e.g. `navigation.*`: - -=== "6.x" - - ``` yaml - theme: - features: - - navigation.tabs - - navigation.instant - ``` - -=== "5.x" - - ``` yaml - theme: - features: - - tabs - - instant - ``` - - [tabs]: setup/setting-up-navigation.md#navigation-tabs - [instant loading]: setup/setting-up-navigation.md#instant-loading - -### Changes to `*.html` files { data-search-exclude } - -The templates have undergone a set of changes to make them future-proof. If -you've used theme extension to override a block or template, make sure that it -matches the new structure: - -- If you've overridden a __block__, check `base.html` for potential changes -- If you've overridden a __template__, check the respective `*.html` file for - potential changes - -=== ":octicons-file-code-16: `base.html`" - - ``` diff - @@ -22,13 +22,6 @@ - - {% import "partials/language.html" as lang with context %} - - -<!-- Theme options --> - -{% set palette = config.theme.palette %} - -{% if not palette is mapping %} - - {% set palette = palette | first %} - -{% endif %} - -{% set font = config.theme.font %} - - - <!doctype html> - <html lang="{{ lang.t('language') }}" class="no-js"> - <head> - @@ -45,21 +38,8 @@ - <meta name="description" content="{{ config.site_description }}" /> - {% endif %} - - - <!-- Redirect --> - - {% if page and page.meta and page.meta.redirect %} - - <script> - - var anchor = window.location.hash.substr(1) - - location.href = '{{ page.meta.redirect }}' + - - (anchor ? '#' + anchor : '') - - </script> - - - - <!-- Fallback in case JavaScript is not available --> - - <meta http-equiv="refresh" content="0; url={{ page.meta.redirect }}" /> - - <meta name="robots" content="noindex" /> - - <link rel="canonical" href="{{ page.meta.redirect }}" /> - - - <!-- Canonical --> - - {% elif page.canonical_url %} - + {% if page.canonical_url %} - <link rel="canonical" href="{{ page.canonical_url }}" /> - {% endif %} - - @@ -96,20 +76,21 @@ - <link rel="stylesheet" href="{{ 'assets/stylesheets/main.css' | url }}" /> - - <!-- Extra color palette --> - - {% if palette.scheme or palette.primary or palette.accent %} - + {% if config.theme.palette %} - + {% set palette = config.theme.palette %} - <link - rel="stylesheet" - href="{{ 'assets/stylesheets/palette.css' | url }}" - /> - - {% endif %} - - - <!-- Theme-color meta tag for Android --> - - {% if palette.primary %} - - {% import "partials/palette.html" as map %} - - {% set primary = map.primary( - - palette.primary | replace(" ", "-") | lower - - ) %} - - <meta name="theme-color" content="{{ primary }}" /> - + <!-- Theme-color meta tag for Android --> - + {% if palette.primary %} - + {% import "partials/palette.html" as map %} - + {% set primary = map.primary( - + palette.primary | replace(" ", "-") | lower - + ) %} - + <meta name="theme-color" content="{{ primary }}" /> - + {% endif %} - {% endif %} - {% endblock %} - - @@ -120,7 +101,8 @@ - {% block fonts %} - - <!-- Load fonts from Google --> - - {% if font != false %} - + {% if config.theme.font != false %} - + {% set font = config.theme.font %} - <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin /> - <link - rel="stylesheet" - @@ -169,8 +151,12 @@ - - <!-- Text direction and color palette, if defined --> - {% set direction = config.theme.direction or lang.t('direction') %} - - {% if palette.scheme or palette.primary or palette.accent %} - - {% set scheme = palette.scheme | lower %} - + {% if config.theme.palette %} - + {% set palette = config.theme.palette %} - + {% if not palette is mapping %} - + {% set palette = palette | first %} - + {% endif %} - + {% set scheme = palette.scheme | replace(" ", "-") | lower %} - {% set primary = palette.primary | replace(" ", "-") | lower %} - {% set accent = palette.accent | replace(" ", "-") | lower %} - <body - @@ -179,18 +165,19 @@ - data-md-color-primary="{{ primary }}" - data-md-color-accent="{{ accent }}" - > - + - + <!-- Experimental: set color scheme based on preference --> - + {% if "preference" == scheme %} - + <script> - + if (matchMedia("(prefers-color-scheme: dark)").matches) - + document.body.setAttribute("data-md-color-scheme", "slate") - + </script> - + {% endif %} - + - {% else %} - <body dir="{{ direction }}"> - {% endif %} - - - <!-- Experimental: set color scheme based on preference --> - - {% if "preference" == palette.scheme %} - - <script> - - if (matchMedia("(prefers-color-scheme: dark)").matches) - - document.body.setAttribute("data-md-color-scheme", "slate") - - </script> - - {% endif %} - - - <!-- - State toggles - we need to set autocomplete="off" in order to reset the - drawer on back button invocation in some browsers - @@ -243,15 +230,11 @@ - <div class="md-container" data-md-component="container"> - - <!-- Hero teaser --> - - {% block hero %} - - {% if page and page.meta and page.meta.hero %} - - {% include "partials/hero.html" with context %} - - {% endif %} - - {% endblock %} - + {% block hero %}{% endblock %} - - <!-- Tabs navigation --> - {% block tabs %} - - {% if "tabs" in config.theme.features %} - + {% if "navigation.tabs" in config.theme.features %} - {% include "partials/tabs.html" %} - {% endif %} - {% endblock %} - @@ -310,13 +293,6 @@ - </a> - {% endif %} - - - <!-- Link to source file --> - - {% block source %} - - {% if page and page.meta and page.meta.source %} - - {% include "partials/source-link.html" %} - - {% endif %} - - {% endblock %} - - - <!-- - Hack: check whether the content contains a h1 headline. If it - doesn't, the page title (or respectively site name) is used - @@ -370,7 +346,10 @@ - "search.result.placeholder", - "search.result.none", - "search.result.one", - - "search.result.other" - + "search.result.other", - + "search.result.more.one", - + "search.result.more.other", - + "search.result.term.missing" - ] -%} - {%- set _ = translations.update({ key: lang.t(key) }) -%} - {%- endfor -%} - ``` - -=== ":octicons-file-code-16: `partials/hero.html`" - - ``` diff - @@ -1,12 +0,0 @@ - -{#- - - This file was automatically generated - do not edit - --#} - -{% set class = "md-hero" %} - -{% if "tabs" not in config.theme.features %} - - {% set class = "md-hero md-hero--expand" %} - -{% endif %} - -<div class="{{ class }}" data-md-component="hero"> - - <div class="md-hero__inner md-grid"> - - {{ page.meta.hero }} - - </div> - -</div> - ``` - -=== ":octicons-file-code-16: `partials/source-link`" - - ``` diff - @@ -1,14 +0,0 @@ - -{#- - - This file was automatically generated - do not edit - --#} - -{% import "partials/language.html" as lang with context %} - -{% set repo = config.repo_url %} - -{% if repo | last == "/" %} - - {% set repo = repo[:-1] %} - -{% endif %} - -{% set path = page.meta.path | default("") %} - -<a href="{{ [repo, path, page.meta.source] | join('/') }}" title="{{ page.meta.source }}" class="md-content__button md-icon"> - - {{ lang.t("meta.source") }} - - {% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %} - - {% include ".icons/" ~ icon ~ ".svg" %} - -</a> - ``` - -## Upgrading from 4.x to 5.x - -### What's new? - -- Reactive architecture – try `#!js app.dialog$.next("Hi!")` in the console -- [Instant loading] – make Material behave like a Single Page Application -- Improved CSS customization with [CSS variables] – set your brand's colors -- Improved CSS resilience, e.g. proper sidebar locking for customized headers -- Improved [icon integration] and configuration – now including over 5k icons -- Added possibility to use any icon for logo, repository and social links -- Search UI does not freeze anymore (moved to web worker) -- Search index built only once when using instant loading -- Improved extensible keyboard handling -- Support for [prebuilt search indexes] -- Support for displaying stars and forks for GitLab repositories -- Support for scroll snapping of sidebars and search results -- Reduced HTML and CSS footprint due to deprecation of Internet Explorer support -- Slight facelifting of some UI elements (admonitions, tables, ...) - - [CSS variables]: setup/changing-the-colors.md#custom-colors - [icon integration]: reference/icons-emojis.md#search - [prebuilt search indexes]: setup/setting-up-site-search.md#built-in-search-plugin - -### Changes to `mkdocs.yml` - -Following is a list of changes that need to be made to `mkdocs.yml`. Note that -you only have to adjust the value if you defined it, so if your configuration -does not contain the key, you can skip it. - -#### `theme.feature` - -Optional features like [tabs] and [instant loading] are now implemented as -flags and can be enabled by listing them in `mkdocs.yml` under `theme.features`: - -=== "5.x" - - ``` yaml - theme: - features: - - tabs - - instant - ``` - -=== "4.x" - - ``` yaml - theme: - feature: - tabs: true - ``` - -#### `theme.logo.icon` - -The logo icon configuration was centralized under `theme.icon.logo` and can now -be set to any of the [icons bundled with the theme][icon integration]: - -=== "5.x" - - ``` yaml - theme: - icon: - logo: material/cloud - ``` - -=== "4.x" - - ``` yaml - theme: - logo: - icon: cloud - ``` - -#### `extra.repo_icon` - -The repo icon configuration was centralized under `theme.icon.repo` and can now -be set to any of the [icons bundled with the theme][icon integration]: - -=== "5.x" - - ``` yaml - theme: - icon: - repo: fontawesome/brands/gitlab - ``` - -=== "4.x" - - ``` yaml - extra: - repo_icon: gitlab - ``` - -#### `extra.search.*` - -Search is now configured as part of the [plugin options]. Note that the -search languages must now be listed as an array of strings and the `tokenizer` -was renamed to `separator`: - -=== "5.x" - - ``` yaml - plugins: - - search: - separator: '[\s\-\.]+' - lang: - - en - - de - - ru - ``` - -=== "4.x" - - ``` yaml - extra: - search: - language: en, de, ru - tokenizer: '[\s\-\.]+' - ``` - - [plugin options]: setup/setting-up-site-search.md#built-in-search-plugin - -#### `extra.social.*` - -Social links stayed in the same place, but the `type` key was renamed to `icon` -in order to match the new way of specifying which icon to be used: - -=== "5.x" - - ``` yaml - extra: - social: - - icon: fontawesome/brands/github-alt - link: https://github.com/squidfunk - ``` - -=== "4.x" - - ``` yaml - extra: - social: - - type: github - link: https://github.com/squidfunk - ``` - -### Changes to `*.html` files { data-search-exclude } - -The templates have undergone a set of changes to make them future-proof. If -you've used theme extension to override a block or template, make sure that it -matches the new structure: - -- If you've overridden a __block__, check `base.html` for potential changes -- If you've overridden a __template__, check the respective `*.html` file for - potential changes - -=== ":octicons-file-code-16: `base.html`" - - ``` diff - @@ -4,7 +4,6 @@ - {% import "partials/language.html" as lang with context %} - -{% set feature = config.theme.feature %} - {% set palette = config.theme.palette %} - {% set font = config.theme.font %} - <!doctype html> - @@ -30,19 +29,6 @@ - {% elif config.site_author %} - <meta name="author" content="{{ config.site_author }}"> - {% endif %} - - {% for key in [ - - "clipboard.copy", - - "clipboard.copied", - - "search.language", - - "search.pipeline.stopwords", - - "search.pipeline.trimmer", - - "search.result.none", - - "search.result.one", - - "search.result.other", - - "search.tokenizer" - - ] %} - - <meta name="lang:{{ key }}" content="{{ lang.t(key) }}"> - - {% endfor %} - <link rel="shortcut icon" href="{{ config.theme.favicon | url }}"> - <meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-5.0.0"> - {% endblock %} - @@ -56,9 +42,9 @@ - {% endif %} - {% endblock %} - {% block styles %} - - <link rel="stylesheet" href="{{ 'assets/stylesheets/application.********.css' | url }}"> - + <link rel="stylesheet" href="{{ 'assets/stylesheets/main.********.min.css' | url }}"> - {% if palette.primary or palette.accent %} - - <link rel="stylesheet" href="{{ 'assets/stylesheets/application-palette.********.css' | url }}"> - + <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.********.min.css' | url }}"> - {% endif %} - {% if palette.primary %} - {% import "partials/palette.html" as map %} - @@ -69,20 +55,17 @@ - {% endif %} - {% endblock %} - {% block libs %} - - <script src="{{ 'assets/javascripts/modernizr.********.js' | url }}"></script> - {% endblock %} - {% block fonts %} - {% if font != false %} - <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin> - <link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{ - font.text | replace(' ', '+') + ':300,400,400i,700%7C' + - font.code | replace(' ', '+') - }}&display=fallback"> - <style>body,input{font-family:"{{ font.text }}","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"{{ font.code }}","Courier New",Courier,monospace}</style> - {% endif %} - {% endblock %} - - <link rel="stylesheet" href="{{ 'assets/fonts/material-icons.css' | url }}"> - {% if config.extra.manifest %} - <link rel="manifest" href="{{ config.extra.manifest | url }}" crossorigin="use-credentials"> - {% endif %} - @@ -95,47 +77,50 @@ - {% endblock %} - {% block extrahead %}{% endblock %} - </head> - + {% set direction = config.theme.direction | default(lang.t('direction')) %} - {% if palette.primary or palette.accent %} - {% set primary = palette.primary | replace(" ", "-") | lower %} - {% set accent = palette.accent | replace(" ", "-") | lower %} - - <body dir="{{ lang.t('direction') }}" data-md-color-primary="{{ primary }}" data-md-color-accent="{{ accent }}"> - + <body dir="{{ direction }}" data-md-color-primary="{{ primary }}" data-md-color-accent="{{ accent }}"> - {% else %} - - <body dir="{{ lang.t('direction') }}"> - + <body dir="{{ direction }}"> - {% endif %} - - <svg class="md-svg"> - - <defs> - - {% set platform = config.extra.repo_icon or config.repo_url %} - - {% if "github" in platform %} - - {% include "assets/images/icons/github.f0b8504a.svg" %} - - {% elif "gitlab" in platform %} - - {% include "assets/images/icons/gitlab.6dd19c00.svg" %} - - {% elif "bitbucket" in platform %} - - {% include "assets/images/icons/bitbucket.1b09e088.svg" %} - - {% endif %} - - </defs> - - </svg> - <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> - <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> - - <label class="md-overlay" data-md-component="overlay" for="__drawer"></label> - + <label class="md-overlay" for="__drawer"></label> - + <div data-md-component="skip"> - + {% if page.toc | first is defined %} - + {% set skip = page.toc | first %} - + <a href="{{ skip.url | url }}" class="md-skip"> - + {{ lang.t('skip.link.title') }} - + </a> - + {% endif %} - + </div> - + <div data-md-component="announce"> - + {% if self.announce() %} - + <aside class="md-announce"> - + <div class="md-announce__inner md-grid md-typeset"> - + {% block announce %}{% endblock %} - + </div> - + </aside> - + {% endif %} - + </div> - {% block header %} - {% include "partials/header.html" %} - {% endblock %} - - <div class="md-container"> - + <div class="md-container" data-md-component="container"> - {% block hero %} - {% if page and page.meta and page.meta.hero %} - {% include "partials/hero.html" with context %} - {% endif %} - {% endblock %} - - {% if feature.tabs %} - - {% include "partials/tabs.html" %} - - {% endif %} - + {% block tabs %} - + {% if "tabs" in config.theme.features %} - + {% include "partials/tabs.html" %} - + {% endif %} - + {% endblock %} - - <main class="md-main" role="main"> - - <div class="md-main__inner md-grid" data-md-component="container"> - + <main class="md-main" data-md-component="main"> - + <div class="md-main__inner md-grid"> - {% block site_nav %} - {% if nav %} - <div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> - @@ -160,41 +141,25 @@ - <article class="md-content__inner md-typeset"> - {% block content %} - {% if page.edit_url %} - - <a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon"></a> - + <a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-content__button md-icon"> - + {% include ".icons/material/pencil.svg" %} - + </a> - {% endif %} - + {% block source %} - + {% if page and page.meta and page.meta.source %} - + {% include "partials/source-link.html" %} - + {% endif %} - + {% endblock %} - {% if not "\x3ch1" in page.content %} - <h1>{{ page.title | default(config.site_name, true)}}</h1> - {% endif %} - {{ page.content }} - - {% block source %} - - {% if page and page.meta and page.meta.source %} - - <h2 id="__source">{{ lang.t("meta.source") }}</h2> - - {% set repo = config.repo_url %} - - {% if repo | last == "/" %} - - {% set repo = repo[:-1] %} - - {% endif %} - - {% set path = page.meta.path | default([""]) %} - - {% set file = page.meta.source %} - - <a href="{{ [repo, path, file] | join('/') }}" title="{{ file }}" class="md-source-file"> - - {{ file }} - - </a> - - {% endif %} - - {% endblock %} - + {% if page and page.meta %} - + {% if page.meta.git_revision_date_localized or - + page.meta.revision_date - + %} - + {% include "partials/source-date.html" %} - - {% if page and page.meta and ( - - page.meta.git_revision_date_localized or - - page.meta.revision_date - - ) %} - - {% set label = lang.t("source.revision.date") %} - - <hr> - - <div class="md-source-date"> - - <small> - - {% if page.meta.git_revision_date_localized %} - - {{ label }}: {{ page.meta.git_revision_date_localized }} - - {% elif page.meta.revision_date %} - - {{ label }}: {{ page.meta.revision_date }} - - {% endif %} - - </small> - - </div> - {% endif %} - {% endblock %} - {% block disqus %} - @@ -208,29 +174,35 @@ - {% include "partials/footer.html" %} - {% endblock %} - </div> - {% block scripts %} - - <script src="{{ 'assets/javascripts/application.********.js' | url }}"></script> - - {% if lang.t("search.language") != "en" %} - - {% set languages = lang.t("search.language").split(",") %} - - {% if languages | length and languages[0] != "" %} - - {% set path = "assets/javascripts/lunr/" %} - - <script src="{{ (path ~ 'lunr.stemmer.support.js') | url }}"></script> - - {% for language in languages | map("trim") %} - - {% if language != "en" %} - - {% if language == "ja" %} - - <script src="{{ (path ~ 'tinyseg.js') | url }}"></script> - - {% endif %} - - {% if language in ("ar", "da", "de", "es", "fi", "fr", "hu", "it", "ja", "nl", "no", "pt", "ro", "ru", "sv", "th", "tr", "vi") %} - - <script src="{{ (path ~ 'lunr.' ~ language ~ '.js') | url }}"></script> - - {% endif %} - - {% endif %} - - {% endfor %} - - {% if languages | length > 1 %} - - <script src="{{ (path ~ 'lunr.multi.js') | url }}"></script> - - {% endif %} - - {% endif %} - - {% endif %} - - <script>app.initialize({version:"{{ mkdocs_version }}",url:{base:"{{ base_url }}"}})</script> - + <script src="{{ 'assets/javascripts/vendor.********.min.js' | url }}"></script> - + <script src="{{ 'assets/javascripts/bundle.********.min.js' | url }}"></script> - + {%- set translations = {} -%} - + {%- for key in [ - + "clipboard.copy", - + "clipboard.copied", - + "search.config.lang", - + "search.config.pipeline", - + "search.config.separator", - + "search.result.placeholder", - + "search.result.none", - + "search.result.one", - + "search.result.other" - + ] -%} - + {%- set _ = translations.update({ key: lang.t(key) }) -%} - + {%- endfor -%} - + <script id="__lang" type="application/json"> - + {{- translations | tojson -}} - + </script> - + {% block config %}{% endblock %} - + <script> - + app = initialize({ - + base: "{{ base_url }}", - + features: {{ config.theme.features | tojson }}, - + search: Object.assign({ - + worker: "{{ 'assets/javascripts/worker/search.********.min.js' | url }}" - + }, typeof search !== "undefined" && search) - + }) - + </script> - {% for path in config["extra_javascript"] %} - <script src="{{ path | url }}"></script> - {% endfor %} - ``` - -=== ":octicons-file-code-16: `partials/footer.html`" - - ``` diff - @@ -5,34 +5,34 @@ - <div class="md-footer-nav"> - - <nav class="md-footer-nav__inner md-grid"> - + <nav class="md-footer-nav__inner md-grid" aria-label="{{ lang.t('footer.title') }}"> - {% if page.previous_page %} - - <a href="{{ page.previous_page.url | url }}" title="{{ page.previous_page.title | striptags }}" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev"> - - <div class="md-flex__cell md-flex__cell--shrink"> - - <i class="md-icon md-icon--arrow-back md-footer-nav__button"></i> - + <a href="{{ page.previous_page.url | url }}" title="{{ page.previous_page.title | striptags }}" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev"> - + <div class="md-footer-nav__button md-icon"> - + {% include ".icons/material/arrow-left.svg" %} - </div> - - <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title"> - - <span class="md-flex__ellipsis"> - + <div class="md-footer-nav__title"> - + <div class="md-ellipsis"> - <span class="md-footer-nav__direction"> - {{ lang.t("footer.previous") }} - </span> - {{ page.previous_page.title }} - - </span> - + </div> - </div> - </a> - {% endif %} - {% if page.next_page %} - - <a href="{{ page.next_page.url | url }}" title="{{ page.next_page.title | striptags }}" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next"> - - <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title"> - - <span class="md-flex__ellipsis"> - + <a href="{{ page.next_page.url | url }}" title="{{ page.next_page.title | striptags }}" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> - + <div class="md-footer-nav__title"> - + <div class="md-ellipsis"> - <span class="md-footer-nav__direction"> - {{ lang.t("footer.next") }} - </span> - {{ page.next_page.title }} - - </span> - + </div> - </div> - - <div class="md-flex__cell md-flex__cell--shrink"> - - <i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i> - + <div class="md-footer-nav__button md-icon"> - + {% include ".icons/material/arrow-right.svg" %} - </div> - </a> - {% endif %} - ``` - -=== ":octicons-file-code-16: `partials/header.html`" - - ``` diff - @@ -4,51 +4,43 @@ - <header class="md-header" data-md-component="header"> - - <nav class="md-header-nav md-grid"> - - <div class="md-flex"> - - <div class="md-flex__cell md-flex__cell--shrink"> - - <a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" aria-label="{{ config.site_name }}" class="md-header-nav__button md-logo"> - - {% if config.theme.logo.icon %} - - <i class="md-icon">{{ config.theme.logo.icon }}</i> - - {% else %} - - <img alt="logo" src="{{ config.theme.logo | url }}" width="24" height="24"> - - {% endif %} - - </a> - - </div> - - <div class="md-flex__cell md-flex__cell--shrink"> - - <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label> - - </div> - - <div class="md-flex__cell md-flex__cell--stretch"> - - <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title"> - - {% if config.site_name == page.title %} - - {{ config.site_name }} - - {% else %} - - <span class="md-header-nav__topic"> - - {{ config.site_name }} - - </span> - - <span class="md-header-nav__topic"> - - {% if page and page.meta and page.meta.title %} - - {{ page.meta.title }} - - {% else %} - - {{ page.title }} - - {% endif %} - - </span> - - {% endif %} - + <nav class="md-header-nav md-grid" aria-label="{{ lang.t('header.title') }}"> - + <a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" class="md-header-nav__button md-logo" aria-label="{{ config.site_name }}"> - + {% include "partials/logo.html" %} - + </a> - + <label class="md-header-nav__button md-icon" for="__drawer"> - + {% include ".icons/material/menu" ~ ".svg" %} - + </label> - + <div class="md-header-nav__title" data-md-component="header-title"> - + {% if config.site_name == page.title %} - + <div class="md-header-nav__ellipsis md-ellipsis"> - + {{ config.site_name }} - </div> - - </div> - - <div class="md-flex__cell md-flex__cell--shrink"> - - {% if "search" in config["plugins"] %} - - <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label> - - {% include "partials/search.html" %} - - {% endif %} - - </div> - - {% if config.repo_url %} - - <div class="md-flex__cell md-flex__cell--shrink"> - - <div class="md-header-nav__source"> - - {% include "partials/source.html" %} - - </div> - + {% else %} - + <div class="md-header-nav__ellipsis"> - + <span class="md-header-nav__topic md-ellipsis"> - + {{ config.site_name }} - + </span> - + <span class="md-header-nav__topic md-ellipsis"> - + {% if page and page.meta and page.meta.title %} - + {{ page.meta.title }} - + {% else %} - + {{ page.title }} - + {% endif %} - + </span> - </div> - {% endif %} - </div> - + {% if "search" in config["plugins"] %} - + <label class="md-header-nav__button md-icon" for="__search"> - + {% include ".icons/material/magnify.svg" %} - + </label> - + {% include "partials/search.html" %} - + {% endif %} - + {% if config.repo_url %} - + <div class="md-header-nav__source"> - + {% include "partials/source.html" %} - + </div> - + {% endif %} - </nav> - </header> - ``` - -=== ":octicons-file-code-16: `partials/hero.html`" - - ``` diff - @@ -4,9 +4,8 @@ - -{% set feature = config.theme.feature %} - {% set class = "md-hero" %} - -{% if not feature.tabs %} - +{% if "tabs" not in config.theme.features %} - {% set class = "md-hero md-hero--expand" %} - {% endif %} - <div class="{{ class }}" data-md-component="hero"> - ``` - -=== ":octicons-file-code-16: `partials/language.html`" - - ``` diff - @@ -4,12 +4,4 @@ - {% import "partials/language/" + config.theme.language + ".html" as lang %} - {% import "partials/language/en.html" as fallback %} - -{% macro t(key) %}{{ { - - "direction": config.theme.direction, - - "search.language": ( - - config.extra.search | default({}) - - ).language, - - "search.tokenizer": ( - - config.extra.search | default({}) - - ).tokenizer | default("", true), - -}[key] or lang.t(key) or fallback.t(key) }}{% endmacro %} - +{% macro t(key) %}{{ lang.t(key) | default(fallback.t(key)) }}{% endmacro %} - ``` - -=== ":octicons-file-code-16: `partials/logo.html`" - - ``` diff - @@ -0,0 +1,9 @@ - +{#- - + This file was automatically generated - do not edit - +-#} - +{% if config.theme.logo %} - + <img src="{{ config.theme.logo | url }}" alt="logo"> - +{% else %} - + {% set icon = config.theme.icon.logo or "material/library" %} - + {% include ".icons/" ~ icon ~ ".svg" %} - +{% endif %} - ``` - -=== ":octicons-file-code-16: `partials/nav-item.html`" - - ``` diff - @@ -14,9 +14,15 @@ - {% endif %} - <label class="md-nav__link" for="{{ path }}"> - {{ nav_item.title }} - + <span class="md-nav__icon md-icon"> - + {% include ".icons/material/chevron-right.svg" %} - + </span> - </label> - - <nav class="md-nav" data-md-component="collapsible" data-md-level="{{ level }}"> - + <nav class="md-nav" aria-label="{{ nav_item.title }}" data-md-level="{{ level }}"> - <label class="md-nav__title" for="{{ path }}"> - + <span class="md-nav__icon md-icon"> - + {% include ".icons/material/arrow-left.svg" %} - + </span> - {{ nav_item.title }} - </label> - <ul class="md-nav__list" data-md-scrollfix> - @@ -39,6 +45,9 @@ - {% if toc | first is defined %} - <label class="md-nav__link md-nav__link--active" for="__toc"> - {{ nav_item.title }} - + <span class="md-nav__icon md-icon"> - + {% include ".icons/material/table-of-contents.svg" %} - + </span> - </label> - {% endif %} - <a href="{{ nav_item.url | url }}" title="{{ nav_item.title | striptags }}" class="md-nav__link md-nav__link--active"> - ``` - -=== ":octicons-file-code-16: `partials/nav.html`" - - ``` diff - @@ -4,14 +4,10 @@ - -<nav class="md-nav md-nav--primary" data-md-level="0"> - - <label class="md-nav__title md-nav__title--site" for="__drawer"> - - <a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" class="md-nav__button md-logo"> - - {% if config.theme.logo.icon %} - - <i class="md-icon">{{ config.theme.logo.icon }}</i> - - {% else %} - - <img alt="logo" src="{{ config.theme.logo | url }}" width="48" height="48"> - - {% endif %} - +<nav class="md-nav md-nav--primary" aria-label="{{ lang.t('nav.title') }}" data-md-level="0"> - + <label class="md-nav__title" for="__drawer"> - + <a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" class="md-nav__button md-logo" aria-label="{{ config.site_name }}"> - + {% include "partials/logo.html" %} - </a> - {{ config.site_name }} - </label> - ``` - -=== ":octicons-file-code-16: `partials/search.html`" - - ``` diff - @@ -6,15 +6,18 @@ - <label class="md-search__overlay" for="__search"></label> - <div class="md-search__inner" role="search"> - <form class="md-search__form" name="search"> - - <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="{{ lang.t('search.placeholder') }}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active"> - + <input type="text" class="md-search__input" name="query" aria-label="{{ lang.t('search.placeholder') }}" placeholder="{{ lang.t('search.placeholder') }}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active"> - <label class="md-search__icon md-icon" for="__search"> - + {% include ".icons/material/magnify.svg" %} - + {% include ".icons/material/arrow-left.svg" %} - </label> - - <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1"> - -  - + <button type="reset" class="md-search__icon md-icon" aria-label="{{ lang.t('search.reset') }}" data-md-component="search-reset" tabindex="-1"> - + {% include ".icons/material/close.svg" %} - </button> - </form> - <div class="md-search__output"> - <div class="md-search__scrollwrap" data-md-scrollfix> - - <div class="md-search-result" data-md-component="result"> - + <div class="md-search-result" data-md-component="search-result"> - <div class="md-search-result__meta"> - {{ lang.t("search.result.placeholder") }} - </div> - ``` - -=== ":octicons-file-code-16: `partials/social.html`" - - ``` diff - @@ -4,9 +4,12 @@ - {% if config.extra.social %} - <div class="md-footer-social"> - - <link rel="stylesheet" href="{{ 'assets/fonts/font-awesome.css' | url }}"> - {% for social in config.extra.social %} - - <a href="{{ social.link }}" target="_blank" rel="noopener" title="{{ social.type }}" class="md-footer-social__link fa fa-{{ social.type }}"></a> - + {% set _,rest = social.link.split("//") %} - + {% set domain = rest.split("/")[0] %} - + <a href="{{ social.link }}" target="_blank" rel="noopener" title="{{ domain }}" class="md-footer-social__link"> - + {% include ".icons/" ~ social.icon ~ ".svg" %} - + </a> - {% endfor %} - </div> - {% endif %} - ``` - -=== ":octicons-file-code-16: `partials/source-date.html`" - - ``` diff - @@ -0,0 +1,15 @@ - +{#- - + This file was automatically generated - do not edit - +-#} - +{% import "partials/language.html" as lang with context %} - +{% set label = lang.t("source.revision.date") %} - +<hr> - +<div class="md-source-date"> - + <small> - + {% if page.meta.git_revision_date_localized %} - + {{ label }}: {{ page.meta.git_revision_date_localized }} - + {% elif page.meta.revision_date %} - + {{ label }}: {{ page.meta.revision_date }} - + {% endif %} - + </small> - +</div> - ``` - -=== ":octicons-file-code-16: `partials/source-link.html`" - - ``` diff - @@ -0,0 +1,13 @@ - +{#- - + This file was automatically generated - do not edit - +-#} - +{% import "partials/language.html" as lang with context %} - +{% set repo = config.repo_url %} - +{% if repo | last == "/" %} - + {% set repo = repo[:-1] %} - +{% endif %} - +{% set path = page.meta.path | default([""]) %} - +<a href="{{ [repo, path, page.meta.source] | join('/') }}" title="{{ file }}" class="md-content__button md-icon"> - + {{ lang.t("meta.source") }} - + {% include ".icons/" ~ config.theme.icon.repo ~ ".svg" %} - +</a> - ``` - -=== ":octicons-file-code-16: `partials/source.html`" - - ``` diff - @@ -4,24 +4,11 @@ - {% import "partials/language.html" as lang with context %} - -{% set platform = config.extra.repo_icon or config.repo_url %} - -{% if "github" in platform %} - - {% set repo_type = "github" %} - -{% elif "gitlab" in platform %} - - {% set repo_type = "gitlab" %} - -{% elif "bitbucket" in platform %} - - {% set repo_type = "bitbucket" %} - -{% else %} - - {% set repo_type = "" %} - -{% endif %} - -<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source" data-md-source="{{ repo_type }}"> - - {% if repo_type %} - - <div class="md-source__icon"> - - <svg viewBox="0 0 24 24" width="24" height="24"> - - <use xlink:href="#__{{ repo_type }}" width="24" height="24"></use> - - </svg> - - </div> - - {% endif %} - +<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source"> - + <div class="md-source__icon md-icon"> - + {% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %} - + {% include ".icons/" ~ icon ~ ".svg" %} - + </div> - <div class="md-source__repository"> - {{ config.repo_name }} - </div> - ``` - -=== ":octicons-file-code-16: `partials/tabs-item.html`" - - ``` diff - @@ -4,7 +4,7 @@ - -{% if nav_item.is_homepage %} - +{% if nav_item.is_homepage or nav_item.url == "index.html" %} - <li class="md-tabs__item"> - {% if not page.ancestors | length and nav | selectattr("url", page.url) %} - <a href="{{ nav_item.url | url }}" class="md-tabs__link md-tabs__link--active"> - ``` - -=== ":octicons-file-code-16: `partials/tabs.html`" - - ``` diff - @@ -5,7 +5,7 @@ - {% if page.ancestors | length > 0 %} - {% set class = "md-tabs md-tabs--active" %} - {% endif %} - -<nav class="{{ class }}" data-md-component="tabs"> - +<nav class="{{ class }}" aria-label="{{ lang.t('tabs.title') }}" data-md-component="tabs"> - <div class="md-tabs__inner md-grid"> - <ul class="md-tabs__list"> - {% for nav_item in nav %} - ``` - -=== ":octicons-file-code-16: `partials/toc-item.html`" - - ``` diff - @@ -6,7 +6,7 @@ - {{ toc_item.title }} - </a> - {% if toc_item.children %} - - <nav class="md-nav"> - + <nav class="md-nav" aria-label="{{ toc_item.title }}"> - <ul class="md-nav__list"> - {% for toc_item in toc_item.children %} - {% include "partials/toc-item.html" %} - ``` - -=== ":octicons-file-code-16: `partials/toc.html`" - - ``` diff - @@ -4,35 +4,22 @@ - {% import "partials/language.html" as lang with context %} - -<nav class="md-nav md-nav--secondary"> - +<nav class="md-nav md-nav--secondary" aria-label="{{ lang.t('toc.title') }}"> - {% endif %} - {% if toc | first is defined %} - <label class="md-nav__title" for="__toc"> - + <span class="md-nav__icon md-icon"> - + {% include ".icons/material/arrow-left.svg" %} - + </span> - {{ lang.t("toc.title") }} - </label> - <ul class="md-nav__list" data-md-scrollfix> - {% for toc_item in toc %} - {% include "partials/toc-item.html" %} - {% endfor %} - - {% if page.meta.source and page.meta.source | length > 0 %} - - <li class="md-nav__item"> - - <a href="#__source" class="md-nav__link md-nav__link--active"> - - {{ lang.t("meta.source") }} - - </a> - - </li> - - {% endif %} - - {% set disqus = config.extra.disqus %} - - {% if page and page.meta and page.meta.disqus is string %} - - {% set disqus = page.meta.disqus %} - - {% endif %} - - {% if not page.is_homepage and disqus %} - - <li class="md-nav__item"> - - <a href="#__comments" class="md-nav__link md-nav__link--active"> - - {{ lang.t("meta.comments") }} - - </a> - - </li> - - {% endif %} - </ul> - {% endif %} - </nav> - ``` - -## Upgrading from 3.x to 4.x - -### What's new? - -Material for MkDocs 4 fixes incorrect layout on Chinese systems. The fix -includes a mandatory change of the base font-size from `10px` to `20px` which -means all `rem` values needed to be updated. Within the theme, `px` to `rem` -calculation is now encapsulated in a new function called `px2rem` which is part -of the SASS code base. - -If you use Material for MkDocs with custom CSS that is based on `rem` values, -note that those values must now be divided by 2. Now, `1.0rem` doesn't map to -`10px`, but `20px`. To learn more about the problem and implications, please -refer to #911 in which the problem was discovered and fixed. - -### Changes to `mkdocs.yml` - -None. - -### Changes to `*.html` files - -None. diff --git a/material/.overrides/home.html b/material/.overrides/home.html index 1fcb2ebf54a7c1eeded6d0c8ba757aa5b9ceed68..8664babe30c6adb70abd39d001cd07906adf837c 100644 --- a/material/.overrides/home.html +++ b/material/.overrides/home.html @@ -12,13 +12,13 @@ <img src="assets/images/illustration.png" alt="" width="1659" height="1200" draggable="false"> </div> <div class="mdx-hero__content"> - <h1>Technical documentation that just works</h1> - <p>{{ config.site_description }}. Set up in 5 minutes.</p> + <h1>Latin American Giant Observatory</h1> + <p>{{ config.site_description }}</p> <a href="{{ page.next_page.url | url }}" title="{{ page.next_page.title | e }}" class="md-button md-button--primary"> - Quick start + About LAGO </a> - <a href="{{ 'insiders/' | url }}" title="Material for MkDocs Insiders" class="md-button"> - Get Insiders + <a href="{{ 'about/collaboration/' | url }}" title="LAGO Collaboration" class="md-button"> + Collaboration </a> </div> </div> diff --git a/material/.overrides/main.html b/material/.overrides/main.html index 259ee25ff30564dc4b8e001fbb1554d4744b7895..9b640601434cb3f235bd859cb44d777470f8ebc9 100644 --- a/material/.overrides/main.html +++ b/material/.overrides/main.html @@ -6,15 +6,8 @@ <link rel="stylesheet" href="{{ 'assets/stylesheets/custom.2fa34c39.min.css' | url }}"> {% endblock %} {% block announce %} - For updates follow <strong>@squidfunk</strong> on - <a rel="me" href="https://fosstodon.org/@squidfunk"> - <span class="twemoji mastodon"> - {% include ".icons/fontawesome/brands/mastodon.svg" %} - </span> - <strong>Fosstodon</strong> - </a> - and - <a href="https://twitter.com/squidfunk"> + For updates follow <strong>@lagoproject</strong> on + <a href="https://twitter.com/lagoproject"> <span class="twemoji twitter"> {% include ".icons/fontawesome/brands/twitter.svg" %} </span> diff --git a/mkdocs.yml b/mkdocs.yml index 4904602cd80a2dc75977baa533ddc6377226b897..675d4c044ac69fa8f91f7ae74a20eafbbc78965e 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -19,19 +19,18 @@ # IN THE SOFTWARE. # Project information -site_name: Material for MkDocs -site_url: https://squidfunk.github.io/mkdocs-material/ +site_name: The Latin American Giant Observatory (LAGO) +site_url: http://lagoproject.net/ site_author: Martin Donath site_description: >- - Write your documentation in Markdown and create a professional static site in - minutes – searchable, customizable, for all devices + An extended Astroparticle Observatory at global scale. It is mainly oriented to basic research on three branches of Astroparticle physics: the Extreme Universe, Space Weather phenomena, and Atmospheric Radiation at ground level. # Repository -repo_name: squidfunk/mkdocs-material -repo_url: https://github.com/squidfunk/mkdocs-material +repo_name: lago/lagoproject.net +repo_url: https://gitmilab.redclara.net/lago/lagoproject.net # Copyright -copyright: Copyright © 2016 - 2023 Martin Donath +copyright: Copyright © 2023 LAGO # Configuration theme: @@ -53,7 +52,7 @@ theme: # - navigation.prune - navigation.sections - navigation.tabs - # - navigation.tabs.sticky + - navigation.tabs.sticky - navigation.top - navigation.tracking - search.highlight @@ -78,8 +77,10 @@ theme: text: Roboto code: Roboto Mono favicon: assets/favicon.png + logo: assets/logo.png icon: logo: logo + repo: fontawesome/brands/gitlab # Plugins plugins: @@ -87,6 +88,7 @@ plugins: separator: '[\s\-,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])' - minify: minify_html: true + - social # Hooks hooks: @@ -99,17 +101,22 @@ extra: property: !ENV GOOGLE_ANALYTICS_KEY social: - icon: fontawesome/brands/github - link: https://github.com/squidfunk + link: https://gitmilab.redclara.net/lago - icon: fontawesome/brands/gitter link: https://gitter.im/squidfunk/mkdocs-material - icon: fontawesome/brands/docker - link: https://hub.docker.com/r/squidfunk/mkdocs-material/ - - icon: fontawesome/brands/python - link: https://pypi.org/project/mkdocs-material/ - - icon: fontawesome/brands/mastodon - link: https://fosstodon.org/@squidfunk + link: https://hub.docker.com/u/lagocollaboration - icon: fontawesome/brands/twitter - link: https://twitter.com/squidfunk + link: https://twitter.com/lagoproject + - icon: fontawesome/brands/facebook + link: https://www.facebook.com/lagoproject/ + consent: + title: Cookie consent + description: >- + We use cookies to recognize your repeated visits and preferences, as well + as to measure the effectiveness of our documentation and whether users + find what they're searching for. With your consent, you're helping us to + make our documentation better. # Extensions markdown_extensions: @@ -154,79 +161,20 @@ markdown_extensions: # Page tree nav: - Home: index.md - - Getting started: - - Installation: getting-started.md - - Creating your site: creating-your-site.md - - Publishing your site: publishing-your-site.md - - Customization: customization.md - - Browser support: browser-support.md - - Philosophy: philosophy.md - - Alternatives: alternatives.md - - License: license.md - - Changelog: - - changelog/index.md - - How to upgrade: upgrade.md - - Contributing: - - contributing/index.md - - Reporting a bug: contributing/reporting-a-bug.md - - Reporting a docs issue: contributing/reporting-a-docs-issue.md - - Requesting a change: contributing/requesting-a-change.md - - Asking a question: https://github.com/squidfunk/mkdocs-material/discussions - - Guides: - - Creating a reproduction: guides/creating-a-reproduction.md - - Setup: - - Changing the colors: setup/changing-the-colors.md - - Changing the fonts: setup/changing-the-fonts.md - - Changing the language: setup/changing-the-language.md - - Changing the logo and icons: setup/changing-the-logo-and-icons.md - - Ensuring data privacy: setup/ensuring-data-privacy.md - - Setting up navigation: setup/setting-up-navigation.md - - Setting up site search: setup/setting-up-site-search.md - - Setting up site analytics: setup/setting-up-site-analytics.md - - Setting up social cards: setup/setting-up-social-cards.md - - Setting up a blog: setup/setting-up-a-blog.md - - Setting up tags: setup/setting-up-tags.md - - Setting up versioning: setup/setting-up-versioning.md - - Setting up the header: setup/setting-up-the-header.md - - Setting up the footer: setup/setting-up-the-footer.md - - Adding a git repository: setup/adding-a-git-repository.md - - Adding a comment system: setup/adding-a-comment-system.md - - Building an optimized site: setup/building-an-optimized-site.md - - Building for offline usage: setup/building-for-offline-usage.md - - Extensions: - - setup/extensions/index.md - - Python Markdown: setup/extensions/python-markdown.md - - Python Markdown Extensions: setup/extensions/python-markdown-extensions.md - - Dependencies: - - setup/dependencies/image-processing.md - - Reference: - - reference/index.md - - Admonitions: reference/admonitions.md - - Annotations: reference/annotations.md - - Buttons: reference/buttons.md - - Code blocks: reference/code-blocks.md - - Content tabs: reference/content-tabs.md - - Data tables: reference/data-tables.md - - Diagrams: reference/diagrams.md - - Footnotes: reference/footnotes.md - - Formatting: reference/formatting.md - - Grids: reference/grids.md - - Icons, Emojis: reference/icons-emojis.md - - Images: reference/images.md - - Lists: reference/lists.md - - MathJax: reference/mathjax.md - - Tooltips: reference/tooltips.md - - Insiders: - - insiders/index.md - - Getting started: - - Installation: insiders/getting-started.md - - Changelog: insiders/changelog.md - - Blog: - - blog/index.md - - 2022: - - blog/posts/blog-support-just-landed.md - - blog/posts/chinese-search-support.md - - 2021: - - blog/posts/the-past-present-and-future.md - - blog/posts/excluding-content-from-search.md - - blog/posts/search-better-faster-smaller.md + - About: + - About: about/about.md + - Collaboration: about/collaboration.md + - Sites: about/sites.md + - Wiki 🔗: 'http://wiki.lagoproject.net/' + - Publications: + - Articles: publications/articles.md + - Docs: publications/documents.md + - Talks: publications/talks.md + - Thesis: publications/thesis.md + - Activities: + - Detectors: activities/detectors.md + - Teaching: activities/teaching.md + - Calendar: activities/calendar.md + - News: news/news.md + - Contact: + - contact.md diff --git a/requirements.txt b/requirements.txt index 9c82a371683237188fab35b6ef51c2d88e0e9c6f..ecad3a110909b42728ef0e46da4c90e36ca3ed9e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,13 +22,16 @@ jinja2>=3.0 markdown>=3.2 mkdocs>=1.4.2 -mkdocs-material +mkdocs-material>=9.0.12 mkdocs-material-extensions>=1.1 pygments>=2.14 pymdown-extensions>=9.9.1 -minify +mkdocs-minify-plugin>=0.6.2 +social # Requirements for plugins colorama>=0.4 regex>=2022.4.24 requests>=2.26 +pillow +cairosvg