Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

in .md files end of the code block is not recognized properly #11

Open
Jinwooooo opened this issue May 8, 2018 · 7 comments
Open

in .md files end of the code block is not recognized properly #11

Jinwooooo opened this issue May 8, 2018 · 7 comments

Comments

@Jinwooooo
Copy link

If I use the code block with

~~~python
# python codes... (also when i replace ~~~ with ```, the results are same)
~~~

and then write text, the text are within the code block. The example shown in the demo also has this problem (https://melangue.github.io/dactl//posts/example-content). As you can see the 'List' and the text below are part of the codeblock

@humbertowoody
Copy link

Same issue for me, probably best workaround is deploy the _site/ to something like Amazon S3, or directly to the gh-pages branch of your repo. I recommend the first one as the gh-pages is disabled on your personal github page (username.github.io) and it requires to be builded from the master branch which will, eventually, mess again with the code blocks.

@gdcmarinho
Copy link

Yep. the same issue for me too. JSFiddle embed works normally?

@Ligengxin96
Copy link

Same issue for me, has anyone solved it?

@Ligengxin96
Copy link

Ligengxin96 commented Jun 16, 2020

I resolved it.
use
{% highlight js %}
#js code
{% endhighlight %}

instead of

```js
#js code
```
in .md files

@humbertowoody
Copy link

Hi @Ligengxin96! I've been using this theme and, to be completely honest with you, trying to get it running on Github Pages is a waste of your time, yeah, you can get something acceptable with the code blocks with the {% highlight x %} approach but you loose one of the beautiful aspects of this awesome template: the code blocks design. I'd recommend absolutely to either:

  • Build your site locally and push the _dist/ folder to gh-pages branch with subtree or other approaches.
  • Build your site locally and deploy to master branch only the contents of _dist/ folder.
  • Use static hosting like S3 etc..
  • Use Netlify :)

The thing is that, for the context of github pages, their ruby plugin capabilities are limited and have a specific issue with the highlight plugin you have mentioned above. As much as I love GitHub Pages, this project is so so beautiful it may, perhaps, deserve to be used in its complete, designed, manner. Just my 2c. If you manage to get the highlight plugin running on GitHub Pages (or similar) please share the process! I've tried in so many ways with no luck, but that was some time ago and maybe things have changed ever since! Best of luck! And, if the author gets to read this, still what a beautiful and awesome theme, thank you :)

@Ligengxin96
Copy link

@humbertowoody Thanks :)

@melangue
Copy link
Owner

I have tried to fix this code highlighting issue once but the main point is what @humbertowoody said - that's gh-pages highlight plugin fault (also thanks for the kind words :) ).

Since I have developed this theme I forgot how liquid syntax works to be honest, so I can't just jump straight into it. When I have some spare time I will give it another go - fix the code higlighting and theme changer issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants