is there any way where we can host the jekyll admin page on our own github page site or is it only runs on localhost.i tried to run that by adding it to my repository but it runs only readme.md on the github page.
Related
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
I know this question were asked multiple times on stackoverflow, but I could not find any proper solution.
I am using Magento 2.1.7. After successfully installing Magento, I clicked on "Launch Magento Admin", They told me to enter username and password. But the problem is that I find Admin Panel Login crashed, as shown below:
Crashes Magento Login Admin PAnel
**EDIT2: This is what i got when you to me to run this command:php bin/magento setup:static-content:deploy ** Image
You should check that you have the .htaccess file in the pub/static directory:
https://github.com/magento/magento2/blob/2.1.4/pub/static/.htaccess
This will add the rewrite for version URLS.
Versions are for cache busting static assets, you can read about cachebusting here: https://css-tricks.com/strategies-for-cache-busting-css/
Hope this helps
I have a Jekyll site deployed to Heroku. I have created a custom 404 error page in source/404.html file. The page can be found at mydomain.com/404/. But when I try to go to pages which don't exist, the custom 404 page doesn't work. And instead I get a blank, default Heroku error page.
What can be a reason for that? Note that a permalink for the page doesn't have an html extension. Can this be a problem?
Have you tried adding a permalink to the YAML front matter?
permalink: /404.html
also I have read that the 404 page is specific to GitHub pages, but worth a try
If you have followed the Heroku official Jekyll setup, you should use 2 buildpacks :
heroku/ruby
https://github.com/heroku/heroku-buildpack-static
The latter allow a static.json configuration file (at the root of your project) to customize nginx. The documentation tells you how to add custom error pages.
In your case, the static.json file should contain :
{
...
"error_page": "404.html",
...
}
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).
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.