html - Jekyll markdown not displaying like the original and general style problems -
we have blog post written in markdown, implement on our jekyll page hosted on githubpages.
here markdown code excerpt of post:
```python import keras ``` **tensorflow:** ```python import tensorflow tf ``` ## building model **keras:** can create linear complex models through [`sequential`](https://keras.io/models/sequential/) api, stacks layers in linear fashion. linear regression, can write follow: ```python keras.models import sequential keras.layers.core import dense model = sequential() model.add(dense(units=1, activation="linear", input_dim=1)) ``` * keras includes many commonly used layers: - regular `dense` layers feed-forward neural networks - `dropout`, `normalization` , `noise` layers prevent overfitting , improve learning - common `convolutional` , `pooling layers` (max , average) cnns - `flatten` layers add connected layers after convolutional nets - `embedding` layers word2vec problems - `recurrent` layers (simplernn, gru , lstm) rnns - `merge` layers combine more 1 neural net - many more… can [write own keras layers](https://keras.io/layers/writing-your-own-keras-layers/) * many common activation functions available `relu`, `tanh` , `sigmoid` depending on problem solve (read [“yes should understand backprop” andrej karpathy](https://medium.com/@karpathy/yes-you-should-understand-backprop-e2f06eab496b) if want understand effect of backpropagation on activation functions) * activation function can passed through `activation` layer instead of `activation` argument alternatively if prefer one-liners, have done this: ```python model = sequential([dense(units=1, activation="linear", input_dim=1)]) ``` or have used [keras’s functional api](https://keras.io/getting-started/functional-api-guide/): ```python keras.models import model keras.layers import dense, input
here how should (displayed on github in readme.md):
here how our final post.md looks on hosted jekyll page:
this _config.yml:
title: bml email:xxx@gmail.com description: > # means ignore newlines until "baseurl:" write awesome description new site here. can edit line in _config.yml. appear in document head meta (for google search results) , in feed.xml site description. baseurl: "" # subpath of site, e.g. /blog url: "" # base hostname & protocol site, e.g. http://example.com twitter_username: xyz github_username: xyz future: true # build settings markdown: kramdown highlighter: rouge theme: minima gems: - jekyll-feed exclude: - gemfile - gemfile.lock
we looked hours how done , our results , realizations far are:
- there doesn't seem reasonable way implement posts written in markdown jekyll
- the result quite unpleasant (lists messed up, codeblocks not super nice, weird spacings , vertical distances)
- i had implement
syntax.css
have code blocks styled - jekyll forces use kramdown
- there no easy convert markdown kramdown (kramdown seems have different syntax in places)
also don't get, why e.g. lists rendered without style, although correctly registered ul li elements in dom. list-style: none;
for <ul>
elements comes inline <style type="text/css">
rendered websites head. don't know comes from, main theme maybe? without style tag @ least list better...
i tried things using kramdown="1" attribute, playing around indents , dozens of other 'tricks' , structures.
- is there easy way have real markdown rendered on github?
- how know weird style tag comes from? how exclude it?
the website working on is: http://www.machinelearning.berlin
jekyll straight forward. unfortunately wise people (the architects of jekyll) decided create themes , bundle them every new project. big mistake imho. results in many people starting out code not understand, , worse, structure not understand. quote demonstrates perfectly:
the list-style: none; the ul elements comes inline style rendered websites head. don't know comes from, main theme maybe?
so message has similar problems , knows basic html , css: jekyll simple. please not use theme if start jekyll. start projects empty. approach save lot of hours , frustration. also, provide deep understanding of jekyll , how works. thank me later.
ps. answer question: can assure mysterious code belongs theme have (not) chosen.
Comments
Post a Comment