-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add options to show fenced block source #607
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should be echo: false
, but there are a couple other considerations, namely
-
whether the
echo
option should be scoped under aexecute
object like Quarto execution options (though I don’t think I’d use the nameexecute
) so we can have other options there too, namelyrun: false
if you want to disable run by default and -
language-specific options (e.g., turning on
echo
forjs
, but turning it off forhtml
). So maybe the scope should bejs
orhtml
for language-specific options, and top-level for all languages, with suitable precedence.
i've not been able to come up with any great alternatives to an "execute". maybe 'construct'? for
|
Sorry for not being clear. The alternative I was suggesting was to use the language. So, js:
echo: true means turn on echo: true means turn it on for all blocks. |
adds global and front-matter options to show fenced block source code. i am happy to change up the syntax, and/or semantics if folks have good alternatives, but here is what i have implemented. btw: i considered a boolean, but went with the "show" string to indicate the specific action. in
observablehq.config.ts
add:and in front-matter:
in both cases, values other than "show" will have no effect.
echo
takes precedence over front-matterblocks
, which takes precedence overobservablehq.config.ts
blocks
.hmmm...
as i look back at the issues, it may be this option was always intended to be called 'echo' in config and front-matter. which would make sense. let me know if i should switch over to that.
closes #156