Load pages in Brunch.io without .html extension - brunch

I'm trying Brunch out for a small static site. As far as I can tell, Brunch is unable to recognize navigating to pages without the extension. So my navigation links all have .html appending them.
This is not the experience I want when deploying. I would like my pages to read as example.com/test and not example.com/test.html.
What can be done to allow Brunch to recognize my page without the extension?

You can either have app/assets/%page_name%/index.html structure or install Brunch from master and have app/assets/%page_name%.html convention + use a plugin that does renaming (I created named-folder for this, if you are ok with --harmony, it will do).
More info on static website here.
If you are using GitHub pages, please see this answer.

Related

How do I deploy a GWT website without Google App Engine? Is it possible to use GitHub Pages?

The Issue
Hi, I made a GWT (Google Web Toolkit) website, but now that I am done, I'm not sure how to host the website.
The code is only client-side, so I'm not sure where the problem is.
I would be grateful for any advice on where and how to host a GWT website.
Here's the GWT app on GitHub: https://github.com/aryanka15/GWTCledgeTextParser
My attempt to use GitHub Pages: https://github.com/aryanka15/aryanka15.github.io
What I tried:
I tried using GitHub Pages, but it doesn't work, for some reason the JS file is not recognized by browsers or something like that.
The build Java with Ant Github Action doesn't work either.
I also tried using Google App Engine, but it is a very complicated process that I couldn't get working, and I would like to avoid it if possible.
Also, I used VSCode to develop the application, if that helps. I think that many of the Google App Engine plugins for IDE's like Eclipse are deprecated, but let me know if I'm wrong.
Thank you!
Nvm, I wasn't being very smart. I just had to change the html to index.html, make necessary adjustments in the js files, and added all the files inside war to GitHub with the same file structure.

How to build a blog using next.js?

I'm new to web development, recently I want to build my own blog. I use Next.js to host my pages, I have already got the skeleton done, but there are still some significant problems.
How to render pages from markdown file? I just don't know how others do this. Do I have to use fs in the 'server.js' file and respond to certain request by md file? Or there are other ways?
If step 1 was completed, I wonder if I have <img> tags in my markdown file which refer to some local pictures, how can I render those?
To answer 1. You can use the npm package markdown-to-jsx .
But I strongly recommend using Docusorous or GatsbyJS for this purpose. Both have your requirement inbuilt.
Secondly, for Images - You can always include them in Markdown and they will be converted to JSX using markdown-to-jsx .

Minify resource files with IIS, when using Java and .JSP

I was recommended that I move this question from StackOverflow to here.
I am running a web site on a server with Tomcat and IIS. I use .JSP and Java in the back end.
I don't know how to configure IIS to automatically minify resource files (CSS, JavaScript, images) when using .JSP. I have found a few suggested solutions online, but they all apply to IIS and .ASP.
I added the "compression" tag to this post because there is no "minification" tag available, but I am not referring to gzip compression, but removing white spaces, merging resources for faster download etc.
Could anyone help me figure out how to configure IIS to minify resource files with .JSP? Thank you!
Minification a process which combines multiple CSS or JS files to a single file and perform process of compression(whitespace removal) and obfuscation(JS) is an ideal build time solution, rather than a run time solution. While using Tomcat with IIS, it will be good to have some thing like this:
Use WRO4J as a maven build time plugin. Create an attribute like
devmode=true or false. In JSP's have if else condition to define
groups to add multiple CSS/JS or Single based on the devmode value.
While deploying use devmode = false. This with maven configuration will compile JSP with single CSS/JS files.
In IIS, configure a separate VD and map your static resources of war to it. Write a rewrite rule to instruct IIS to serve the static resources. Enable static compression.
The above said configuration will take less load on the CPU.
Some links of interest could be:
https://code.google.com/p/wro4j/wiki/MavenPlugin
Unobtrusive way to combine and compress javascript/css for java/spring/maven applications?

Reveal.js server - serve many presentations

I'm using markdown and reveal.js to create presentations, and want to start using node.js to serve them from my website.
I've read the docs for reveal.js and it seems like it's easy to do for one presentation, but trickier for several. For example, I'd like
http://mysite/presentations/rabbits
and
http://mysite/presentations/deer
to run on the same instance of node, but each point to a different presetation. Is this possible natively (or with existing plugins), or will I have to hack something together myself?
I know, just three years late. But in case anyone might end up here to look for an answer, there's a working recipe over here: https://web.archive.org/web/20151223044405/https://medium.com/#KienanKB/serving-multiple-reveal-js-presentations-b1a5c086e959 (archived link to the now removed article).
Note: Reveal.js changed the part defining what files it watches:
html: {
 files: [ ‘index.html’ ]
}
Instead of ‘index.html’ it now reads ‘*.html’. 
The recipe still works fine though.
As long as you're using basic features you don't need node.js at all - just drop the reveal.js distribution in every presentation folder where it is served statically.
Another option is hosting on github pages, I've checked it now for this scenario and it seems to be served right.
You might also want to raise this issue at the project page https://github.com/hakimel/reveal.js/issues

scala/lift jetty IntelliJ Idea: imported javascript files not showing changes in served page

I have never asked a forum question before so if I'm breaking a rule its unintentional and I'm sorry.
I have a webapp that I am making using scala/lift and jetty in the IntelliJ Idea IDE. I have a javascript debug webapp that I designed for .net frame work although all I used the .net server for was to serve it because it runs strictly in in html and javascript. I want to use my debug tool for pages that are served by the lift/scala/jetty server and I am currently porting it so that it will work on the new server. The problem that I am having is that the html pages in my debug tool import external javascript files like so:
<script type = "text/javascript" src = "jsFile.js"></script>
now this seemed to work at first but when I made changes to the src javascript file they were not happening in the page that was served by lift. I verified this by following the link in the view page source page from the browser and it showed the version of the file before I added it into the project. If I change the name of the file in the file system the IDE recognizes right away that it can't resolve the path to jsFile.js. I have tried serving the pages through the site map as well as dumping my project in the /static directory. I have restarted, browser,ide, server, os. I have rebuilt the project, remade the module and have done a synchronize. I have created a new project from scatch and ran into the same problem. I believe that if I where to dynamically use lift to insert my javascript with JsRaw it would fix the problem but I still want to know why this isn't working in case its something that I'm doing wrong that will rear up bite me again someday. Any thoughts would be greatly appreciated.
In your template, try to enclose your tags with the lift tag with-resource-id
like
<lift:with-resource-id>
<script type = "text/javascript" src = "jsFile.js"></script>
</lift:with-resource-id>
If this does not solve the problem, are you using SBT to build your lift app? If this is the case, you can have one terminal running
~prepare-webapp
which basically watches for changes on scala files as well as html/css/js files and updates the running jetty (which has to be started by sbt as well running:
jetty-run

Resources