Let's take some markdown
This `<goodtag>` is OK
This <badtag> is not.
In Typora, a mac markdown editor, this renders as:
In Macdown:
In both editors, the problem is localized, the rest of the contents after badtag appears normally.
However, in Vuepress, things don't work at all and the page is all blank except for its title.
Module Error (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):
(Emitted value instead of an instance of Error)
Errors compiling template:
tag <badtag> has no matching end tag.
1 |
2 | <ContentSlotsDistributor :slot-key="$parent.slotKey"><p>This <code><goodtag></code> is OK</p>
3 | <p>This <badtag> is not.</p>
I understand that <badtag> is going to cause a problem with Vuepress and why. But I am not writing this as an individual page, I am pushing lots of existing markdown contents into a Vuepress directory. The overall Vuepress dev build doesn't complain, this only shows as a problem when I navigate to that particular page, find it all blank and look at the JS console.
I already have a Python batch that performs transformations on the local markdown (for example, pushing local file system images into .vuepress/public with the appropriate URLs. Can I catch these errors, by having the batch call Vuepress itself to pre-validate content?
Is there any way for me to run a "node vuepress compile /foo/mymarkdown.md" at an individual page, check its return code and notify me that something needs fixing on that page?
As I wrote this I think maybe an npm run build to build the actual distribution would do the trick. Maybe. But I need to isolate it on a page by page basis, not bulk-run it on 500+ pages at a time and then pick out all the errors.
Related
I downloaded a binary via docker for the Gogs project (https://github.com/gogits/gogs), set it up (via docker pull gogs/gogs) and the server works as expected. Now I'm trying to customize the html a bit to look consistent with our company's other tools. When looking at deployed project, the assets of interest are in the following directories:
public/img/*.png
public/css/*.css
templates/*.tmpl
When I update the css, changes take effect right away, when I update tmpl, I need a container restart (implying that html is generated at server start time), when I update anything in public/img/ directory, however, I can't seem to get those assets used at all and I'm clueless about what's happening since most web servers/frameworks treat public/img/ as a static directory with all of its contents publicly visible by default.
Here is what I've tried so far and the outcomes:
Action: copied a new favicon image (my_favicon.png) into public/img/ and changed /templates/base/head.html to point to it (/img/my_favicon.png) instead of the original (/img/favicon.png), left original untouched and restarted the container.
Result: page loads with broken image icon, DOM inspector says that it's pointing to /img/my_favicon.png but doesn't show the image, going to that URL directly doesn't show the image either.
Action: change .tmpl back to point to original image (/img/favicon.png), overwrite original with the new image. I tried this with the main lg-gogs.png logo too.
Result: page loads with broken image icon just like before.
A grep search for image name revealed that only the .tmpl I modified and config.codekit are mentioning it (and I'm not at all familiar with CodeKit, but the instructions claim that it's only relevant for git, not me, and to leave the file alone, although it seems to profile names and sizes of all images - however I don't see anything else on the server reference this codekit file).
I have no idea why changes to css and tmpl work fine, but images cause this unexpected result. Does anyone have an idea of what's going on, why the server isn't accepting the images?
I recently set up my blog on abhitopia.com. The issue I am facing is that all the code I write in my blog (in markdown) cannot be copied. For instance, go to
http://abhitopia.com/machine%20learning/2016/05/22/tensor_flow_exploration.html
You will be unable to copy code. I have already tried googling this. It is definitely not a feature that comes pre configured with Jekyll. I don't understand why. :(
This is not related to how Jekyll is building your site. This is a problem with the theme that you are using (Grayscale), which gives you the impression that you cannot select text in your code blocks.
If you look at your grayscale.css file around line 409, you'll see something like this:
These two styles are removing the shadow that one sees when selecting text, which makes you think you cannot copy the text.
Remove these two styles, or modify them, so that the shadow is visible and in a color you like. Alternatively, you can use a different theme, instead of that one.
Our team has installed the Markdown Mode extension in Visual Studio on our Windows PCs, and we're happy with that as an editor for Markdown files, but we need a way to generate a wiki from those files where we can click on links that cross-link the files of the wiki. I've been trying to find something, but haven't had any success getting something running.
I tried creating an empty web application and pasting in the html file from here http://dynalon.github.io/mdwiki/#!index.md and naming it index.html, and adding a couple of md files to the same directory that I set to always copy to the build directory, but I got 404-3 errors when it tried to access the .md file.
I see a couple of tools that look possibly good but need Python or Ruby installed, which isn't ideal: http://markdoc.org/quickstart or http://helloform.com/projects/commonplace/
I see this ASP.NET control for embedding a Markdown file into a page http://wikicontrol.codeplex.com/ but the control is for VS 2010 so clearly is not being actively maintained, plus to use it I'll need to build something to take the relative links and find the related .md files and load them up in MVC - sounds like a hassle to get working, and it will require me to put MVC in my docs project.
Is there something that is just designed so that I can put an html file or similar in a directory with a root .md file and have it just immediately act like a wiki and allow navigation between them?
We have decided to use MarkdownDeep NuGet package and a single MVC controller to handle this. The MVC controller looks at the requested path, uses it to figure out the location of the Markdown file, reads that file and renders it to HTML and returns the HTML.
I recently used pelican to build a static blog. I wanted to use pelican-themes to make the blog look better so I downloaded pelican-themes and edited the pelicanconf.py file:
I added the line:
THEME = ".../pelican-themes/nmnlist"
then I did:
make html
The code runs fine and builds an html page in my output folder. However, the theme does not look like its screenshot. It does not have the two side columns, the large horizontal bar on top,...etc. Interestingly, the generated html page does change though. So, I know the theme is sort of having an effect. Why doesn't it look like the screenshot?
I tried this:
make regenerate
However, it just hangs giving me the output below. I have to cntrl^c to get out of it.
WARNING: Feeds generated without SITEURL set properly may not be valid
--- AutoReload Mode: Monitoring content, theme and settings for changes. ---
False
-> Modified: content, theme, settings. re-generating...
Done: Processed 1 article(s), 0 draft(s) and 0 page(s) in 0.18 seconds.
Any help you can give me, would be greatly appreciated. Thanks.
Here is parts of my view code (haml):
%link{rel:'stylesheet', href:'/screen.css', type:'text/css', media:'screen'}
%img{scr:'/tile.jpg'}
The ./public folder contains files
screen.css and tile.jpg
Problem is image do not appear on the page. At the same time css file successfully applies
I also tried to put tile.jpg into ./public/images but nothing changed.
Webserver - thin, sinatra app.
You might want to give the Sinatra Static Assets gem a try. I've started using it for much the same reason, it means I don't have to remember the HTML attributes quite as much (though still a bit) and it should cut down on typo errors a bit too.