R Shiny using Html Template from SB Admin 2 - Dashboard - html

I was trying to create dashboard using HTML template taken from SB Admin 2 - Dashboard taken from here
Also, I was following this tutorial https://shiny.rstudio.com/articles/templates.html. Before i add {{ headContent() }} and {{ bootstrapLib() }} on the head section the generated dashboard become smaller as can be seen on the picture.
I don't know why, does anyone here know? I guess it is because different version of bootstrap and js. But I am not sure how to make generated dashboard exactly like the template before.

Related

Can I create links with 'target="_blank"' in hugo posts content using Markdown?

I use Hugo to deploy static web, using Markdown and the problem I would like to sort out is simple.
I would like to find the simplest and compatible with Markdown language way to make my web links open in different tab.
The method I use now is below:
< rawhtml >}}Rasmus Lerdorf</br>{{< /rawhtml >
[link with title](http://nodeca.github.io/pica/demo/ "target="blank")
First method working but it is HTML second method not working.
Thank You.
You need to create a new file at /layouts/_default/_markup/ called render-link.html.
In that file, you can then customise it to something like:
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
Here is what would happen:
[link1](../something/ title="title") => link1
[link2](https://example.com) => link2
It will only add it to URLs with "http" and "https".
The documentation for render-hooks is available here: https://gohugo.io/templates/render-hooks/.
Or you could just put the link in as you have it using regular, old HTML.
IMHO, beating yourself up over the failings of Hugo and whatever theme is in use is counter-productive. Markdown was supposed to be a quick and dirty way for users who couldn't grasp the basic fundamentals of html to create and display content on a wiki.
Think about the current situation. Does using Hugo, a theme, and Markdown really save any effort when they simply can't produce the output you need because the features you need don't exist in that combination natively?
When you need to spend hours/days researching and learning how to manipulate the generator's template to generate the output you need from Markdown and Hugo, tell me, where exactly are those time savings?
This is why people using tools such as Flare, RoboHTML, and Paligo laugh at users who brag about how fast they Hugo site generates html pages.

Jekyll-Twitter-Plugin urls and new lines not showing correctly

I'm quite new to jekyll and don't know where the problem could be. I used the jekyll-twitter-plugin to create an twitterfeed on my site.
I just implemented the basic code like this .
<div class='jekyll-twitter-plugin' align="center">
{% twitter https://twitter.com/example maxwidth=500%}
</div>
The twitter feed is working correctly, but when I tweet something the url is shown (it's not shown on the normal twitter site) and some new lines in the original are ignored.
How can I fix this?

How to organize multiple outputs inside a single Jekyll project?

I use Jekyll to create documentation for software products. I have 30 +
different products that have a common LIQUID template but different content. Every single product documentation has its own table of content.
For one project, everything is OK. I have a content folder as well as css/js folders. I run "jekyll serve" and publish a project.
The problem is that, I do not want to have 30 Jekyll projects stored one next to another with similar css, configs, js folders and will only differ in content part.
The question is: how can I organize the internal structure so I have a
single project with a common layout and 'x' different content folders inside the single project?
Like:
_product1/
some_subdir
'topic.md'
_product2/
some_subdir
'topic.md'
If it's possible, how can I then manage the output? I need to publish product 1 and product 2 ... product 'x' separately.
Thank you for the assistance.
UPD: Here is the demo project on GitHub: https://github.com/plywoods/JekyllDocumentationDemo
The way to have this content separation in Jekyll is through the use of Collections.
Here is an example of a Jekyll website using Collections:
https://github.com/netponto/netponto.github.io
_meetings, _members, and _sessions are different collections and analogous to your _product1, _product2, etc.
You can customize the output / how the URL is going to be in the _config.yml of your Jekyll site. For example:
collections:
meetings:
output: true
permalink: /reunioes/:path/
sessions:
output: true
permalink: /sessoes/:path/
To display the items of a collection, for example the "sessions" collection, you do something like this:
{% for session in site.sessions %}
<p>{{ session.title }}</p>
{% endfor %}
If you're having issues implementing the Collections, put together a reproducible example on GitHub, so that others can see what you've tried to do and point what's missing.

Link directly to public HTML folder in href inside a Laravel/Blade template

I am using Laravel 5. In a specific Blade template, I have a link that looks like this:
{{ $category->category }}
Normally on my localhost WAMP server, I can access my main page that has this link, like this:
http://localhost:8080/myApp/laravel/public/
When you click the <a> link above, I want the link to simply go to:
http://localhost:8080/myApp/laravel/public/categories/1
Instead, it goes here:
http://localhost:8080/categories/1
If I don't include the leading "/" on categories/1. then it simply keeps adding categories/1 to the url everytime I click it. The first time it works, but the second time (and on) it of course says page not found.
What is the appropriate way to handle routing links in Laravel using the Blade templates?
Try this
{{ $category->category }}

Shopify Asset URL Error

I am trying to use asset url,
{{'Archt-Quick-Start-Guide-FR.jpg' | asset_url }}
but after saving the page its converting it to this, like encoded in URI,
%7B%7B'Archt-Quick-Start-Guide-FR.jpg'%20%7C%20asset_url%7D%7D.
Please Help!
You cannot add a liquid code in the "Page" on Shopify. It will just treat it as another html object. You can instead do the following in the Shopify -> Admin Panel -> Online Store -> Themes -> Edit HTML/CSS
Click on Add a new template under Templates
Select "Create a new template for page" and give it a name.
In this newly created template, add your code and load it into a JS variable right at the start of the page. <script>var test = '{{ 'Archt-Quick-Start-Guide-FR.jpg' | asset_url }}'</script>
This will load the link of the image into test.
Next, go to the page you are editing under Shopify -> Admin Panel -> Online Store -> Pages -> Your Page
Now use JavaScript function to load the "test" variable into the element as required.
Are you using a standard page from Online Store > Pages or are you editing a theme file?
Try this:
{{ 'Archt-Quick-Start-Guide-FR.jpg' | asset_url | img_tag }}