Using prototype citation grouping feature of MediaWiki Extension:Cite - mediawiki

I use MediaWiki 1.35.1.
MediaWiki Cite extension has a prototype reference collecting feature. I'd like to use it in my wiki. According to the note below, this one is only available in the Beta-Cluster and indeed, I can use it on its sample pages. The Beta-Cluster Special:Version points to 69a5435 revision of the extension being used. However, if I download this snapshot and place it in my extension folder, this feature still doesn't work and extends attribute is still not recognized. The error I've got is
Cite error: Invalid <ref> tag; invalid names, e.g. too many
How can I enable this feature in my own wiki?

As it turned out, I need to set in LocalSettings.php following option:
$wgCiteBookReferencing = true;
I missed this because this is not mentioned anywhere in Help:Cite page. I've found it later in Extension:Cite page.

Related

Link to Source Code from TypeDoc Documentation

I've documented a function and I can see that the generator has captured the line number:
Is it possible to configure TypeDoc so that a user can click through to see the actual source code? The full repository is here.
There is a TypeDoc plugin that might address your problem:
https://github.com/gdelmas/typedoc-plugin-sourcefile-url
It doesn't work for my situation because for some reason the URLs to the GitHub source I'm connecting to must contain blob/master, which this plugin doesn't add. But I add it here in case it's useful to you.

Fixing deprecated files

I'm trying to eliminate the console warnings (of deprecation) from the iron-flex-layout element.
When I load my app, I get the following errors in the console:
iron-shadow-flex-layout.html:12 This file is deprecated. Please use iron-flex-layout/iron-flex-layout-classes.html, and one of the specific dom-modules instead
(anonymous)
iron-shadow-flex-layout.html:12
iron-flex-layout.html:14 This file is deprecated. Please use iron-flex-layout/iron-flex-layout-classes.html, and one of the specific dom-modules instead
(anonymous)
iron-flex-layout.html:14
iron-fit-behavior.html:221 /deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
When I inspect the file paths, I see the following:
http://localhost:8080/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html
http://localhost:8080/bower_components/iron-flex-layout/classes/iron-flex-layout.html
http://localhost:8080/bower_components/iron-fit-behavior/iron-fit-behavior.html
I am reluctant to go tinkering around and manually deleting files in my bower_components directory.
So, how can I fix these errors? What is the recommended best practice?
Edit
Here is the deprecated file on Github. Line 14 writes the console warning. But this deprecated file is not being imported anywhere in the app. (I know because I did a global search on the string iron-flex-layout/classes and, separately, on iron-shadow-flex-layout.html). Instead, I have done as the warning suggests; I imported iron-flex-layout/iron-flex-layout-classes.html everywhere instead. But the warning persists nevertheless.
I assume the element owners and Google overlords want to retain the console warnings in place (and not accept a PR which removes it). So, what is the best practice? Live with the warnings? (It doesn't seem quite right to edit my local copy and just comment out the warnings.) Or should I do something else? (Maybe there is another option I'm not aware of.)
Edit2
per #tony19:
I recommend setting a breakpoint in the deprecated file (on the console.log() line) to see who's importing it. – tony19
So now, I'm using this:
https://github.com/PolymerElements/iron-flex-layout/blob/master/classes/iron-flex-layout.html
<script>
console.warn('This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead');
debugger;
</script>
I'm seeing some information appear when the app reaches the breakpoint. But nothing so far indicates what's causing the import of the iron-flex-layout element. Or what to do to fix it.
Is there a command or something that can log what file imported another file? I've looked all over for how I might accomplish that. Could anyone please describe in detail what that might look like?
The warning indicates that an HTML file in your source or dependencies is importing ../iron-flex-layout/classes/iron-flex-layout.html, which is deprecated. The import must be in your tree somewhere, or else the warning wouldn't appear. I recommend setting a breakpoint on the console.log() line of the deprecated file to track down the offender.
If you're in control of the offending element that imports this deprecated file, you can update the import to use iron-flex-layout-classes.html that the warning recommends. Otherwise, you can petition the maintainer of the offending element to update their dependencies (or submit a PR ;).
I had this same issue today and thought the same thing. However, diving a bit deeper I found a few third party components were using paper-styles/paper-styles which called in iron-flex-layout/classes/iron-flex-layout.html. The reference it'd be there somewhere I'm certain. Hope that helps.

Difference between name.html.erb vs name.erb

What is the difference between name.html.erb vs name.erb?
In particular, are there any reasons why name.erb could be bad to use?
I understand that name.html.erb is the convention - this indicates a HTML template and ERB Engine. But I can't find information if are there any reasons not to use name.html.erb, but name.erb instead.
My new workplace asks me to use name.erb, so I want to know: might there be any problems with this?
In short, no, there won't be any problems. Erb files simply output text. In many cases the file extension is ignored by the reading app as the reading app reads/interprets the containing text and its syntax validity. As #taglia suggests, the file extensions are mostly a 'hint' for you and may also be used by the OS to select a default app to open the file with. See here for a more thorough explanation: Output Type for an ERB File
Rails convention dictates template files to include the extension of the output type and the name of the file should end with the .erb extension. As you mentioned, name.html.erb indicates an HTML template and ERB extension that allows any instance variables in your controller's index action to get passed into the template and used. Similarly, name.js.erb indicates a JavaScript template. See here under 'Conventions or Template Files': An Introduction to ERB Templating
ERB is just a templating language, it is not limited to HTML (you could have name.txt.erb, or name.js.erb). Removing html from the name is just going to make your life more difficult (assuming it works), because you won't be able to know what file you are dealing with unless you open it.

HTML in Jenkins job descriptions

I have two Jenkins instances running. An old (legacy) one at version 1.614 and a new one with 1.633.
In the old one it is possible to use HTML in the job description (it even does syntax highlighting editing it). The new one doesn't. HTML content is escaped and shown as plain text. I could not find a change in the release notes explaining this behavior. Is there a configuration that I'm missing?
In the Global security menu:
Select this value to display HTML:
For enabling it via config: you have to install the configuration as code (CASC) plugin (https://plugins.jenkins.io/configuration-as-code/) , and add the following entries to your config file(s - I guess, it is better to have multiple files for a better overview):
markupFormatter:
rawHtml:
disableSyntaxHighLighting: false
If you don't need highlighting, change it to true

Snippet with Custom Variables

I'd like to create a package containing a series of snippets that incorporate user-definable variables. For example, I'd like the user to be able to provide a value for a variable called HOSTNAME and have the snippets include that user's value.
The Sublime Text Unofficial Documentation explains:
Snippets have access to contextual information in the form of environment variables. Sublime Text automatically sets the values of the variables listed below.
You can also add your own variables to provide extra information. These custom variables are defined in .sublime-options files.
I've had no luck finding any information on the syntax for a .sublime-options file, however, and Sublime does not seem to try to read a file with that extension when I save it anywhere under the Packages directory. Is this a typo?
Using a .tmPreferences file seems to do what I'm looking for. Is this the only method of getting user-defined values into a snippet? Is it possible to use a .sublime-settings file?
The .sublime-options, actually, is the .sublime-settings. .sublime-options were the ST1 files and the docs got outdated, BUT you use the wrong link, you should always check and switch in the sidebar on the left to your version - ST2, ST3.
And to answer your question, you need to put the variables in .tmPreferences as may be seen here