I have a directory full of markdown (.md) files I want to render into a website so I can see what it will look like. I installed Jekyll which I've used a number of times, cd'd into the directory and executed Jekyll serve.
Jekyll created the _site directory and instead of processing my .md files into .html files, it just copied them into the _site directory.
I'm at a bit of a loss as to why it's not processing the markdown. Anyone know why?
Jekyll only processes files with Front Matter.. otherwise, those files are designated as "static files" and simply copied verbatim to the destination directory.
Related
I am trying to move a file from a folder to another through GitHub actions. I am doing this because I am building a jupyterbook pdf from this https://jupyterbook.org/en/stable/advanced/pdf.html. When I do it through pycharm and terminal, I can see my pdf has bene placed in the _build folder. But on github there is no _build folder??? So I had to make a GitHub action to move the PDF from this _build folder to a folder that I can see on GitHub. But it doesn't work. Here is the checks on my github action. Any ideas why the file is not moved ?enter image description here
Ideally I should commit this but I am not sure how.
I found that the problem was that after I had moved my file I wasn't committing.
I didn't know you had to commit in the github actions for the file to actually end up in the repo.
I'm using Jekyll to build a Github pages site, and have run into a sort of silly issue.
Github recommends Jekyll for Github pages, so I sort of assumed it would just work; however, it does not.
Jekyll by default builds all files to the _site/ directory, which is really nice and looks fancy and so on, but is not an option for Github pages.
Github seems to offer only three options for hosting:
Root of master Branch
docs/ Folder of Master Branch
gh-pages Branch
So, pray tell, why can I not build Jekyll to either A. a branch with a custom name or B. a folder named docs/ instead of _site?
Turns out I didn't read enough docs.
The solution is to add a tag to the _config.yaml file in the root of the project.
This line will switch from using _site to docs/ for build output:
destination: docs/
Alternately, you can pass this as an environmental variable like so:
jekyll build --destination docs/
I am trying to --watch for changes from scss files from one directory that I am #importing in another directory.
Is there any way to do this?
The imported files are being changed in their respective directory but are not being updated because (I presume) sass is looking for changes only from the directory I am watching from?
I'm using Jekyll with Forestry.io and GitHub Pages. Everything seems to be working properly except for when the build process runs and the site is copied to the gh-pages branch. All of the static files (eg. robots.txt and sitemap.xml) get copied, but the CNAME file for my custom domain does not.
If I change the file name to all lowercase (cname) then it gets copied. But GitHub Pages doesn't recognize a cname file.
I don't think anything in the build portion of the Forestry.io settings would cause this issue.
build:
preview_command: bundle exec jekyll build --drafts --unpublished --future -d _site
publish_command: bundle exec jekyll build -d _site
preview_env:
- JEKYLL_ENV=staging
publish_env:
- JEKYLL_ENV=production
preview_output_directory: _site
output_directory: _site
Are you publishing your build to Github Pages? Github Pages can/should contain the (Jekyll) source, not the build. So to be extra clear: Github Pages should contain .md files and not (built) .html files. The CNAME file is designed to be used by Github Pages, so Github Pages is not the culprit. Forestry.io or your build process probably is. Forget about the build process and publish your changes directly to your github pages branch. That should do the trick.
Can I change the directory Jekyll uses for it's temporary building?
I'm using Jekyll on a gh-pages branch and when I switch back to my Ember project on master, it puts new files in /tmp. This causes problems with Jekyll's build, and forces me to delete the dir each time I switch back to gh-pages.
Yes, you can.
You have a few ways of doing this, in your local folder, where _config.yml is located (Jekyll site root directory):
A. Editing _config.yml to have a destination for site generation:
In _config.yml, add the following:
destination: /tmp/jekyll_site/
This will tell jekyll you want temporary sites generated in the /tmp/jekyll_site folder.
B. Passing the destination via terminal
jekyll serve -d /tmp/jekyll_site/
OR jekyll serve -destination /tmp/jekyll_site/
This flag will have Jekyll generate files in the specified folder.
More information on the configuration options and flags used by Jekyll can be found here in the documentation. :)