I put yaml file on GitHub Pages, but I don't find that yaml file. I'll change file's extension (to txt), and I want to know what kind of files I can use? Any white list or document exist?
This is my trial and errors.
OK
txt - http://tachikoma.io/i18n-step.txt
html - http://tachikoma.io/index.html
js - http://tachikoma.io/js/init.js
css - http://tachikoma.io/css/prism.css
json - http://tachikoma.io/locales/en/translation.json
NG(404)
yml - http://tachikoma.io/example/bundler/.tachikoma.yml
pot - http://tachikoma.io/_build/translation.pot
repository: https://github.com/tachikomaio/maguro.tachikoma.io
Edited: 2014-11-12
GitHub pages does not show a file which name starts with period e.g. .example.yml.
This is due to the fact that GH pages tries to manage your site as a Jekyll site. Then ignoring some file name patterns.
If you want all your files to be copied just add an empty file named .nojekyll at the root of your site.
Related
For my jekyll blog, I'm knitting Rmd to Md for the posts. At somewhere (preferably top), I want to programmatically add a link to view the source page (Rmd) hosted under _sources folder in top level directory.
Similar implementation can be found at https://yihui.org/en/about/ (at the left sidebar- Edit this page option)
Can this be done by some modification in custom knit command?
OR
Some html-include with liquid syntax should be used?
What about this? This has the Github icon, and links to the repo on the github page. Without any reprex, or an example from you, this is the best I can do unless you give more details. Does Jekyll use YAML?
I got this working, so answering my own question
Well in Rmarkdown, we can access the current source file as knitr::current_input().
This can be combined with the url of repository to get the full link to the source file. The best way is to create a new YAML entry as
RmdSource: '_source/`r knitr::current_input()`'
Now to programmatically add the link, either we can use R code with some liquid syntex at the top of the source file OR we can use html-include file inside the current layout file.
I prefer the latter.
30 minutes ago I pushed an HTML file (of Unicode categories). Half an hour later the corresponding address on the site still gives a 404. (A green checkmark here indicates that 25 minutes ago "GitHub Pages successfully built your site." The deployment activity log agrees it was deployed.)
It turns out that the HTML file was deployed without the .html extension. Which is very strange, because markdown files on the same site (example) are deployed with an .html extension.
Why is this happening? Is there something wrong with my _config.yml?
Edit: OMFG, I uploaded a modified Unicode character table and this one requires the html extension - without .html it's 404! So now, the original file works with or without .html, but the new file requires .html. I guess GH pages is just... glitchy.
I've copied several folders inside the path content/pages. After running the pelican content command, I get the html files converted under the output folder where all the html files are copied under output/pages as a whole.
For ex:
If I have the folder structure:
content
- pages
- hello
- hello.html
- world
- world.html
I get the output as:
output
- pages
- hello.html
- world.html
I need to retain the original folder structure in the output folder.
The USE_FOLDER_AS_CATEGORY = True option didn't work. Apparently, it works only for Articles not for pages.
Is there any other way to build the folder structure?
I believe the following plugin was designed for the exact use case you described: https://github.com/akhayyat/pelican-page-hierarchy
I'm making a "this day in history" sort of site in gh-pages, using javascript to pull the day's entry for the front page and a collection to store all the other entries indexed by date.
The entries are text files.
I've made markdown files as stubs to pull in the text files. I don't want to replicate the text files if possible, because then any typos I would have to remember to fix in two places.
As far as I can see, there are two ways to include the text files in the template:
{% include date.txt %} which requires the txt files to be in the _includes directory, thus not generated into the site and not available to the javascript on the front page
{% include_relative date.txt %} which requires the txt file to be in the collection folder, which is also not generated unless it has a yaml header, in which case it would be difficult to extract the text from the generated html.
Is there another way I'm missing for jekyll to include plain text files without them having to be in special _folders?
I'm using github pages, so plugins are out.
I think there is no other way to include text files through liquid. It is part of the way it separates published files from the pieces that go together to make the files.
The way forward is to adapt the javascript to read the text from a raw blob from the github repository.
But using an http request to raw.githubusercontent.com gives a Cross Origin Resource Sharing error.
So next way is to make a new collection with a new layout to output the input files as they are.
I want to rename NOT inner folder(rhuk_milkyway оr others). But exactly folder "templates".
I think it one of the ways to protect site from regular virus attaks.
I changed:
1). folder name
2). paths in file index.php in that folder
What else must I do?
I don't think that renaming templates folder would do any good. You can still see path of template css, js and images in html source.
Lets say you rename your templates folder to secret_folder, but when viewing html source you will see /secret_folder/rhuk_milkyway/css/style.css instead of /templates/rhuk_milkyway/css/style.css.
If you're afraid of regular virus attacks - get right folder permissions, and it should do the trick.