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

Indicate language in client docs to enable syntax highlighting. #6848

Merged
merged 2 commits into from Oct 16, 2018

Conversation

Projects
None yet
5 participants
@ic4f
Copy link
Member

commented Oct 10, 2018

Enables syntax highlighting for code blocks in .md files. (unless there's a reason why we don't use this).
Also, added indent in galaxy-menus.md.

Indicate language in client docs to enable syntax highlighting.
Enables syntax highlighting for code blocks in .md files.

@galaxybot galaxybot added the triage label Oct 10, 2018

@galaxybot galaxybot added this to the 19.01 milestone Oct 10, 2018

@dannon
Copy link
Member

left a comment

@ic4f Thanks for taking a look at this. To your question, these are primarily designed to be viewed as a part of the styleguide (yarn run styleguide), and not viewed as .md. In fact, specifying the type here breaks the styleguide in my hands, though if you can find a way to satisfy both styleguide and .md, that'd be great.

@jxtx

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2018

Just from looking at: https://raw.githubusercontent.com/vue-styleguidist/vue-styleguidist/master/examples/basic/src/components/Button/Readme.md

I think if you use ```vue instead of ```html it should work in styleguide and github?

@ic4f

This comment has been minimized.

Copy link
Member Author

commented Oct 10, 2018

I didn't know about the styleguide. Will take a quick look (if it doesn't work for both styleguide and md, will leave as is.)
Both jsx and vue are not supported by my chrome md viewer extension, but they are highlighted correctly on github.
Checking about styleguide....

@ic4f

This comment has been minimized.

Copy link
Member Author

commented Oct 11, 2018

Found it. @jxtx is right: changing html to vue (or jsx/js/javascript) fixes the issue: everything is rendered correctly. As per vue-styleguidist docs: "Examples with all other languages are rendered only as highlighted source code, not an actual component" (which is different from React's original styleguidist). I'll change the code accordingly and will resumbit.

Question: since these .md files are used as input to a tool, should we have a very brief README in this folder alerting people not to modify the files?

I'll submit the fix for the svg file as a separate PR. For now, to compile the styleguide, simply comment out line 401 in client/galaxy/style/scss/base.scss.

Minor updates to client dir: indicate language, add/update readme.
1. Add 'vue' as language to .md files in client/galaxy/docs.
2. Add README.md to docs directory.
3. Update main client README.md (LESS >> Sass).
@ic4f

This comment has been minimized.

Copy link
Member Author

commented Oct 11, 2018

I added a README to the docs directory. I tried adding comments to the .md files instead, but styleguidist renders them as html.

@dannon

This comment has been minimized.

Copy link
Member

commented Oct 16, 2018

@ic4f Thanks!

@dannon dannon merged commit fb0f792 into galaxyproject:dev Oct 16, 2018

2 of 6 checks passed

api test Build finished. No test results found.
Details
integration test Build finished. No test results found.
Details
selenium test Build finished. No test results found.
Details
toolshed test Build finished. No test results found.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 187 tests run, 0 skipped, 0 failed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.