Mediawiki ToC (Table of contents not working) - mediawiki

I feel like an idiot for asking this question, mainly because I've tried googling and reading the documentation, but I still don't understand why my mediawiki won't generate a table of contents for this page (entire code):
==First Section==
===First subsection of first section===
===Second subsection of first section===
==Second Section==
==Third Section==
==Fourth Section==
==Fifth Section==
I've tried adding TOC and FORCETOC but that hasn't helped. Any suggestions? (Humbly appreciative.)

Related

How does one create a subpage from an html file

I couldn't figure out a title that descibes what I need but I will explain here. (I know how to make a sub page, just cant figure out how to make a path).
This may seem like a stupid question (which I cant figure out for the life of me after doing research), but how does one create a sub page to your html file so that it is a pathway such as:
exemplesite . com/Porfolio/
then you click an image which takes you to a new subpage and then the URL becomes:
exemplesite . com/Portfolio/Project-1
and this without changing pages. (I do not want this: exemplesite . com /Project-1)
Hope this makes sense.
Thank you
To create links for subpages, link to the folder, then the title of the page within that folder you want to link to.
For example:
This is how you do it:
PAGE NAME
If the FILENAME.html is not the same directory you'll address it like this:
PAGE NAME
answer via: https://forums.digitalpoint.com/threads/creating-links-for-subpages.2150899/
In the example you gave, Portfolio/Project-1, you would have a folder, Porfolio, and within it, a file, Project-1.html.
You can create "jump-to" anchors within your page by adding simply referencing element ids in a local href link (see snippet). I added a sizeable (ish) padding-bottom to clearly demonstrate the jump.
p {
padding-bottom:40px;
}
<body>
<p>Link to Books</p>
<h2>Introduction</h2>
<p>Welcome!</p>
<h2>Fruit</h2>
<p>Apples, Bananas, etc.</p>
<h2 id="books">Books</h2>
<p>List of books</p>
</body>

HTML5 footnote coding with "NAME"

