Why eleventy front matter in index.md goes into index.html - eleventy

I try to go through Eleventy Guide and stuck on step "Render Your First Page".
Project structure:
package.json
.eleventy.js
index.md
_includes/page.njk
I start eleventy with npx eleventy --serve
and get build/index.html:
In browser:
What did I do wrong?

I don't know what the bug is about, but I resolved it.
If I copy/past front matter from this article:
‐‐‐
title: 11ty starter site
description: This is a demonstration website generated using the 11ty static site generator.
layout: page.njk
‐‐‐
it don't have any syntax highlighting:
But when I clear index.md front matter and write it by yourself, it looks different, it has syntax highlighting now.
I think problem is --- symbols. It looks the same, but it's no 🤯

Related

How do I use #{request.contextPath} when the context root is, well, root: "/"?

We are currently moving an EE6 / JSF application from a deployment path someserver.com/app to its own subdomain app.someserver.com.
Most things are working smoothly, but we have had unexpected troubles with how the web layer handles the now basically nonexistent context-root.
One thing we found and fixed early was that a cookie we set had its path shortened from "/app" to "", and thus was only readable per folder on the server, not for the entire application.
We have now found a similar problem with hyperlinks that we generate in JSF:
Go to home page
This was previously rendered as href="/app" and worked fine, but now with href="" the link is understandably no longer active. I want it to say href=""/".
Is there an elegant solution for that?
Keep in mind that we also have links of the form
Go to projects page
, so simply replacing the empty context path with "/" is not good enough.
Am I missing something obvious? I saw an explanation here (which matches what we experience), but no elaboration on possible solutions.
Turns out I wasn't thinking clearly. I was so focused on fixing the string that #{request.contextPath} produces, that I missed that I basically used it wrong the entire time.
The simplest solution is to just use
...
(with a trailing slash) to get to the root of the application, and never use href="#{request.contextPath}" without a slash at all.
This solves both cases. If the application is deployed to "some_folder", the link becomes "some_folder/". And if the application is deployed to the server root, then the link becomes "/".
Hope this helps someone who stumbled into the same trap.

How to debug why MS Edge/IE11 does not load sourcemap

I made some source+map concatenation and result works in Firefox and Chrome, but does not even request bundle.js.map from webserver in MS Edge and IE11.
Actual JS file is served from http://localhost:8080/bundle.js
bundle.js ends with line:
//# sourceMappingURL=bundle.js.map
Tried both end it with new line and without, does not work in both cases. Is there some checklist to look at or even some "validator"?
Microsoft Edge expects a single sourcemap comment, located at the end of the file. Your file contains two comments, which appears to cause the issue. Remove all but the final comment, and this should resolve the issue for you.
I will file a ticket to track this issue, but it's unlikely we will modify our implementation to accommodate a non-standard use of sourcemap comments. Thank you for bringing this to our attention though. We'll keep watch to see if this affects other users.

Stackoverflow-like permalinks with Jekyll

I really have taken a liking to Stackoverflow's permalinks. The way I understand them to work is as follows:
https://stackoverflow.com/questions/uniqueid/post-title-for-seo
The following gets the job done too https://stackoverflow.com/questions/15721310:
https://stackoverflow.com/questions/uniqueid
Interestingly, if you put anything after uniqueid you will get to the question
https://stackoverflow.com/questions/100001/hello-world
https://stackoverflow.com/questions/100001/hello-cruel-world
https://stackoverflow.com/questions/100001/hello-strange-world
All of the above work, this allows you to change the question's title without losing all your permalinks.
I'm using jekyll and I plan to launch on github with github-pages (which doesn't allow .htaccess). If it can be done with jekyll without github-pages (which I'm sure is much easier) then I'd be willing to deploy it to a hosted VPS. I'm open to any solution!
I would also like questions to be a specific variable in the post like post.category or post.template such as blog or portfolio.
The only close this I found in Jekill Docs is to define permalink in every post:
---
layout: share
title: CoffeeScript Spaces and Tabs
date: 2013-09-17
categories: [coffee, eclipse, nodeclipse, enide, studio, monster]
permalink: /share/coffeescript-spaces-and-tabs
---
I see no trace of post ID concept in Jekyll. I hope someone can suggest how to do that with variables or some other way.

Invalid IL code in System.ComponentModel.DataAnnotations.AssociatedMetadataTypeTypeDescriptionProvider:.ctor (System.Type): method body is empty

I am deploying an MVC3 project to a Mono linux box. I had the skeleton working pretty nice, but when I started filling in some models, views, and controllers, I got the error you see above.
There does not seem to be much documentation on this; what little I've seen suggests that it cannot find my System.ComponentModel.DataAnnotations file, but I've set the dll to copy local and added it to the _bin_deployableAssemblies folder, with no success.
It seems like I'm missing something simple. Any guesses what it is?
It seems the problem goes away if I do NOT include the System.ComponentModel.DataAnnotations.dll file when publishing.

Can't get sIFR to display

I can't get sIFR to display. It just shows the regular web text. I've went through the steps several times.
Maybe I'm just missing some tiny bit of code, but I think I've followed all the steps correctly. Just can't get it to display.
Anyone want to look and see if I'm just screwing up some mundane detail? Here is a link to my test page
Test Page
Any help would be appreciated!
You're including the config file before the main library file. Try to switch it around.
If you're in Firefox, you can look at the Error Console. Where it says.
Error: sIFR is not defined
Source File: http://www.creativewhirlwind.com/reallynewversion/sifr_test/js/sifr-config.js
Line: 25
You should also look at using FireBug.

Resources