Are there ways to link mkdocs documentation directly to specific part of git repo? - mkdocs

It is great that mkdocs allows snippets and display of repo information, but I haven't found a way to create a "view source" link that could direct viewers directly to relevant part of a git repo remote. Are there ways to enable this?
A good example is pandas' "Source" link shown here.

Related

Editing index.html hosted on github pages

I have to make a very simple modification to a website which is being hosted on github pages (I just want to change the title in the index.html).
For simplicity I'd like to just modify and commit the change directly in the github code editor.
If I go to the github repo > Settings > Pages, I see that the under source it says "Your GitHub Pages site is currently being built from the gh-pages branch."
I have to switch from my master branch to the gh-pages branch to make the modifications and commit.
However I am not seeing any changes to the page, even after clearing the cache.
Am I misunderstanding how the github pages hosting works?
When you go to settings > Pages, you will see a dropdown menu for choosing which branch you want to post you website on. Just choose master .
After that you can easily edit whatever you want from github editor and then you have to commit the changes.
And after that you have to be a little patient till github servers save the changes and publish them for you.

Assistance needed with publishing a front-end html website with Github pages

So, uh, I'm really new to Github and would like to publish my Custom Seller Website (4 pages with interconnectivity, and an img folder with the pictures I use) via Github Pages. I have all 4 pages and the img folder in my repository, I deleted the description.md file (cause that was showing in the published page url) but it still shows the description when I go to the domain (username.github.io/...).. Any help is welcome! :)
Follow these steps to host your website
First create a new repository in github
Then push your code after your relevant commit to the github using git push -u origin master
Then go to settings in the repository
Go to the github pages section
Choose master from the dropdown under the source and click save
After refreshing the page you will see your website url under the github pages section

How to find the PDF version of a Read-the-docs project

What am I not seeing? The RTD features page says:
PDF Generation
When you build your project on RTD, we automatically build a PDF of
your project’s documentation. We also build them for every version
that you upload, so we can host the PDFs of your latest documentation,
as well as your latest stable releases as well.
But how do you find the PDF version? A websearch finds this 2012 blog post where the writer says:
Here, for example, is the url to Django-Tastypie’s PDF docs:
http://media.readthedocs.org/pdf/django-tastypie/latest/django-tastypie.pdf
You can replace django-tastypie with the slug for any Read the Docs
project.
However, RTD doesn't permit users to browse the website's directory tree via the URL: http://media.readthedocs.org/pdf/[project slug]/, get's me 403 FORBIDDEN! At least for project CookieCutter.
For security reasons, many websites do not allow you to browse directory listings on the web server; hence the 403.
Anyway, I guess you were looking for these:
https://media.readthedocs.org/pdf/cookiecutter/latest/cookiecutter.pdf
https://media.readthedocs.org/pdf/cookiecutter/stable/cookiecutter.pdf
Typically, it should not be necessary to construct this URL yourself. There is a link in the navigation bar of RtD. You just have to know where to find it.
Notice the 'Read the Docs' label at the bottom left of the page (together with the version indicator). Click it and a panel will open.
In the panel, you can select the desired version. The 'PDF' link navigates to the PDF file. The build system of RtD should automatically keep this file up to date with the documentation source.
Note:
for PDF and EPUB generation to be available, the RtD project:
must use Sphinx as its documentation generator; not MkDocs
must be configured to enable PDF and EPUB builds
I find the Read the Docs label that opens a panel with a pdf link preferable. However, if that isn't present, an alternative is doing a web search for it.
e.g., search for
readthedocs cookiecutter pdf
and the first result I see (as of 8 July 2020) is a link to the pdf: https://readthedocs.org/projects/cookiecutter/downloads/pdf/latest/
As of 8 Jul 2020, the cookiecutter readthedocs does indeed have expandable panel with the pdf link. However,
when I look at the readthedocs for pipenv, there is no ReadTheDocs clickable to open a panel. But if I search Google for
readthedocs pipenv pdf
the first result is a link to the pdf: https://media.readthedocs.org/pdf/pipenv/latest/pipenv.pdf

Github pages organization blog doesn't run jekyll build

so, I have this github organization with its blog powered by Jekyll.
https://github.com/AvoGenie/avogenie.github.io
I would like github to run jekyll build on every commit, however currently it isn't doing it.
How can I fix this?
Any help is appreciated.
Kind Regards,
Adrian
PS: I checked google and stackoverflow but I couldn't find anything that helps me, because all guides and tutorials and docs just say, 'push to github'.
Your site seems fine to me, looking at the commits you currently have on the Github repository (latest commit on master right now = 14ca1e5).
What is different from what you expect?
So, turns out when I updated the repo I accidentally deleted the CNAME file that githubs needs in order to work with custom domains.
Two learnings from this:
Check whether you have a CNAME file when getting a 404 error on a custom domain with github pages
Also test the default username.github.io when deploying to github pages

Where is monobook.js stored in MediaWiki?

I am trying to add extra buttons for my wiki editor page and I came across to this page:
http://en.wikipedia.org/wiki/User:MarkS/Extra_edit_buttons#Simple_Install
In the simple install section, I need to add extra code in monobook.js.
However, I cannot find monobook.js in my wiki folder. Can anyone give me some direction?
The "simple install" you linked to is for Wikipedia users who want to enable the gadget from their personal script file.
The correct topic would be #Installing XEB on your own Wiki, however I don't fully agree with that (importScript is deprecated, for example). Your alternatives are:
let your users just import the script from //en.wikipedia.org/w/index.php?title=User:MarkS/extraeditbuttons.js&action=raw&ctype=text/javascript. That's a possible XSS risk, but imported userscripts always are. Bonus: The will always get the latest version.
copy the script, the css and the images to your domain - which means you are in charge to maintain them. You could locate them anywhere in your server's file system, on a wiki page in the MediaWiki: namespace (only admins can edit) or on a user subpage that ends in .js (only that user and admins can edit). The last one was recommended in the help file, but I suggest not to use User:MarkS for that. Ensure nobody whom you don't trust could log into that account.
Then promote that location to your users, so they can import the script from there.
Even better: Install the Gadgets extension and migrate the script to a gadget, which users can easily enable in the settings.
Notice the script is deprecated and might not work with current MediaWiki versions. It depends heavily on script loading order, which needs some hacks to integrate well with the ResourceLoader.
See also Manual:Interface/JavaScript; there are similar customisations at Manual:User group CSS and Javascript and Manual:Page customizations.
The page you linked to talks about a user's monobook.js, which is a page called User:UserName/monobook.js.
If you want to do the same for all users on your wiki, you can use the site-wide monbook.js, which is not a file, but a page called MediaWiki:monobook.js.
Keep in mind that those scripts only apply if you're using the Monobook skin. If you want to have some script for all skins, use User:UserName/common.js or MediaWiki:common.js.