Linking to a file that starts with a dot (`.`) in Jekyll - html

In an index.html for my Jekyll site, I try to link to each of these files.
foo.yml
.esliintrc
These files definitely exist under that path, but the 2nd link doesn't seem to work - it returns a 404.
Is there a special way to link to a file starting with a dot . ?

Turns out that files starting in dot are not automatically supported
See this issue thread.
The fix was adding my file to the include: list in _config.yml
include:
- .eslintrc

Related

Link in jekyll menu lead to "404 page not found" erros

I'm new to using jekyll and I think I'm missing something but I can't figure out what.
I built a jekyll page which I compile using
bundle exec jekyll build
then I uploaded the contents of the _site folder to the public_html/ folder of my webhoster (name.com).
All menu links, lead to 404 error pages: The menu links generated in the html files point to things like "https://myurl.com/people" while the actual file is called "people.html" so that is why I'm getting a 404. The way I see it, I either need jekyll to generate menu links that include the ".html" file extension, or somehow get my webhoster to serve "people.html" when "people" is requested.
Chris
To alter the link structure for all of your files, use permalink (with proper formatting) in your config file. For example:
# _config.yml
# same as `permalink: none`
# note that its ':output_ext' instead of '.html'
permalink: /:categories/:title:output_ext
Source: Official Docs

GitHub Pages (github.io) doxygen generated page not found (404)

