How can I use og:title and og:description for Twitter cards in Docusaurus 2? - twitter

I'm wondering how I can reuse the title and description metadata for Twitter cards title and description, respectively. Docusaurus uses these values to populate og:title and og:description already so perhaps there is a way to pass these values as argument for Twitter cards generation.

If the og: tags are present, Twitter cards will use them. You will need a twitter:card tag to specify the card type, though - the rest can be og: tags equivalent to the Twitter Cards markup.

Related

How to get linkedIn company feed page url with sorting parameter

I want to get a company page feed URL with a sorting parameter. Right now we can sort the page feed from UI. But I want to generate a URL with sorting applied by default. Check the screenshot below

Generate dynamic URL pages basis filter options in Rails

We have a rails app at remote.tools and if you see the product pages (see this page), there are a set of tags associated with each product. I am planning on having filtered search basis these tags on category pages (see this page). Now, I have already tried doing this with the 'Acts-as-taggable' gem and 'Simple-form' (basis this blog).
I am fine with having a page refresh on hitting 'search' or doing it in place (able to do both right now). However, I want to have unique URLs to be created basis the combination of filters applied by the user. For example, if the user selects 'Video communication tools' as the category and 'free trial' and 'easy-to-use' as the tags, the page URL should be '/video-communication-tools-with-free-trial-that-are-easy-to-use'. Currently, the filter options are passed as params i.e. '/search?category=xx&tags=yy'.
Having separate URLs for filter combinations will allow me create unique pages for indexing and add content contextually as well.
How should I go about doing this?
You can use jquery to achieve that,
Something like this.
<script>
$('#search_button').on('click', function(){
window.location = "" + $('#tag1').val()+"-"+$('#tag2').val();
});
</script>
Make sure to add id in your search button. Hope this works for you.

Tags in Onenote

I am syncing OneNote notebooks into my application using MS graph API. Onenote has few tags like To-Do, Important, Question etc. When I fetch html content for particular page these tags comes as data-tag like in -
<p lang="en-US" data-tag="important" style="margin-top:0pt;margin-bottom:0pt"><span lang="en-GB">Abc</p>
How can I replace these tags with the icon with which they are represented in OneNote UI. If I think to skip these tags the notes look very weird.
What is the way to extract this data ?
Where are you trying to render this content? Or are you trying to send it back to the OneNote API?
Since this data-tag is a custom attribute, you would need your own custom code to render it on a web page for example.
You'll have to
1. Get the images associated with each tag - you can use the link below for the full list
2. Make the API call
3. Write code that replaces each data tag with the proper
https://msdn.microsoft.com/en-us/library/office/mt159148.aspx

Ruby on rails select tags from fixed lists(rails)

I have some models, for example, Post, User. Is it possible to use tags only from fixed lists of tags for model Post and model User?
You could add a validation before saving your tags, checking that tags are included in an array (that could be stored in database, a constant, a file..).
In the view part, that depends on what are you using, but assuming you are using a jquery plugin, check for one that accepts an array of possible tags and pass it yours. This one for example (check the typeahead part): https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/

How to get value of an custom attribute using asset:get tag

My application has a page attribute to store the page title. while writing the site plan, I am loading the page asset using asset:load by ID field. In the same way i want to get the value from "PageTitle" page attribute using asset:get instead of assetset: tag.
I think its not possible Mandava. The assetset api was built for handle flex assets. asset:get handles basic asset attributes like id, startdate, enddate..
Use asset:scatter tag and access the flex attributes using the Attribute_<Attribute name> format using ics:getvar or ics.GetVar().
Ex: <ics:getvar name="Attribute_PageTitle" />

Resources