The codecelloptions extension allows you to extract options in custom code cells within Quarto publishing framework.
codecelloptions