I have hundreds of footnotes in scores of documents.
All are in HTML4 format. I have needed to update all the pages to HTML5.
When using a code checker for HTML5, I am informed that "NAME" as be deprecated and it I am getting warnings in to change the code.
I can't find a code example to resolve this. I am not looking to do anything fancy. I don't want to display the footnote by hovering the mouse over the call to the footnote. I just want to be able to click on a footnote number and get to it at the bottom of the page and then return! I don't see how that is done without "NAME."
Currently as an example, this is what a my code looks like. (I make have ten or more footnotes on any given page.
<P>This is in the regular text
<A NAME="sdfootnote1anc" HREF="#sdfootnote1sym"><SUP>1</SUP></A>></P>
AND it calls this at the bottom of the page.
<p><DIV ID="sdfootnote1">
<A NAME="sdfootnote1sym" HREF="#sdfootnote1anc">1</A> - Here I am explaining it before I go on after the break to the next footnote.</DIV><BR>
Change name to id
<A CLASS="sdfootnoteanc" id="sdfootnote1anc" HREF="#sdfootnote1sym">
<A CLASS="sdfootnotesym" id="sdfootnote1sym" HREF="#sdfootnote1anc">1</A>

Gitbook header add id and internal links

I am new to the programming community and new to Gitbook. I have searched gitbook doc but still having some syntax problems.
I have been trying to add internal links so that, on a long web page, I can click links on the top of the page and it will directs me to content blocks contained in the bottom of the page. I also have a few long pages.
[Clickable Link1](redirects to headerId1 in the same page)
[Clickable Link2](redirects to headerId2 in the same page)
...
Real Content
Header 1 with id = headerId1
Content1
Header 2 with id = headerId2
Content2
...
The resources I had looked for involves:
https://gitbookio.gitbooks.io/markdown/content/syntax/links.html
The problems I am having is:
add id to headings.
I tried to type ### Header1 {#id=myheader1} After typing ### and followed by a space, the Header1 {#id=myheader1} became big and shows as heading3 size texts. How do I escape and make sure it only shows Header 1 with heading 1 font and assigned with id of header1?
Refer to internal headings
I tried to follow the doc, but still, it only shows the original text with [] and does not turn into clickable links.
Please share some tips and help. Thank you very much.
I strongly advise against manually building a table of contents. It's a pain to make them, and even more of a pain to maintain them.
Instead, let software take care of this for you. Here are two GitBook plugins that I just found for making tables of contents:
https://www.npmjs.com/package/gitbook-plugin-page-toc
https://www.npmjs.com/package/gitbook-plugin-simple-page-toc
Plugins can be enabled within the editor or by editing the book.json file.
I know this question was asked a long time ago. Just in case anyone come across this because there is no official docs for this:
You could define your custom anchor to a header using the syntax ## My heading {#my-anchor} and reference it normally with [my text](#my-anchor). This will show the heading correctly as My heading and navigation will work properly.

Is it at all possible to display HTML code in Wordpress?

I have tried countless plugins, codyfying HTML with escape keys, and my blood is beginning to boil. Switching between Visual and HTML mode is actually changing my content, ie destroying it!!!
OK, i figured out what to do.
First go into visual mode.
Select Preformatted in the formatting drop down. A little grey box is created.
Inside the grey box, copy and paste your raw HTML.
Save it and switch from visual to HTML views a few times. There should be no mangling.
IT IS ABSOLUTELY CRUCIAL that you paste into visual tab, instead of in the text tab, or it will get stuffed up completely (very unintuitive. You would think it would work the other way araound).
Wordpress does a strange thing where if you switch between visual and "text" mode (HTML mode was renamed in 3.5 update) it strips any tags that appear empty which often times may not be. This might be what you are experiencing if I am understanding the problem correctly.
If you are just trying to display code on your website you should be able to wrap the code like this:
<code><p>Example code post</p></code>
This is laid out in these guidelines here: http://codex.wordpress.org/Writing_Code_in_Your_Posts
If it is a block of code that needs to not wrap you could also use the "pre" tag like so:
<pre><code><p>Example code post</p></code></pre>
This is described very well here: <code> vs <pre> vs <samp> for inline and block code snippets
Yes, it is absolutely possible. You can follow any of the above mentioned methods. I prefer the following way.
First of all, decode the HTML code using online html decoder. You can find any on google. Then, You can paste the decoded code on your post. The benefit of this method is that, your indentation won't be lost.
Decoded Code
Rendered View File
Hope, it helps future reader to find a way.
Wordpress is very buggy. It took me a long time to finally succeed. For my Wordpress.org installed on my pc I tried: go to visual mode, add pre-formatted text block, copy/paste decoded or encoded. I tried :
<pre><code><p>Example code post</p></code></pre>
That did not work.
The only way it works for me is:
Go to visual, instead of adding a pre-formatted text block I create a paragraph text block, copy/paste the encoded HTMl and then convert it to preformat.
Hope that helps.
Perhaps, You should try out this plugin
http://wordpress.org/extend/plugins/insert-html-snippet/
Hope this helps!
One way to do is to make the code commented. Something like,
<!--div>
<md-divider class="org__meta-divider md-soc-theme"></md-divider>
<h4 class="org__meta-heading">Technologies</h4>
<ul layout="" layout-wrap="" class="org__tag-container layout-wrap layout-row">
<li class="organization__tag organization__tag--technology">web services</li>
</ul>
</div-->
instead of
<div>
<md-divider class="org__meta-divider md-soc-theme"></md-divider>
<h4 class="org__meta-heading">Technologies</h4>
<ul layout="" layout-wrap="" class="org__tag-container layout-wrap layout-row">
<li class="organization__tag organization__tag--technology">web services</li>
</ul>
</div>

Indentable and collapsable text and code snippets in MediaWiki

Is it possible to define indentable and collapsable blocks of text or code (e.g. formatted with Syntax Highlight Geshi) in MediaWiki?
I have seen collapsable tables and lists in Wikipedia, and would like to apply the same concept to paragraphs and code snippets.
Thanks!
Yes, you will need to have ToggleDisplay and SyntaxHighlight GeSHi installed.
Then on your page add code like this (example for C++):
<toggledisplay showtext="this is the show text">
<syntaxhighlight lang="cpp">
<Put the code here>
</syntaxhighlight>
</toggledisplay>
(See also: Wikis and Wikipedia)