Skip to content

Conversation

@Koleok
Copy link

@Koleok Koleok commented Nov 17, 2025

This addes a -c or --canonical flag which disables the sidebar when in directory mode.

The use case in mind, is when you want to serve a directory but only send canonical links to people for ephemeral sharing.

Closes #52

test: add integration test that canonical flag hides navigation sidebar
@jfernandez
Copy link
Owner

Thanks for the PR! I want to understand your use case better before deciding if this fits mdserve's scope.

You mentioned "sharing files at work" - are you using mdserve in production to share files with coworkers over a network? Or is this more for local development/preview where you're just sending someone a link to your locally running instance?

I'm asking because mdserve is designed as a local dev tool for previewing markdown, not really for production file sharing (no auth, access control, etc.). If you're using it for networked file sharing, there might be better tools for that use case.

What's your setup look like?

@Koleok
Copy link
Author

Koleok commented Nov 23, 2025

Thanks for the PR! I want to understand your use case better before deciding if this fits mdserve's scope.

You mentioned "sharing files at work" - are you using mdserve in production to share files with coworkers over a network? Or is this more for local development/preview where you're just sending someone a link to your locally running instance?

I'm asking because mdserve is designed as a local dev tool for previewing markdown, not really for production file sharing (no auth, access control, etc.). If you're using it for networked file sharing, there might be better tools for that use case.

What's your setup look like?

Hey sorry just saw your comment!

Very much the latter, I will often run mdserve on my local machine and point a cloudflare tunnel at that port. This is preferable for my purposes compared to other forms of real-time doc-sharing or screen-sharing a local doc.

Not sure if --canonical is the most intuitive thing to call this mode? Just the first thing I thought of. Would love input there also.

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.

Option to disable sidebar when serving a directory

2 participants