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

rendering of C code samples #77

Closed
codebot opened this issue Jan 28, 2016 · 14 comments
Closed

rendering of C code samples #77

codebot opened this issue Jan 28, 2016 · 14 comments
Assignees

Comments

@codebot
Copy link
Member

codebot commented Jan 28, 2016

I'm not sure if this is just my browser, but the triple-backtick on this page (e.g., the "Memory Management" section) seems to not quite render the following C code correctly. Maybe it needs a triple-tilde instead? I don't know. (the content is awesome, btw... this is just about its rendering)

@dirk-thomas
Copy link
Member

I am not sure why but maybe #78 helps?

@jacquelinekay
Copy link
Contributor

Yep, I think it's because the code is overindented

@dirk-thomas
Copy link
Member

Doesn't fix it though...

@codebot
Copy link
Member Author

codebot commented Jan 28, 2016

triple-tilde before and after the code segment causes Jekyll to make a nice
code block, but it doesn't have syntax highlighting

On Thu, Jan 28, 2016 at 3:16 PM, Dirk Thomas notifications@github.com
wrote:

Doesn't fix it though...


Reply to this email directly or view it on GitHub
#77 (comment).

@codebot
Copy link
Member Author

codebot commented Jan 28, 2016

triple-tilde with "c" after it, like this:

printf("hello, world\n");

seems to turn on syntax highlighting, but also brings in wonky line numbers
without spaces after them.

On Thu, Jan 28, 2016 at 3:20 PM, Morgan Quigley morgan@osrfoundation.org
wrote:

triple-tilde before and after the code segment causes Jekyll to make a
nice code block, but it doesn't have syntax highlighting

On Thu, Jan 28, 2016 at 3:16 PM, Dirk Thomas notifications@github.com
wrote:

Doesn't fix it though...


Reply to this email directly or view it on GitHub
#77 (comment).

@jacquelinekay
Copy link
Contributor

Apparently you can suppress line numbers by editing a syntax.css file

https://demisx.github.io/jekyll/2014/01/13/improve-code-highlighting-in-jekyll.html

@jacquelinekay
Copy link
Contributor

Trying to figure out how to preview a github/Jekyll markdown page based on a branch of the source repository; I think the best way is to set up a local instance of the page based on a branch:

http://jekyllrb.com/docs/github-pages/#project-page-url-structure

@codebot
Copy link
Member Author

codebot commented Jan 28, 2016

i got it working by apt-get install jekyll then cloning the repo,
checking out the branch you want, and then running this from the checkout
root:

jekyll --server --baseurl ''

then you point firefox to http://localhost:4000 and it works

On Thu, Jan 28, 2016 at 3:29 PM, Jackie Kay notifications@github.com
wrote:

Trying to figure out how to preview a github/Jekyll markdown page based on
a branch of the source repository; I think the best way is to set up a
local instance of the page based on a branch:

http://jekyllrb.com/docs/github-pages/#project-page-url-structure


Reply to this email directly or view it on GitHub
#77 (comment).

@tfoote
Copy link
Contributor

tfoote commented Jan 28, 2016

There's a script ./test_local_deploy.sh and it will run the test server inside docker and expose it on port 4000. It will live update when you change content in files.

@codebot codebot self-assigned this Jan 29, 2016
@codebot codebot added the in progress Actively being worked on (Kanban column) label Jan 29, 2016
@jacquelinekay
Copy link
Contributor

@tfoote, where do I get the ros_tutorials image? That script is failing because docker doesn't know where to find it.

@jacquelinekay
Copy link
Contributor

Tully helped me out with updating the Dockerfile, but I still can't view the instance hosted by docker on localhost:4000. I think there's something screwy happening with my iptables rules.

@tfoote
Copy link
Contributor

tfoote commented Feb 2, 2016

Suggest just giving up on syntax highlighting for now.

@codebot
Copy link
Member Author

codebot commented Feb 3, 2016

#80 will hopefully just render as non-highlighted text. But we'll have to run it through the correct version of the Jekyll pipeline first to make sure it looks OK.

@dirk-thomas
Copy link
Member

No need to validate #80 - generic code blocks do work.

@dirk-thomas dirk-thomas removed the in progress Actively being worked on (Kanban column) label Feb 3, 2016
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 a pull request may close this issue.

4 participants