Skip to content

Can attached files be viewed in a separate browser window instead of just downloading? #280

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

Open
cmbarton opened this issue May 31, 2021 · 4 comments
Assignees
Labels
OMF site enhancement New feature or request OMF site infrastructure cyberinfrastructure for site OMF site web interface issues pertaining to web interface and usability

Comments

@cmbarton
Copy link
Contributor

Minor usability issue but one that can make life better for people behind firewalls or with slow internet. Currently, files attached to documents (e.g., standards workflow schematic attached to Standards WG text) simply download. Am I missing a markdown code to get them to open in a new browser window instead?

@cmbarton cmbarton added OMF site enhancement New feature or request OMF site infrastructure cyberinfrastructure for site OMF site web interface issues pertaining to web interface and usability labels May 31, 2021
@alee
Copy link
Member

alee commented May 31, 2021

With respect to download speeds it doesn't really matter if you're downloading the file or viewing it directly in your browser but I agree the usability aspect of being able to see it in the browser does make it easier to view. How were these files uploaded in the first place though? I see them in

https://openmodelingfoundation.github.io/governance/working-groups/ -> https://github.com/openmodelingfoundation/openmodelingfoundation.github.io/files/6481459/standards_workflow.pdf

and

https://openmodelingfoundation.github.io/governance/charter/ -> https://github.com/openmodelingfoundation/openmodelingfoundation.github.io/files/6462528/OMF_org.pdf

but don't see where / how they were added to the repository...

https://webapps.stackexchange.com/questions/48061/can-i-trick-github-into-displaying-the-pdf-in-the-browser-instead-of-downloading

chrstngyn pushed a commit that referenced this issue Nov 16, 2021
create custom template for links that overrides default markdown rendering functionality
for any pdfs on the site, open the file to a new tab in a google docs preview
create hook for links that adds target=_blank to external links ending in .pdf

https://gohugo.io/getting-started/configuration-markup/#link-with-title-markdown-example

refs #280
chrstngyn pushed a commit that referenced this issue Nov 16, 2021
@chrstngyn
Copy link

I added some commits that open the diagram pdf files to a google docs preview in a new tab in the most recent commits

https://openmodelingfoundation.github.io/governance/charter/
https://openmodelingfoundation.github.io/governance/working-groups/

@cmbarton
Copy link
Contributor Author

That's really nice. It will make it easier for people to see

@sgfost
Copy link
Contributor

sgfost commented Feb 20, 2023

Those mysterious floating files should probably be tracked. Default behavior for static files in hugo should be to open in a new tab e.g. https://www.openmodelingfoundation.org/about/history/#planning-workshops so we'd be able to get rid of the google redirect

Also with some relevance to #431, we should decide on where to keep static files (static/<section> vs. in with content/<section>)

@cmbarton cmbarton moved this from Todo to Done in OMF Project Management Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OMF site enhancement New feature or request OMF site infrastructure cyberinfrastructure for site OMF site web interface issues pertaining to web interface and usability
Projects
Status: Done
Development

No branches or pull requests

5 participants