I don't understand why a page generated by doxygen can't be found (404).
Its path in the Github repository is https://github.com/AubinMahe/AubinMahe.github.io/blob/master/doxygen/html/dd/dfb/_shareable_8h.html Click here to see
The same page browsed from the root of dcrud documentation site is http://aubinmahe.github.io/doxygen/html/dd/dfb/_shareable_8h.html Click here to see
The same path but... 404! Why? Why this page and not the others?
I've found an answer...
Files that start with an underscore are missing
By default, Jekyll does not build any files or directories that
are hidden or used for backup
(indicated by names that start with . or #, or that end with ~);
contain site content (indicated by names that start with _); or
are excluded in the site configuration.
To work around this behavior, you can
include a .nojekyll file in the root path to turn off Jekyll;
use the include directive in your _config.yml to specify files that
should not be ignored; or
do not use file or directory names that start with an underscore (_),
period (.), or hash symbol (#), or that end with a tilde (~).

Configure generating path with Jekyll

If there are files called members/alice.md and members/bob.md, the Jekyll generated position will be members/alice.html and members/bob.html. How can I set them to be members/alice/index.html and members/bob/index.html?
You can do this with Permalinks.
Here are 2 approaches that may suit you:
1. Per-page YAML frontmatter
If you just want specific pages to have that behavior, just add a permalink: option in your YAML frontmatter for your Markdown post.
For example: In members/alice.md's YAML frontmatter add:
---
permalink: members/alice/
---
2. Edit the _config.yml file
As per the documentation I've linked above, the simplest way (which I recommend) way to achieve this is with Jekyll's built-in pretty option.
Add this in your _config.yml:
permalink: pretty
This removes the .html from the static output by making all posts have their own folder and named as index.html.
Your browser would then display this as yoursite.com/members/alice/, note that the index.html is hidden, a behavior on most browsers. If you head on over to peek at the output _site folder, you'll see a folder in members named alice, and a file index.html inside.
Also note that:
You need to restart the Jekyll server every time you make a change in _config.yml, unlike other files that the Jekyll server will detect changes and regenerate, this configuration file will not and the WEBrick server must be restarted for changes to take effect. :)
You could also refer to the documentation on other more customizable options as well. Here's also a tutorial for reference too.

Source map is absolute path but Chrome DevTool assumes it's a URL

I am using LESS compiler via a gulp-less in my gulpjs build. I have enabled sourceMap generation, and it kind of works, the proper file names and line numbers are there.
The gulp line that generates LESS with source maps is very straight-forward:
var less = require('gulp-less');
// [...]
gulp.src('web/css/**/*.less')
.pipe(less({
sourceMap: true
}))
.pipe(gulp.dest('dist/css'));
The only problem is that the source map contains a URL to the original .less file and it is generated as an absolute path to my file system, e.g. /Users/myuser/projects/project/web/css/myfile.less.
During development, I serve the site via Apache. When I open the site with Chrome DevTools, I can inspect elements, and the source map is working because I can see the myfile.less including correct line numbers on the Styles panel. However, Chrome is trying to load the less file, and it is using the full path is the sourcemap output but assuming it's a relative url to my site, so it tries to load http://localhost/Users/myuser/projects/project/web/css/myfile.less which doesn't exists.
I tried using workspaces to fix it, but didn't really manage. Is there something wrong in this setup? Am I missing something?
I think you're missing these final steps:
Create a workspace for your site. Point Chrome to your site's root directory on your system.
Right-click on a source-mapped less file in the Sources panel, then select 'Map to File System Resource...'. Select the less source file on filesystem.
Reload the dev tools (you'll get a prompt) and you should be good. Now, when you click on the foo.less:45 in the Styles panel, you should be brought to that spot in foo.less. Now that you've setup the workspace, if you save your changes in the dev tools, it will persist to the source less file. Nice!
Note there's a pretty big bug with Chrome which you'll probably notice right away. When you go to add style rules via the dev tools, the source mapping gets busted:
https://github.com/less/less.js/issues/1050#issuecomment-26195595
Let me know if this helps. I can post screenshots later, too, if needed.
Try to use sourceMapRootpath instead of sourceMapBasepath
gulp.src('web/css/**/*.less')
.pipe(less({
sourceMap: true
sourceMapRootpath: './my_less_path'
}))
For me this solution works in part because the files I'm importing inside another less files (eg. bower_components / .. / grid.less) still come with the absolute path.
Still could not find a solution for this.
If anyone can help would be great ... :)
To answer my own question, the proper way to do this is to use gulp-sourcemaps in the gulp pipe instead of passing properties to the LESS plugin. So, the following syntax works for me:
gulp.src('web/css/**/*.less')
.pipe(sourcemaps.init())
.pipe(less())
.pipe(sourcemaps.write())
.pipe(gulp.dest('dist/css'));
i was having a similar issue with typescript source maps -- the path in the maps would be generated as '../src/file.ts' where src was on the same level as output dir.
dir
|- src/*.ts
|- output/*.js
my webserver runs straight on output, so chrome was trying to download an inexisting source file from http://localhost/src/file.ts
my solution was to create a symlink 'src' inside the output folder and it is now happy. not a real 'fix' but solves the problem.
Trying the following:
gulp.src('web/css/**/*.less')
.pipe(less({
sourceMap: true
sourceMapBasepath: './my_less_path'
}))

Build directory .js files missing, css link broken, jpegs not processing - common issue?

I'm running HTML5 Boilerplate 3.0 and the latest ant build script. I'm on Windows 7.
After a few issues, the .bat file now executes and everything runs. Upon completion though the script directory is my publish folder is empty, though I have the following .js files in my intermediate directory:
js/scripts-concant.min.js
js/scipt.js
js/plugins.js
js/libs/jquery-1.7.1.js
js/lib/modernizr-2.5.3.min.js
In a possibly related issue, my .css file is minified and renamed and links beautifully from index.html but the rest of the files continue to try to link to style.css
In a maybe possibly related issue, I get a can't open for writing error on every single jpeg that it tries to open. They're copied across fine though, so I just wanted to include this for completion.
I've Googled to no avail and can't seem to find a common reason this would happen. I'd really appreciate any pointers, I don't mind fixing things myself, I just can't find a common thread here.
Many thanks.
For the css issue I was having this issue because I had to include all index files by putting specifying *.html in config/project.properties file.
# Web Pages
#
# These are the pages (files) that will be served to users (.html, .php, .asp, etc).
Files in this property will
# be minified / optimised and have any stylesheet or javascript references updated to
the minified examples
#
# The paths need to be relative
#
# Files can be added in a comma separated form
file.pages = *.html
Don't know about the other issues