I'm new to Slidify and I'm trying to create my first layout and get it to work properly. I started with the two columns layout that is also shown as an example on the Slidify website.
Unfortunately, I can't get it to work. I created an twocol.html file in the assets/layouts folder with the content shown here for instance. Then I simply made the slide like the best answer user did there. I.e. I started it with --- &twocol, and I specified *** left and *** right sections.
Problem #1: if I do it like this it doesn't work at all. The slide I get is empty only has a red line in it, no text whatsoever.
I can solve problem #1 by adding
---
layout: slide
---
to the beginning of the twocol.html file.
Then I have
Problem #2: a slide appears, the title is shown, so is a red line below it, but the contents are not shown at all. I also get an extra slide that is totally empty.
What am I doing wrong?
I had this same problem too until I came across this post. Now my twocol.html is working and looks like:
---
layout: slide
---
{{{ slide.content }}}
<div style='float:left;width:48%;'>
{{{ slide.left.html }}}
</div>
<div style='float:right;width:48%;'>
{{{ slide.right.html }}}
</div>
Also be sure to add the equal sign before left and right: *** =left *** =right
I had the same problem. My solution was like this:
--- &twocol
# Two Columns
Some text
*** =left
- text1
*** =right
- text2
---
Related
I'm using MkDocs with the Material theme. I'd like to build a site that looks a little like the Stripe API docs.
By default, the Material theme puts .md documents in the sidebar on the left, and the headings withing those documents in a Table of Contents sidebar on the right. I'd like to put it all on the left:
Introduction
A ## heading here
Another heading
Getting Started
Subsection
etc.
I could do this by making every entry its own document, but I'd prefer to have only one document per major heading, with the table of contents consisting of subheadings underneath. Possible?
Update:
I have made some progress.
First, extend the theme by by following these instructions: https://squidfunk.github.io/mkdocs-material/customization/
Second, get rid of the TOC on the right by overriding the "site_nav" template block. In main.html, just copy the existing site_nav block from base.html, then comment out the "Table of contents" section.
Third, copy the nav-item.html partial into the /partials directory and make modifications.
Now I'm stuck. It looks like nav-item.html does have code to render the TOC under each item, and it does get rendered with a display:none. When I turn that off, though, the TOC does not appear properly.
I've done an hour of fiddling with CSS to get it to work with no success. Any ideas?
In your custom css file, write:
.md-sidebar--secondary {
order: 0;
}
And in your mkdocs.yml, write:
extra_css:
- assets/<custom_css_filename>.css
Your update to the question is exactly what I did so I'm unsure if this will be useful.
In mkdocs.yml add custom_dir to the theme:
theme:
name: material
custom_dir: overrides
Create a file overrides/main.html and observe the file you are replacing https://github.com/squidfunk/mkdocs-material/blob/master/material/base.html. Use the nav code but include the toc partial to get the following:
{% extends "base.html" %}
{% block site_nav %}
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/toc.html" %}
</div>
</div>
</div>
{% endblock %}
Here is the result:
If you are looking at changing the table of contents to also include pages look into the partials in the git repo.
The easiest hack I've come up with is the following:
In your mkdocs.yml, write:
extra_javascript:
- 'javascripts/extra.js'
In your docs/javascripts/extra.js, write:
document.addEventListener("DOMContentLoaded", function() {
show_toc_left();
});
function show_toc_left(){
document.querySelectorAll('.md-nav .md-nav--secondary')[0].setAttribute("style", "display: block; overflow: visible; color: #7d7f8e9c")
document.querySelectorAll('.md-nav .md-nav--secondary label')[0].remove()
}
This will show the TOC within your left side navigation menu of the currently active page.
You can also add this to the top of the individual page:
---
hide:
- toc
---
Is it possible to add space between words in the title of a block in mermaid flowchart generation?
Basically I needed something like:
SearchService-->items details
but I get an error and blank flowchart when trying it.
Relates to this question: Spaces in Mermaid that was not replied.
SearchService --> itemsdetails[item details]
Where itemsdetails is the id and "item details" is the node label.
Any idea why my page title is displaying twice? I am running a vanilla mean.io on openshift wih minor modifications other than basic modifications to a few values from default to custom (app name, meta tags such as keywords and description). Thanks in advance.
/nodejs/packages/system/server/views/includes/head.html:
6: {{appName}} - {{title}}
FYI - I simply deleted "{{appName}} -" from line 6 of
/nodejs/packages/system/server/views/includes/head.html
It appears that the tag is populated with the value of line 40 from
/nodejs/config/env/production.js:
I've been researching the use of templates and repeating sections with Dreamweaver and I was reading the Adobe page on repeating sections (http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7ab0a.html).
At the bottom of the page there is an example of using a repeating section with a table and making the row background colours alternate using
<tr bgcolor="##( _index & 1 ? '#FFFFFF' : '#CCCCCC' )##">
Curious about this '##' tag, I started Googling 'dreamweaver double at' and similar things but failed to find anything. It appears to be some sort of script, however I can't find any further information about it. If anyone could point me in the correct direction that would be most appreciated.
Those are template expression. Look here Template expressions
I wish to add a new menu item/link (e.g. "Stack Overflow") at the end of the menu in the screenshot below.
The new link URL would end in the community_uuid e.g. http://example.stackoverflow.com/some-page#community_uuid
Is there any good documentation available to show how this is done?
Immediately I thought of three things:
1 - Custom CSS for a community, so you could somehow add/change or maybe create a landing spot for a dom manipulation event which adds it.
In order to change the CSS, You should look at:
http://infolib.lotus.com/resources/oneui/3.0/docPublic/components/menu.htm
It's the navbar role.
In a folder such as /local/con/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/conServerCell/Communities.ear/comm.web.war/nav/common/styles/orangeTheme/
2 -
You may also want to look at /local/con/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/conServerCell/LotusConnections-config/widgets-config.xml
specifically
you could add a StackOverflow widget, when loaded it automatically opens up a new window, and transfers the person back to the previous page. ... a little bit of a kluge...
3 - Look for /local/con/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/conServerCell/Communities.ear/comm.web.war/nav/templates/page.jsp
find the line
<div class="lotusMenu" id="lotusMenu" style="display:none;" role="navigation" aria-label="Main navigation"><div class="lotusBottomCorner"><div class="lotusInner">
<div id="lotusMenuTree"></div>
</div></div></div>
You could modify the very end to add some custom link for you.
Just some quick thoughts...