how to remove repository from top repositories in github main page? - user-interface

How to remove this section from github main page?

You cannot remove Top Repositories Section from GitHub Dashboard.
It doesn't show Top Repositories, but it list outs all your repositories sorting them by usage.
Hope it answers your question!

Related

How to split a repository for front end / API / Admin access (Laravel)

How can you take an existing repository, with many branches, and split it so that some (new front end devs) have access to only parts of the code, but retain the history in the main/full repo?
We have a (huge) Laravel project with a few SPA parts, and 3 separate admin sections. It's all currently in one single repo. Assuming I set up an online dev server so that the API is retrieving the right data based on the branch/version they're working on, is it possible to split the repo so that I (and a few others) have access to the full codebase, while others only can clone/push/pull from a sub repo? The sub repo would exclude the admin sections and API. I assume I'll have to completely restructure the project directory, which is fine.
We all work remotely, and I'm aiming to hire a few new people but don't want to give access to the full code base right away.
Yes, this can be done. You can use git submodules.
In this regard you can have the smaller codebase repo in a 'submodule' which lives inside your main larger repo.
Steps you'd need to take:
Remove the relevant code from the main repo
Add it to a fresh repo
Call the following commands from the main repo:
git submodule add [URL to smaller repo]
git submodule init
Nice article on it here

Use multiple themes on one website jeykll

I have recently found out about jekyll, and want to make a project landing page with it. I would like to have a home page using one theme (e.g. ubuild) and have another page for the docs (accessed via a navigation bar at the top) that uses a different theme (e.g. just-the-docs). How can I go about doing this?
EDIT: I want to use Github Pages for this.
Since you plan to use one of the themes on just a single page, I think the best solution would be to use two base layouts instead of two themes.
It will take some minor work initially, but will greatly ease future maintenance.
First set up the site to render just-the-docs theme for all pages including the landing page. Then modify _layouts/home.html to be a parent layout (like the default layout)
to render the markup from the ubuild.. theme.
I solved this with help from #JoostS's answer but with a few modifications:
Make an organization on GitHub pages with a repo called <org-name>.github.io. This repo should contain the theme for the home page (ubuild in my case) and all the content for it.
Make another repo with a jeykll site, called docs. This site should have the theme you want for the other page (just-the-docs in my case) and all the content along with it.
In the docs repo, add baseurl: "/docs" to your _config.yml
The <org-name>.github.io repo, should now be hosted at <org-name>.github.io/:
The docs repo should now be hosted at the <org-name>.github.io/docs url:
To link to the docs page, you should just be able to use /docs now.
The solution is to create two separate websites. The first site contains just the homepage and should be deployed to the root of your web folder. The second site contains all docs and should be deployed to a subdirectory, like '/docs/'. You might want to use baseurl for this: https://byparker.com/blog/2014/clearing-up-confusion-around-baseurl/
I do not think you can use this solution on Github pages. You can TRY to add the same CNAME to both repositories, as I am not 100% sure. Any other static hosting environment should work.
You can link from the docs to the homepage by linking to '/'. You can link from the homepage to the docs by linking to '/docs/pagename/' (assuming you use permalink: pretty).
The simplest way to maintain two layouts on the same site using Jekyll with GitHub Pages is for you to create a new repository for the new layout, so the main site is in a GitHub organization and the pages that need to use a different layout must be in your repositories.
However, if you are not using GitHub, just jekyll, just configure each folder as a new Jekyll project, and direct them to write to the respective subfolders in the _site folder. For everything to work out you need to start Jekyll Server from the main folder, and then build each subfolder separately, so it will update without removing the main one

Getting 404 on landing page for Octopress on Github

I followed Octopress original documentation and this blog to setup on Github pages. However once I deploy it and go to my blog url I'm getting 404.
I verified the setup by running it locally on port 4000 and it's fine. Would appreciate any help to make it work. Following is the link for the source file.
I see you GitHub page at https://github.com/aniruddhabarapatre.
So your GitHub pages should be at http://aniruddhabarapatre.github.io/, not http://aniruddhab.github.io/.
The article you reference does mention:
Create a new GitHub repository. If you are creating a personal blog create a repo called:
username.github.com
With 'username' being your GitHub account username (here aniruddhabarapatre).
Project pages (mentioned by Joel Glovier in the comments) is a good fit for your case, allowing you to:
define a gh-pages branch in your https://github.com/aniruddhabarapatre/aniruddhab.github.io repo
find the content of that branch published in http://aniruddhabarapatre.github.io/aniruddhab.github.io (meaning you might want to change the name of that aniruddhab.github.io repo)
But the idea remains: you already have one User Page. You cannot define a second one with the same account. Only project pages (one main page per project).

jekyll plugin not work on github

I want to change the order of pages in navitation bar by using jekyll-plugins / weighted_pages.rb from here.
This plugin work very well on my localhost but github.
I find the navitation bar is empty on github host, which seems this plugin does not work.
How can I solve this problem?
I copy weighted_pages.rb code below:
# Generates a copy of site.pages as site.weighted_pages
# with pages sorted by weight attribute. Pages with no
# weight specified are placed after the pages with specified weight.
module Jekyll
class WeightedPagesGenerator < Generator
safe true
def generate(site)
site.config['weighted_pages'] = site.pages.sort_by { |a|
a.data['weight'] ? a.data['weight'] : site.pages.length }
end
end
end
Add weight attribute to the front matter of your pages (like weight: 1) and use site.weighted_pages instead of site.pages in your loops.
Github pages does not support plugins. From jekyll's documentation:
GitHub Pages is powered by Jekyll, however all Pages sites are generated using the --safe option to disable custom plugins for security reasons. Unfortunately, this means your plugins won’t work if you’re deploying to GitHub Pages.
The same documentation page also gives you a workaround:
You can still use GitHub Pages to publish your site, but you’ll need to convert the site locally and push the generated static files to your GitHub repository instead of the Jekyll source files.
Currently, Github pages does not support some custom plugins.
If you want to make Jekyll site run as if it were local, such as let the custom plugins work properly, here is a way really convenient to build and deploy the Jekyll site to Github Pages.
jekyll-deploy-action - 🪂 A Github Action to deploy the Jekyll site conveniently for GitHub Pages.
https://github.com/jeffreytse/jekyll-deploy-action
With this action, I think your issues can be settled perfectly.

How can I read in project readme.md's into a user.github.com site?

Github now has automatic page generation for projects. Thats brill - it reads in the readme.markdown file in the project root and creates a neat site using a template.
The thing missing though is user.github.com pages. Is there anyway to (either automatically or by passing a config file) read in all of my current GitHub projects readme documents and push into a site design for a user.github.com template system??
Thanks!
The 'user.github.com' sites are built via GitHub Pages. They are independent repositories, the name of which matches the domain where they will appear. For example, my github username is 'alanwsmith'. I've got a repo called 'alanwsmith.github.com' which is processed via jekyll and available at: http://alanwsmith.github.com/.
Since they are independent and valid repositories, the GitHub doesn't apply any automation to them. The processing via jekyll only outputs the site. It doesn't mess with the contents of the repo itself. If you want to automatically list all your project Readme files on your user.github.com domain, you'll have to build your own process to gather the files and drop them in the source repo.
Of course, your individual user page (e.g. https://github.com/alanwsmith instead of http://alanwsmith.github.com/) lists your repos. Those links point to the individual project pages which, as you mention, display the readme files. I think that's as close as GitHub gets to doing what you want at this point in time.
More details on GitHub Pages can be found in the GitHub Pages Help section.

Resources