Glavin001 / GitLab-Pages

:eyes: GitHub Pages, for GitLab.
MIT License
204 stars 30 forks source link

Highlighting code syntax, markdown tables, mistaken text, etc #25

Open asmontas-i opened 8 years ago

asmontas-i commented 8 years ago

Hi,

When I try to insert something like code snippets, tables, mistaken text, etc, it looks like that it is not fully generated to html. Maybe some plugins like pygments are missing? Maybe current GitLab-Pages doesn't have these features yet? Maybe I'm missing something very obvious? text

Any suggestions for an easy way to add standard markdown syntax features like ones mentioned in the beginning of post?

Thanks

Glavin001 commented 8 years ago

Jekyll is used to generate the web pages. See https://github.com/Glavin001/GitLab-Pages/blob/master/routes/webhooks.js#L104 for the applicable line of code.

// jekyll build --safe --source .tmp/Glavin001/gitlab-pages-example/ --destination pages/Glavin001/gitlab-pages-example
var cmd = "jekyll build --safe --source \""+repoPath+"\" --destination \""+finalRepoPath+"\"";

I'd recommend taking a look at the command are testing on your own manually in your Terminal and seeing what Jekyll options generate your desired result.

asmontas-i commented 8 years ago

Thanks for the answer. It looks like that jekyll generates webpages (at least code snippet part) as it should, (another code example snippet generated in html below). Then I guess the problem is with the styling (scss) and paths probably. If you have any other thoughts - don't hesitate to let me know.

<div class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="k">def</span> <span class="nf">print_hi</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
  <span class="nb">puts</span> <span class="s2">&quot;Hi, </span><span class="si">#{</span><span class="nb">name</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="k">end</span>
<span class="n">print_hi</span><span class="p">(</span><span class="s1">&#39;Tom&#39;</span><span class="p">)</span>
<span class="c1">#=&gt; prints &#39;Hi, Tom&#39; to STDOUT.</span></code></pre></div>