Github: Wiki page title from markup not filename/web client - github

Is there a way in github to have a wiki's title be based on the markup? I have found another project using markdown that has the title for Home.md wiki page come from the file. The author could have also used the web interface and made the title of the page the same as the markdown. That project is here:
https://github.com/sitaramc/gitolite/wiki
When I tried doing the same thing with restructuredtext (Home.rest) using the underline of ='s the title ends up being ignored and not even shown in the rendered page. The same thing also happens when using markdown.

Looking at this pull request from a few months ago and the related discussion, it appears that the page title used to be set based on the markdown, but is now based exclusively on the filename.
That would explain why a project might have RestructuredText/Markdown that appears to define the title (it once did!), but the same doesn't work for you.
It appears that you're out of luck for defining the wiki page title through the RestructuredText/MarkDown file these days.

Related

Github issue template emoji's not showing up

I've made issue templates for my GitHub repo. I saw that it was possible to put emoji's in the title of the template, and thought that would be a fun addition, so I did that. However, my emoji's don't seem to be showing up when actually choosing a template.
This is my template file:
name: ":book: Documentatie"
about: Beschrijf informatie die niet klopt of mist in de documentatie
The emoji doesn't appear in the choosing, though:
Which is weird, because when I go to the file in my repo, it looks like this:
I have no idea what's going wrong here, am I missing something or is this a bug? I've tried refreshing the page without cache, which is really all I can think of.
Although this is not a valid solution and I will thus not mark it as the solution, I will say I have found a workaround. There are websites where markdown emoji's are displayed, for example this one, where you can select the emoji you want, copy it, and paste it in the online editing tool of GitHub. It will then display correctly on the issues page, but it's kind of a hastle and clearly shouldn't be necessary.

Jekyll unhide reference-style links on Github pages

I have been using github pages with jekyll for auto-generating my blog using markdown documents.
I would like to use reference-style links then show a list of the links at the bottom of the page.
basically, I want the reference-style links to be printed on the page, by default they are hidden.
The idea is to have a list of references that a reader can refer to for more information.
for example, the following text:
# some header
...some body text in the blog with a link to [wikipedia][1]
...
...
# reference links
[1]: https://www.wikipedia.org
should generate the following output:
some header
...some body text in the blog with a link to wikipedia
...
...
reference links
[1]: https://www.wikipedia.org
As seen, the reference-style link is used in the markdown but it is also displayed on the page.
The previous "correct" output was achieved by duplicating each line and escaping the special characters, but this seems a bit redundant.
Can this be achieved by changes to _config.yml or using ruby? Other options are also welcome (css magic?).
tldr; I want a way to "unhide" the reference-style links at the bottom of my markdown page.
First, you have to understand exactly what is doing what:
Your markdown parser is converting your markdown into html.
Jekyll is taking that html and organizing it into pages.
GitHub pages is serving up those html pages.
The client reads that html and executes any JavaScript, etc.
The problem is that the markdown parser doesn't include the reference links at the bottom of the page. It's not like they're there but hidden. They simply aren't there. So you aren't going to find a CSS solution, because there isn't anything to style. You might be able to accomplish this with a custom markdown parser that includes the reference links in the generated html, but that won't work with GitHub pages and is probably going to be pretty hackish.
Another option is to execute JavaScript that uses document.links to get every link on the page, then output them in a <ul> or something at the bottom of the page. Something like this:
var links = document.links;
for(var i = 0; i < links.length; i++) {
var linkHref = document.createTextNode(links[i].href);
var lineBreak = document.createElement("br");
document.body.appendChild(linkHref);
document.body.appendChild(lineBreak);
}
You might restrict that to only include links in a certain div (like this), that way you don't have to parse out your navigation links and whatnot. You also have to consider the order.
Another option might be to include them in each post's frontmatter as a yml list, then show those in the layout that displays the post.
Of course, you could also simply create the reference yourself using markdown.

Can a GitHub wiki embed HTML

I would like to create a wiki page that is a preamble (standard markdown) followed by an HTML/JS code listing followed by (in a frame I suppose) the page that this code would generate.
Is this possible?
PS The code is: http://pipad.org/MathBox/slides_simple.html
Github Wikis allow you to embed HTML, but not all HTML tags are supported.
To embed supported HTML:
Edit a wiki page.
Ensure the edit mode is on "Markdown".
Type the html directly into the main content area (there's no "code" view, like you often see in tools like Wordpress).
Which tags aren't supported?
I couldn't find documentation on this, but we have a few clues:
Github wikis are built on a software tool called Gollum. We can see which tags are supported in Gollum by default here in the Gollum docs. Github may customize these defaults for their use-case, but I'll bet it's pretty similar.
I went ahead and created a test wiki here with all the major visual html elements added to it (copied from Poor Man's Styleguide). It looks like the main tags that don't display are iframe, video, audio, and all of the various form inputs (textarea, input, select, etc).

Change font in Github Flavored markdown for Table

I am creating a Wiki page in github.com. I am trying to use table in the Markdown edit mode. I created table by embedding html expecting to add inline-css later but found that inline-css also not working.
I tried following:
<style>
.markdown-body table td {
font-size: 12px !important;
}
</style>
Link for my wiki page.
Have anyone tried it before or achieved similar things or any help?
I have managed to make the font size small in table by using <sub>...</sub> tag.
Achieved this by Wrapping each line of text (inside td) under <sub>...</sub>.
UPDATED WIKI LINK
Just because I don't see this mentioned here I'd like to add one interesting possibility. I know that GitHub's markdown is easy, but if you get at this point where you are sort of battling with it's limitations to get the styling just the way you like it, you might consider switching over to GitHub Pages.
From that link:
GitHub Pages are public webpages hosted and published through our site.
You can create and publish GitHub Pages online using the Automatic Page Generator.
GitHub has special handling for a branch in your repo called gh_pages. Any content pushed to that branch will be published to a subdomain on github.io. Once done, your very own static website will appear at https://your-username.github.io/your-project.
Github makes it super easy to convert your existing markdown to some nice looking website (check out the Automatic Page Creator section in the repo settings) which you can then just pull in from the gh_pages branch and edit to your heart's content.
While the CSS usedby GitHub is described in this official guide, I didn't find any example where you could embed your own stylesheet in a page served by GitHub.
And section would be ignored.
That was already the case two years ago for Gist (for instance).
This worked for me:
<font size="+1">Description</font>

Can't change title/caption of shared links (was possible with old interface)

I run a page for a Russian company, and I often have to fix the grammar in titles of my links. This was possible in the old interface - by clicking on the title in the post-preview, etc. But now I cannot do this, as there is no title given in the preview.
Will the old functionality be restored?
Thank you,
Ciaran