href to PDF stored on GitHub repository - html

I'm building a personal page with GitHub Pages and I would like to have a link that displays some PDF files on browser.
The PDF files are on a private repository with the following structure:
PDF-Repository
|__ Folder1
| |__ file11.notpdf
| |__ file12.pdf
|__ Folder2
| |__ file21.notpdf
| |__ file22.pdf
I couldn't use href to link to the repository files directly because it's private.
Neither I can copy the PDF files on the GH Pages repository manually since the PDF-Repository (and PDF files therein) gets updated regularly.
Is there a way I can include those files on the GH Pages repository so that , every time the PDF-Repository gets updated, there is an updated version on the GH Pages repository?

Related

Is there a way to change the path of multiple references in css/html at the same time? Problem with deployment due to no index.html in root

My website files structure is as follows: a folder for pictures, and a folder containing all my html/css files.
Now that I am trying to deploy my website for the first time (I'm using FireBase), it seems that I need an index.html in my public folder's root.
However, all my html/css files are in a folder, and my pictures in another. In order to pull out my home page and rename it to index.html, I would have to change the path & name of all the files that reference it as well (which is every file). Is there any way I can avoid this?
Thanks.
(My IDE is VSCode)
All content needs to be under a single folder, which is the one you then indicate in the public option in the firebase.json configuration file.
It is totally fine to have the HTML/CSS in one subfolder under there, and the images in another subfolder. But the entire public folder will be deployed, so you'll want to make sure you have no other files in there.
So this is fine:
public
html_and_css
index.html
main.css
images
image1.jpg
image2.jpg
image3.jpg
But here you can't just deploy all of src, as that would also deploy the code subfolder that contains secrete:
src
code
secrets_that_should_not_be_published
public
index.html
main.css
images
image1.jpg
image2.jpg
image3.jpg
If you have this last structure, you can tell Firebase to not deploy the code directory by specifying it in the ignore option in the firebase.json configuration file.

How can I "watch" multiple source directories in Jekyll?

I'm pretty sure I've seen in Jekyll blog projects with multiple source document directories, such as _posts and _pages, but the source parameter in the _config.yml file can only take 1 directory as its argument, and neither an array nor a space separated string of directories works.
Am I misunderstanding the meaning of the source parameter? I'm expecting it to be used by watch to specify which files' changes will trigger a build, and which files to build.
Also, I have fragments such as about.md which can be included in other pages. What is the best location for files like this one?
The source configuration refers to your <project_root>, not individual directories within the project root. By default, its set to your current_directory (the location from where you are running jekyll build (or) serve.
Jekyll watches all nested files and directories deep within the source directory by default.
about.md is not meant to be seen as a fragment to be included in other files. Its a full-blown "page" that would render into _site/about.html or _site/about/index.html depending on your permalink settings.
Fragments to be included in other pages live inside the _includes directory and are inserted via the Liquid construct {% include <fragment-filename>.html %}
Other than _layouts, _includes and _sass, directories that start with an underscore are ignored by Jekyll unless you configure Jekyll to see them as "collections". _posts is a pre-defined and hard-coded collection directory.
For more information on Jekyll, refer the official documentation at https://jekyllrb.com
If anyone, like me, is looking to include several source folders in github-pages, you can simply configure the jekyll root in github-page on the master branch. I.e. not on gh-page branch, nor on the docs folder.
Thus, all folder is processed. README.md are treated as index.md and you can easily make relative links from the main README.md at the root to any other doc which are "below" it in the file hierarchy. Thus having jekyll cover all your code documentation.

Jekyll -- create another folder with similar functionality of _posts

I have a _posts folder that contains all my posts for my blog and projects. I'd like to separate the markdown files for my blog notes and project pages. For example, in addition to the built-in md -> HTML conversion for files in _posts, I'd like to have a _projects folder that contain my markdown files for individual project write-ups and build them into HTML when running jekyll serve.
just define a collections key in your _config.yml:
collections:
projects:
output: true
Official docs for more info..
Looks like you want to use categories. Here is a link discussing a similar problem : Multiple _posts directories
By default Jekyll will ignore new folders with an underscore prefix, so you can't use _projects.
You can separate _posts in several folders, to have all your project files in a specific folder, create projects/_posts folder structure and move your project files inside projects/_posts, leaving blog posts in _posts.
Jekyll will generate each post and automatically assign the project category to them, so you can also generate different lists from your blog posts.

Jekyll: Using multiple .md files per directory and have them available as files, not sub-directories?

I am looking for a way to have multiple markdown files (.md) in a directory and have them available as files (not sub-directories).
Example:
├── about/
| └── index.md
| └── history.md
| └── vision.md
I want these to become urls like this (treated as files (no trailing slash))
base.url/about/
base.url/about/history
base.url/about/vision
instead of (directories (trailing slash)):
base.url/about/
base.url/about/history/
base.url/about/vision/
How can I achieve that?
You can do this with Jekyll 3.x using permalinks in your files front matter. But, if you want to use this with Jekyll 2.4+ and Github pages, it seems that there is a problem.
Permalinks with trailing slash are the way to go for now.

Jekyll not generating files from deeply nested folder

I am trying to generate a site that contains javadoc.
The structure looks like this:
|
|--com
| |--myproduct
| |--mypackage
| |--notgenerated.html
|--index.html
In the _site folder I get only
|
|--index.html
When I add a dummy file in the com directory
|
|--com
| |--myproduct
| | |--mypackage
| | |--notgenerated.html
| |--generated.html
|--index.html
The _site folder now looks like this
|
|--com
| |--generated.html
|--index.html
How can I get Jekyll to copy these deeply nested files to the _site directory without having to place dummy files in the intermediate directories?
I am using Ruby 1.9.1 with Jekyll 0.11.2 on Win7-x64.
The kind souls at Github support found the cause.
It turns out that I had a mistake in _config.yml.
I used
exclude: dir1, dir2, file1
instead of
exclude: [dir1, dir2, file1]
And this caused the site generation to fail. Silently.