quarto-web Documentation

repository·main·Indexed 18 days ago

https://github.com/quarto-dev/quarto-web

Documentation for the Quarto website (quarto.org), including the Prerelease Extension for version-aware shortcodes and callouts, the reveal.js Chalkboard plugin configuration, and project utility scripts managed via quarto run. It covers rendering environments using R/renv and Python/uv, multi-site profile systems, and the use of frozen computational outputs for site deployment.

Tokens
94.7K
Snippets
488
Records
624
Agent score
63%

What's inside quarto-web

  1. Explore Quarto Dashboard capabilities

    main

    Quarto dashboards support a wide range of layout, data display, and interactivity features. You can learn more about specific dashboard components through the following guides:

    • Layout: Control the navigation bar and arrange content using pages, rows, columns, tabsets, and cards.
    • Data Display: Display data using plots, tables, value boxes, and text.
    • Inputs: Implement interactive dashboards by placing inputs in sidebars, toolbars, or attaching them directly to cards.
    • Theming: Customize fonts, colors, and general dashboard appearance.
    • Parameters: Create dashboard variants by defining parameters and passing distinct values via the command line.
    • Interactivity: Implement flexible data exploration through various interactive methods.
    • Deployment: Deploy either static dashboards (hosted on any web host) or Shiny dashboards (requiring a Shiny Server).
  2. Choose a publishing destination for Quarto content

    main

    Quarto supports various publishing destinations depending on your hosting requirements, organizational needs, and whether you want to manage infrastructure.

    Common destinations include:

    • Posit Connect Cloud: A hosted service for sharing documents and websites without managing infrastructure.
    • GitHub Pages: Best if your source code is already managed within a GitHub repository.
    • Posit Connect: For secure sharing of data products within an organization via an organization-managed server.
    • Quarto Pub: A free, easy-to-use service for publicly available documents, websites, and books.
    • Netlify: A professional platform for advanced capabilities like custom domains, authentication, and branch previews.
    • Confluence: For sharing documents within team Spaces for collaboration.
    • Hugging Face Spaces: Ideal for sharing Quarto documents alongside machine learning models or datasets.
    • Other Services: Since Quarto renders to standard formats (HTML, PDF, MS Word, etc.), you can publish to any platform not listed above.

    If you are unsure, Posit Connect Cloud is a recommended free hosted service, or GitHub Pages if your code is on GitHub.

  3. Authoring modes in Quarto Editors

    main

    Quarto provides three distinct ways to author documents depending on your workflow:

    1. Source Code Editor: For editing .qmd documents as plain text.
    2. Visual Editor: A WYSIWYG (What You See Is What You Get) interface for editing .qmd documents.
    3. Notebook Editor: Specifically for editing .ipynb notebooks.

    Consult the specific documentation for the Visual Editor or Notebook Editor for detailed guidance on those interfaces.

  4. Use version-aware shortcodes for prerelease content

    main

    The Prerelease Extension provides shortcodes that automatically detect if a specific feature version has been released based on the version key in your _quarto.yml (or _quarto-prerelease-docs.yml when using the prerelease-docs profile). This allows you to show or hide content and adjust URLs dynamically as features move from development to stable release.

    Shortcodes available:
    - `prerelease-docs-url`
    - `prerelease-callout`
  5. Choose an editor type for Quarto editing

    main

    Depending on your workflow and the file type you are editing, you can choose between different editor modes:

    1. Source Editor: The traditional text-based editor used in Code-OSS.
    2. Visual Editor: Best for WYSIWYG (What You See Is What You Get) editing of .qmd documents.
    3. Notebook Editor: Specifically designed for editing .ipynb notebooks.
  6. Use Shiny inputs and reactive rendering in Quarto

    main

    When using server: shiny, you can define interactive UI elements using shiny.express.ui. These elements update a reactive input object. You can then use decorators like @render.plot to create outputs that automatically update whenever the corresponding input values change.

    from shiny.express import render, ui
    
    # Define inputs
    ui.input_select("x", "Variable:", choices=["bill_length_mm", "bill_depth_mm"])
    ui.input_checkbox("rug", "Show rug marks", value = False)
    
    # Define reactive output
    @render.plot
    def displot():
        # Access inputs via input.<name>()
        sns.displot(
            data=penguins, 
            x=input.x(), 
            rug=input.rug()
        )
  7. How the Jupyter Kernel Daemon works

    main

    To reduce start-up latency during interactive sessions, Quarto maintains a daemon with a running Jupyter kernel for each document. This allows subsequent renders to proceed immediately without waiting for a new kernel to start.

    Important Behaviors:

    • Interactive vs. Batch: Daemons are only created during interactive sessions. They are not created when rendering without an active TTY or during batch rendering (e.g., rendering a Quarto Project).
    • Windows Support: By default, Quarto does not use a daemon on Windows because some systems restrict the required socket connections. You must enable it explicitly if needed.
  8. How to meet PDF accessibility and archival requirements

    main

    While Quarto cannot guarantee 100% compliance, you can satisfy many requirements through proper document structure:

    1. Metadata: Use YAML fields like title, author, date, and lang. These are propagated to the PDF metadata.
    2. Tagging:
      • Typst: PDF tagging is always enabled.
      • LaTeX: Pandoc enables PDF tagging when you specify a standard that requires it (e.g., PDF/UA standards or PDF/A "a" variants like a-2a).
    3. Alt Text: Ensure you provide alt text for images using the fig-alt attribute. This text is passed through to the PDF for screen readers.
  9. Understand Pandoc-style Markdown output in the Visual Editor

    main

    The Quarto visual editor uses Pandoc to generate Markdown. This means the output may follow specific Pandoc idioms that differ from your manual writing style. Key conventions include:

    • Emphasis: *text* is preferred over _text_.
    • Code Blocks: Uses ``` {.md} for language-specific blocks and 4-space indentation for attribute-less blocks.
    • Links: Plain links are written in angle brackets, e.g., <https://yihui.org>.
    • Lists: Bullet and numbered lists include additional leading spaces before content.
    • Blockquotes: The > character is included on every new line.
    • Tables: Captions are placed below the table.
    • Metadata: Unnumbered sections use {.unnumbered} instead of {-}.
    • Escaping: Characters used for Markdown syntax (like *, _, or #) are automatically escaped to ensure fidelity.

    It is recommended to adapt your manual Markdown writing style to match these Pandoc conventions if you use the visual editor frequently.