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

docs: Remove sh language hint from Caddyfile examples #207

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

camhux
Copy link
Contributor

@camhux camhux commented Sep 23, 2024

Addressing #206 (comment)

These sneaked in unintentionally, sorry! It doesn't make sense to type a mostly-Caddyfile block as sh.

Also fixed my usage of spaces for indentation in the Caddyfile blocks in favor of tabs.

@mohammed90
Copy link
Member

Apparently console is a thing for shell with output scenarios

https://stackoverflow.com/questions/20303826/how-to-highlight-bash-shell-commands-in-markdown

@camhux
Copy link
Contributor Author

camhux commented Sep 23, 2024

Interesting find. Here's a visual comparison of no language hint:
image
vs. console:
image
So it makes the cat output turn blue 🧐

I'll swap that in if you like how it makes the Caddyfile pop

@francislavoie
Copy link
Member

francislavoie commented Sep 23, 2024

could just make it 2 separate blocks so we get this with caddyfile language hint :)

{
    # You must declare a custom filesystem using the `embedded` module.
    # The first argument to `filesystem` is an arbitrary identifier
    # that will also be passed to `fs` directives.
    filesystem my_embeds embedded
}

localhost {
    # This serves the files or directories that were
    # contained inside of ./my-files and ./my-other-files
	file_server {
		fs my_embeds
	}
}

Please note the indentation, there's a mix of tabs and spaces. Tabs are preferred for Caddyfile.

@camhux
Copy link
Contributor Author

camhux commented Sep 23, 2024

@francislavoie Indentation chars fixed! Thanks for the callout, I hadn't thought of that.

I'm not opposed to splitting the blocks for better highlighting; I reckon the only downside is that the --embed section of the docs will continue to grow in height. We could collapse the Caddyfiles inside of <detail>s if that's a concern.

@mholt
Copy link
Member

mholt commented Sep 23, 2024

@mohammed90

Apparently console is a thing for shell with output scenarios

WHAT. I needed this years ago. Thanks for the link!!

@camhux And thank you for the quick patch :)

@mholt mholt merged commit 2977c7f into caddyserver:master Sep 23, 2024
7 of 8 checks passed
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

Successfully merging this pull request may close these issues.

4 participants