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

Fix missing images everywhere when running locally #2019

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

YoshiRulz
Copy link
Collaborator

@YoshiRulz YoshiRulz commented Oct 20, 2024

Before/after:
side-by-side
Only has effect in dev environments.

@YoshiRulz
Copy link
Collaborator Author

Build failure is here:

_model = new RenderModel(_mockWikiPages, _db, NullLogger<RenderModel>.Instance)

I'm not sure how to get an IHostEnvironment at that point. DI via a constructor parameter prevents the test from running.

@adelikat
Copy link
Collaborator

You have to mock it

@Masterjun3
Copy link
Collaborator

Is this the right place to insert a dev fallback? It relies on the broken links to be redirected to the wiki endpoint.
Instead, couldn't this be implemented more properly in the options when we add the UseStaticFiles. Maybe by adding a dev FileProvider that uses the regular file provider and doing the fallback logic there?

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.

3 participants