This is my github pages . I have already create gh-pages brench.
I want to create markdown file and use jekyll to convert it to .html file.
It can be successfully shown on my localhost.
(auto-generate _site and .html pages)
But I upload the whole directory to github .
The index file can be loaded , but post file cannot.
(click the post link,it show 404 error page.)
What happened to this ?
This is my jekyll github link:
https://github.com/larrywhy/jekylldemo/blob/gh-pages/index.html
This is my pages:
http://larrywhy.github.io/jekylldemo/
At _config.yml file, change the baseurl from "/jekyll_demo" to "/jekylldemo".
You misspelled.
Related
I have a Jekyll-based and Github-pages-hosted site. I also have a Git Submodule that contains both YAML files and images. I would like to use it within my GitHub pages Jekyll project but I’m not sure how.
Here's example directory structure:
/assets/
/_data/
/MyGitSubmodule/yaml/
/MyGitSubmodule/images/
I’m used to putting YAML files in _data and images in /assets/. Is there a way to configure Jekyll also parse YAML files in another directory? Or copy static files from somewhere in _data during the build step? Or set up symlinks? That work with GitHub Pages?
I've tried:
Changing the data_dir setting to be the same as my /assets/ directory but I don't want to make my data files publicly accessible.
Creating a symbolic link on Windows with mklink /D but I get an error on servingC:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jekyll-4.2.2/lib/jekyll/utils.rb:141:in initialize': Is a directory # rb_sysopen - C:/Ben/personalsite2/assets/unreal/specifiers (Errno::EISDIR)`. Also ]this page seems to imply that they work on GitHub pages](https://github.com/chetabahana/symlink) but other docs for Jekyll seem to say that they are disabled in “safe mode” and GitHub pages.
Eh in the end I solved this by putting my data_dir inside /assets/ and by by using the exclude setting in config.yml to stop it from serving some of the yml files
In Netlify to redirect a default Netlify subdomain to a primary domain I need to add a _redirects file to the root of my _site folder.
In the root of my Jekyll project I've added a file named _redirects (no extension), but when my _site is generated it ignored the file and nothing is created, no file, no folder and page. How do I move a file with no extension into my _site directory?
I've added numerous static files with extensions without an issue, but I'm not sure how to accomplish this one.
From Netlify redirects documentation :
... (For Jekyll, this requires adding an include parameter to _config.yml.)
include:
- ...
- _redirects
I'm trying to change /_site/about in index.html. When I edit the index.html and start jekyll, index.html back to it's original content.
Sorry for my english.Thank you very much for your help.
You don't edit files inside the /_site directory. When jekyll builds the site, it overwrites any and all files in that directory.
Edit the index.html file in the /about/ directory outside of the /_site/ folder.
Run the command jekyll build to apply these changes to the generated site.
Or use jekyll serve to automatically host the content locally and update the content when a change is made.
There's no need to edit Index.html file as it is generated from the markdown file your provided which as we all know is called index.md, whenever you change that file and run jekyll build it re-generates the index.html file hence if you edit once you would have to do the same again when you change index.md file.
So directly write html / markdown in index.md file in your jekyll directory.
Best,
Daksh
I am using Hugo http://hugo.spf13.com/overview/introduction to render a folder with html/css/js files as localhost in my laptop.
I have html files in /content and all js/css/img files in /static folder
This is content in config.toml
baseurl = "http://localhost"
contentdir = "content"
languageCode = "en-us"
title = "my new hugo site"
I did hugo server and it rendered /public folder just fine. But all .html files now turning into .xml files and I cannot open them in browser like http://localhost:1313/index.html or so.
What did I do wrong?
Did you setup a theme yet? Without a theme, Hugo will render files as XML, if you read the documentation on themes, that should give you what you need.
First you have to clone themes from github.com/spf13/hugoThemes
In my case I did'nt have git install in my test machine here are the things that I did:
1) Download theme from github.com/spf13/hugoThemes
2) Extract theme to /path/themes
3) Run hugo --theme='themename'
I just got started with Jekyll, I trying to get it working on my Github site, it loads all posts as it should but it doesn't load the _layouts default.html. As far as I know I have all of the necessary files.
The Jekyll blog
The source code
Anyone that can explain whats going on?
Try moving your _config.yml file from the /blog/ subdirectory to the root directory of the repository, and then add this line to the file:
source: /blog/