Display an internal link URL on a page/article with Pelican - pelican

The usual syntax to make links with Pelican is:
This is [a link]({filename}/foo.md)
That works just fine.
But I'm on a page where I'd like to actually show the URL of the link. That is, I want the generated HTML to be like this:
<p>Here is the link:</p>
https://example.com/foo.html
I tried writing the obvious:
[{filename}/foo.md]({filename}/foo.md)
But that got rendered as:
{filename}/foo.md
I couldn't find anything in the documentation, is there any way to do that?

I don't think the feature in question was designed to behave that way. If it were me, I would use:
[https://example.com/foo.html]({filename}/foo.md)

Related

Svg-edit usage reference where i can find it?

I found this tool(https://code.google.com/p/svg-edit/) very useful, but there is any reference for this project allow to integrate properly in your applicatione instead of simply add it to an iframe?
For example i want to retrieve the svg code for save it in a variables or something like this
It's possible but might be a little tricky to strip out the required resources and load them in your own application while making sure that there aren't any conflicts. This is actually something I plan on doing for one of my own projects.
Do you need to do this though? You can talk to the iframe from your application pretty easily. For example, to get the SVG content you would use this (assuming you only have 1 iframe on the page) ->
var svgedit = window.frames[0];
svgedit.svgCanvas.svgCanvasToString();

Cannot edit or udate content with TinyMCE in Webmatrix2

If anyone can help me that would be great. I'm trying to submit any changes without getting the...
"A potentially dangerous Request.Form value was detected from the client.
I'm using tinyMCE with my project and if I enter any content that has any HTML characters I get the above message
I have tried various solutions here on Stackoverflow and elsewhere but they didn't work for me. The last solution I tried was here
Another site that looked promosing but without luck...
I haven't done any development for a while so I'm a tad rusty and not sure what you'll need until you ask.
Thank you
Use Request.Unvalidated to reference your textarea in your code block:
var html = Request.Unvalidated("myTextArea");
If you want to output whatever the user submitted, and you wanted the browser to respect the HTML markup that is included, you need to use Html.Raw:
You entered: #Html.Raw(html)

Google+ : Multiple +1 on same page, different content

I've tried to find an answer to this (both in the dev docs and here), but with no luck.
The "+1 button" works fine on normal pages (where there's just the single +1). But I have a page with multiple entities (to use the terms of Drupal: A View displaying multiple nodes) where I'd like to add "share buttons". So far I've added Twitter and Facebook.
Twitter is the simplest as it just takes the string you give it..
Facebook takes an url, but you can specify your own url.
When I try to specify my own url for +1 I get this Error:
Unsafe JavaScript attempt to access frame with URL http://one80.seasites.se/whats-up from frame with URL https://plusone.google.com/_/+1/hover?hl=sv&url=http%3A%2F%2Fone80.seasites.se%2Fwhats-up%2Fl%25C3%25B6rdag&t=1342724634133&source=widget&isSet=false&referer=http%3A%2F%2Fone80.seasites.se%2Fwhats-up&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dr4LFRxx-_oY.sv.%2Fsv%3D1%2Fam%3D!ZCfx2q5v6YmYvWjcTQ%2Fd%3D1%2Frs%3DAItRSTNI50TT3SY8R9klRLc_1sBJ5_Rp3g#id=I3_1342724634541&parent=http%3A%2F%2Fone80.seasites.se&rpctoken=619983104&_methods=mouseEvent%2CtrackingEvent%2ConVisibilityChanged%2C_onopen%2C_ready%2C_onclose%2CcloseOrHideThisBubble%2C_close%2C_open%2C_resizeMe%2C_renderstart. Domains, protocols and ports must match.
rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:173
ec.a.v rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:173
xh rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:203
q.get rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:211
ec.w rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:173
Rh rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:208
q.w rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:220
Rb rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:30
Xg rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:187
(anonymous function) rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:226
To explain why I want to use separate URL:
every node is something like an event, every node has it's own url (which contains an image and text/info). So when you click Like (for FB) it gets the title, info & image and includes it in the post (So it says "What's up - Gathering", instead of a generic "What's up" and no/the same image).
I'd like to accomplish the same with G+.
Is there a way to accomplish this for G+?? Have I missed something??
I guess one way to do this is by using an iframe for each of the nodes and pull in a special version of the "node page" with just the g+-button. But that's a pretty nasty hack (and not that fun to set up).
Any ideas are welcome!
The error you're seeing is actually due to an issue in Chrome. The +1 button should automatically recover.
You can explicitly specify target pages by using the href attribute. Your markup will look like this in practice:
<g:plusone href="http://example.com/targeturl"></g:plusone>
Or like this with HTML5 syntax:
<div class="g-plusone" data-href="http://example.com/targeturl"></div>
If these don't work, can you share a link to a page where you're seeing it not work? I can take a look :)

parsing html data iphone xpath

have this webpage http://www.westminster.ac.uk/schools/computing/undergraduate . I'm using hpple to retrieve data (just started learning about it). I want to specifically retrieve the href from he main page, how can i do this?
I have this line - "NSArray *elements = [xpathParser search:#"//a"];" is able to retrieve all of the href links within the page however how can i retrieve just the ones in the main content? e.g. "BSc Honors Busniess Information Systems"? whats the syntax for it?
It looks like all of the "main content" stuff is found underneath elements with id attributes like "content_div_XXXX" where XXXX is some randomly generated sequence. You might be able to get at what you want using an XPath that looks something like:
//div[starts-with(#id,'content_div')]//a
You should be able to get something like this working, although you'd have to try it out and perhaps tweak it a bit to make it work precisely as you want. Refer to W3Schools XPath page for a good set of XPath tutorials

How to create MSDN like links in Sandcastle documentation website?

I've generated a website documentation of my project with Sandcastle. This website uses frames so when I click though sites my URL in browser does not change.
I would like to have URL changed in browser when I browse through website documentation generated with Sandcastle. Why? Because I would like to link to concrete subpages of documentation from other parts of my developer environment.
And further more I would like to have this links permanent. So when I generate once again documentation from new version of my project, links will not change so that I will not need to change all links to new.
Is this possible and how to acomplish this?
If you add the code below to the top of SplitScreen.js the browser will "inject" the TOC frame and focus on the content you linked directly to (using the trick Vitaly Shibaev showed).
if (window==top) {
window.location = "/?topic=" + (window.location.pathname.substring(1));
}
This code works it the documentation is placed at the root of your website - if you have it in a sub-folder you need to expand on "/?topic" and remove the sub-folder part from the pathname part.
With this change you can use the "direct links". I also expect people who find you via Google get a better experience (getting the content they searched for AND the TOC bar).
In order to create correct links to specific subpages of documentation you may use similar request: $DOCUMENTATION_ROOT$/Index.aspx?topic=html/$TOPIC_ID$.htm
E.g. http://www.ewoodruff.us/shfbdocs/Index.aspx?topic=html/8dcbb69b-7a1a-4049-8e6b-2bf344efbbc9.htm
instead of http://www.ewoodruff.us/shfbdocs/html/8dcbb69b-7a1a-4049-8e6b-2bf344efbbc9.htm
Vitaliy and mawtex have solved the 'how to link to documentation subpages' part of your question.
The "making links permanent so they do not change when regenerating documentation" part of your questions is solved automatically, since the html file names created are based on a hash of the topic name by default. I.e. If you do not change the part of your code that you are documenting, then it will use the same file name.
You can change the way that html file names are generated, but all given methods are based on the member name or a hash of the topic ID, so links shouldn't break if the code hasn't changed.
See Sandcastle Help File Builder's NamingMethod documentation for more info.