Skip to content
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

Styles for shell transcripts #24

Closed
alaric-dotmesh opened this issue Jan 17, 2018 · 4 comments
Closed

Styles for shell transcripts #24

alaric-dotmesh opened this issue Jan 17, 2018 · 4 comments
Assignees

Comments

@alaric-dotmesh
Copy link
Contributor

As a documentation author, I want to include transcripts of shell command sequences in documentation with highligthing of important parts, so I can demonstrate how things work directly.

The hugo syntax highlighter isn't the thing for this - a shell transcript is a mixture of shell commands and output from various things in various formats, so no one automatic highlighter can handle it. I'd like to be able to embed raw preformatted text and then manually emphasise parts of it.

hugo/content/api/_index.md contains some examples of a proposed markup for this in the raw pre blocks near the top. Providing CSS to make those pres look like the highlighted content blocks, with a suitable highlight (background colour?) for the em spans would probably do the trick. It might be nice to add a span class for user-entered text (eg, the typed commands) to distinguish them from command output, too?

@alaric-dotmesh
Copy link
Contributor Author

Oooh oooh oooh there's a kbd element for precisely that: user-entered text. I've marked up the user intpu in the API docs examples with that. Maybe make it a bit bolder/brighter than the rest of the text?

@petercolesdc
Copy link
Contributor

Make into shortcode

@alaric-dotmesh
Copy link
Contributor Author

When you've made a shortcode, I'll update the API docs to use it.

@petercolesdc
Copy link
Contributor

Shortcode was buggy (Hugo issue, adds a rouge

tag and cocks up formatting. Re-closing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants