Jekyll-bootstrap how does mark down for external links work? - github

I am currently writing this in my post.md
Intro to [links](http://jekyllrb.com/docs/permalinks/)
Then when I am clicking this link once the post has been published the link I am sent to is:
http://example.github.io/post-name/jekyllrb.com/docs/permalinks/
Can anyone help?

This is a gotcha. I had recently migrated from from Maruku to kramdown, which handles urls differently. You need to define
[setid]: http://www.example.com (don't forget the http://)
Then use [setid] in place of the link.

Related

Can I embed source files from GitHub on my web page other than Gists?

Context
You can create a Gist on GitHub and embed it on your web page: embedding Gists.
This is an example of a randomly chosen Gist: tap.groovy.
Question
Is embedding also possible with other code files from GitHub, for example with this randomly chosen C# file ICommand.cs which is not a Gist?
You can try https://emgithub.com, which does exactly what you want.
To embed the example file ICommand.cs in your question, you can just add "em" before "github.com" in the address bar, then press Enter.
Then you can get a script tag like this:
<script src="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2Fdotnet%2Fcorefx%2Fblob%2Fmaster%2Fsrc%2FSystem.ObjectModel%2Fsrc%2FSystem%2FWindows%2FInput%2FICommand.cs&style=default&type=code&showBorder=on&showLineNumbers=on&showFileMeta=on&showCopy=on"></script>
Note if you simply click Run code snippet in StackOverflow, the copying button at top right corner may not work. Running it outside SO would work fine.
Unlike other websites that do similar work, EmGithub.com is a static site hosted on Github Pages. Fetching target files and highlighting are done on your browser.
Disclosure: I'm the developer of it :)
You can use https://gist-it.appspot.com/:
<script src="http://gist-it.appspot.com/https://github.com/dotnet/corefx/blob/master/src/System.ObjectModel/src/System/Windows/Input/ICommand.cs"></script>
There's a standard for embedding content from one website in another via a URL, called oEmbed. Unfortunately, GitHub is not a oEmbed provider, i.e. it doesn't support oEmbed for its URLs.
I found a proxy service, Oembed Proxy for GitHub,
which adds oEmbed support for GitHub's code URLs. You pass a GitHub URL as a parameter to the proxy's URL and a resulting URL can be be pasted in another website, assuming that website supports embedding oEmbed links.
Another obstacle is that not every website supports embedding oEmbed URLs. According to the proxy's documentation, notion is one website that supports them. I did some research and looks like it should be possible to add oEmbed support to e.g. wordpress or jekyll.
This answer provides a very limited solution, due to small adoption of oEmbed. I thought it would be worth to spread the word nonetheless.
Another possible service is https://github.com/finom/github-embed. It seems to be unmainted by now for about 2 years, but gist-it seems to be unmaintained for even 6 years. I've tried neither, though.
You can use gistYard
<iframe src="https://gistyard.piyushdev.xyz/emd.html?lang=&from=0&to=&code=https://raw.githubusercontent.com/dotnet/corefx/master/src/System.ObjectModel/src/System/Windows/Input/ICommand.cs&edit=true&dm=off" width="100%" height="330" frameborder="0"></iframe>
It provides features like changing theme , cutting code directly from raw , edit mode , custom styling and others.

TYPO3 does not resolve url correctly

I'm pretty new to TYPO3 and currently stuck with the following issue:
I copied the templates from another webpage that is currently in business.
When I'm on the startpage of my homepage (www.domain.com) and click on one of the links it contains I always get an error 404. The link that is generated looks like this.
http://www.domain.com/testpage.440.0.html
So I guess something like RealUrl was in use on the webpage that I copied from? Do I understand this right? I don't see that RealUrl is installed though.
However If i manually change this link to
http://www.domain.com/?id=440.0.html
the site is being created.
How does Typo3 know to generate a page when it receives the first version of these two links?
Does not really look like a standard out-of-the-box REAL URL url. That would rather have been /testpage-404.html . So maybe the problem is somewhere else, could be:
simulate static (check if that extension is running). A common mistake is to run real url an simulate static at the same time. If you do not need speaking urls for the moment, just uninstall simulate static.
make sure you add a domain to your shortcut. Use the the list modul and select the root shortcut. Then click create new record, select domain. and enter your domain there. Flush all the caches and try again.
If you'd post your TS Code (of the root shortcut page) here, I could probably tell what's going wrong.
real url configuration typically use .htaccess files.. maybe that file still contains information from the original destination.
check if the root ts contains some baseUrl statement
Which version of TYPO3 are you using?
HTH, but feel free to post more infos.
If your typoscript template is expecting to find realurl and its not installed as a plugin, that could be the cause. You'll need to either install it, or find the settings in the TS template and remove them.
Try the template object browser to look for it (use the template tool, click to the site root, then use the drop down menu in the r/h pane to choose the Template Obect Browser.)
How does Typo3 know to generate a page when
it receives the first version of these two links?
Any page request that it doesn't understand will give a 404 error.

How should I use <a href> tag to access other templates in lift?

According the Lift wiki, I know the "View First" concept of Lift. That's very different from any framework I used. Take the basic JSP things as the example, I could write
Create a new post
in the page, and write the logic in a servlet. How can I do things like this with lift? I wrote the same tag in a template and when I accessed this page I got 404 error. But if I add a Menu to the SiteMap, things goes well. Is there any possible to make a link without making a new Menu? I am a beginner of Lift and Scala. Thanks in advance.
When everything is declared in your SiteMap, you can have Lift generate the links for you.
Yes, it is possible.
Just don't call LiftRules.setSiteMap at your boot class, then Lift will let you access every pages under your webapp/ directory. You could test your code in this mode.
But this will also lead to no access control, so be careful.
It is also possible to do what I think you asked, which is to make the link accessible, but not visible in the SiteMap (if you don't want the SiteMap at all, go with Brian's answer), with code like this:
SiteMap(Menu("PreClass") / "preClass" >> Hidden)
We prefer to leave the SiteMap enabled as tightly controlling access seems like a good idea in our case.

create hyperlink in sms in iPhone

Is it possible to create a hyperlink in an sms in an iPhone?
For example, if I want the word 'foo' hyperlinked in HTML then I'll write foo in a normal situation.
If I want to have a certain word in my sms to be hyperlinked to something, is there any way I can do this? Like "I have a surprise for you" and the receiver taps on the hyperlinked word 'surprise' which will take the user to the destined page.
Any suggestions as to how this can be done? Examples and samples welcome!
Thanks in advance :)
No, you cannot use html tags in sms / text messages. All you can do is insert the URL without the tag. It then depends on the receivers device whether the URL is presented to the user as link or as plain text.
I experimented with exactly this just yesterday. It seems you can't include a nicely formatted hyperlink, unfortunately. I hope to be proven wrong by somebody else, though :-)
However, as you've probably seen yourself, iPhone is able to recognize an URL and you can tap on it to open the URL in Safari (or tap the disclosure button next the message to get more options on what to do with the URL). As far as I can tell the only thing you can do is format your SMS accordingly: "I have a surprise for you: http://foo.com" even though that might spoil the surprise ;-)
No, you can't do this due to privacy issues. Apple thinks that giving you this ability would allow you to link users to malware and such. Sorry!
i don't think it's possible to create hyperlinks in SMS.
The only way is to send an URL, and the iPhone will convert it to a link...
Use a tiny url from tinyurl.
It doesn't allow you to do exactly what you are wanting but it at least can be used to cover up the long link.
This is the closest thing I figure out to do. I was wanting to use the "
No, you can not do this. However you could use tinyurl and format it like this
http://whateverYouWantToSay#tinyurl.com
Web browsers usually ignore anything before an # therefore you could effectively hide the actual site being linked to, as long as your friend does not know that.
What actually happens is the data before the # is submitted to the web site in the form username:password. However it must be a site that requires authentication to access, or the site will normally just ignore it.
If this helps, I've noticed that a custom hyperlink is possible on the OS X Messages app, but they have to be copied and pasted. To replicate this right click on a hyperlink in your browser and hit copy link. Then paste into Messages.
Uhhh this is possible here is a screenshot of an example - I copied a link from email and pasted in a new SMS - though it appears you cannot type html to create a link....

GraffitiCMS Comment Forms

In GraffitiCMS v1.2, I'm trying to include the comment form on my blog posts, but the submit button does nothing. Comments are enabled for the post, and I've included $macros.CommentForm() in the blog.post.view file. I've also confirmed that the necessary Ajax.ashx file exists on the root. Are there any other dependencies?
Are there any instructions posted anywhere that explain how to make this work? I've been Googling for several hours and can't find any.
NOTE: I cannot upgrade to v1.3 at this time. Hopefully on a future project.
You need to make sure you have the /__utility/js/graffiti.js and /__utility/js/prototype.js scripts linked on your page. Calling $macros.Head() should do this automatically.
It turns out that I was already doing as Jeremy H suggested, and calling $macros.Head(), but my use of jQuery was conflicting with Prototype. I resolved the problem by linking in jQuery before $macros.Head() and switching out all my jQuery $ tokens to use the actual jQuery function name.
https://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/