No trailing slash in sitemap links after using docpad generate --env static - docpad

I'm using docpad-plugin-sitemap#2.2.0 and docpad-plugin-cleanurls#2.6.2.
After docpad generate --env static, the links in sitemap.xml hasn't got a trailing slash:
<loc>http://www.example.org/contact</loc>
This cause a 301 redirect to
http://www.example.org/contact/
Is this a configuration issue or does docpad-plugin-sitemap need a "static" block?

Looked up the wrong documentation at docpad-plugin-sitemap. The correct one for trailingSlashes is docpad-plugin-cleanurls.

Related

I've got an issue with using 'visit'

When my Cypress tests are run on Github (headless).
When I call visit('/page') - get a 404 error. The page definitely exists.
CypressError: 'cy.visit()' failed trying to load:
http://localhost:4200/page
I can run the same tests locally (headless and headed) and they work fine.
Anyone have any ideas why this could be?
I should add that this is an Angular Application and there are no 404's because all routes are handled with wildcard. I know this page exists and happens if i try to visit another page that exists.
Version:
"cypress": "^10.6.0",
This is the .yml file. The baseUrl is set to 'http://localhost:4200' in the 'integration.config.ts' file.
So found the answer.
We are serving the Angular application with 'http-server'. It was only recognising the route '/' and was returning a 404 for any other app routes / pages.
We fixed this by adding --proxy http://localhost:4200? to the http-server command.

Vuepress - Netlify CMS - Error loading the CMS configuration

I'm make a Vuepress Blog and I would add to Netlify CMS in the backend.
The steps to implement Netlify CMS into Vuepress:
Create this path /blog/.vuepress/public/admin
Create a index.html into the path with this code:
In the same path create the config.yml:
backend:
name: github
branch: master
repo: githubusername/reponame
publish_mode: editorial_workflow
media_folder: ".vuepress/public/assets/img"
public_folder: "img"
collections:
name: "blog" # Used in routes, e.g., /admin/collections/blog
label: "Blog" # Used in the UI
folder: "blog/_posts"
Here official documentation.
Also the message is the same:
Error loading the CMS configuration<br>
Config Errors:<br>
config must have required property 'media_folder'<br>
config must have required property 'media_library'<br>
config must match a schema in anyOf<br>
config must have required property 'collections'<br>
Check your config.yml file.<br>
I'm not sure what is the problem because the file exist in /admin and the media_folder parameter is defined.
I'm read the Netlify CMS documentation and tutorials and I have linked the Github by Netlify connector.
Please Could you help me?
Thanks!
Have you indented the config.yml file properly? You could edit your question using a code block to we see clearly how your configuration is doing.
Note that publish_mode, media_folder and public_folder should not be indented.
Additionally, reading the documentation I think public_folder must begin with a slash.

Can PhpStorm debug a file that has been redirected to using Nginx's X-Accel-Redirect?

I'm using Nginx's X-Accel-Redirect to serve a file (redirected.php) that is outside of the webroot. The webroot is /usr/share/nginx/html and the file I am wanting to debug is being served from /usr/share/nginx/downloads
I begin Xdebug in the browser (debugging works at this stage). At some point the browser makes a request for website1.com/learning/downloads/url,
Nginx redirects the request to redirected.php using the below rule
# Enable X-Accel-Redirect
location /learning/downloads/ {
root /usr/share/nginx/downloads;
rewrite ^/(.*)$ /redirected.php last;
}
Unfortunately, I can't get redirected.php to pause on any breakpoints.
Is it not possible to debug when using X-Accel-Redirect with PhpStorm? or is it more likely to be a mapping issue? Suggestions on how to overcome this issue would be much appreciated.
It was a mapping issue. Part of the problem was due to redirected.php being in a folder outside the webroot.
To fix it, I went to File -> Settings -> Languages & Frameworks -> PHP -> Servers and configured it as in the picture below.
I also added xdebug_break(); to the code in redirected.php

Why does FineUploader's template/default.html look for files in the client folder?

Why does FineUploader's template/default.html look for files in the client folder? When you follow the set up instructions on their website you are left with something that looks like this:
root#UbuntuVM:/usr/local/nginx/html/example.com/wwwroot# ls
0.0.0.0 fine-uploader-gallery.css placeholders
all.fine-uploader.js fine-uploader-gallery.min.css processing.gif
all.fine-uploader.min.js fine-uploader.min.css retry.gif
composer.json fine-uploader-new.css template.html
composer.lock fine-uploader-new.min.css templates
composer.phar iframe.xss.response.js trash.gif
continue.gif LICENSE vendor
edit.gif loading.gif
fine-uploader.css pause.gif
And in the template folder there is a default.html file that looks for client/fine-uploader.js. I followed the instructions - why is the default template not working?
The Fine Uploader HTML templates serve as a starting point for your web app. It is expected that you make appropriate adjustments based on the location of your resources and your desired look and feel.

apache returns 404 even after mod_rewrite

I am using apache mod_rewrite for the first time.
I want http://example.com/anything/after/this to be transformed as http://example.com/storage-server/index.php?id=/anything/after/this
I have written following lines to apache's httpd.conf file
RewriteRule ^/(.*) /storage-server/index.php?id=$1
But I am getting 404 message saying that this file doesn't exist. I have enabled the mod_rewrite so that is not issue. I think something is preventing this URL to be rewritten....
any idea???
UPDATE::
All things are solved. All above mentioned settings should be entered into /etc/apache2/sites-enables/000-default file..
SOLVED
UPDATE:::
I have just tried extremely simple rewrite rule. I have created test1.html and test2.html files in my web server root. Then i wrote following rule in my httpd.conf file
RewriteRule ^test1\.html$ test2.html
When i visit test1.html the browser still shows test1.html file instead of test2.html/ Please help.. I am having this trouble since last 3 days... sick of it ..:-(
You write that you want it to redirect to http://example.com/index.php?id=/anything/after/this but you're redirecting to http://example.com/storage-server/index.php?id=/anything/after/this. Could that be it?
ensure that the following line in your Apache's httpd.conf is not commented out
LoadModule rewrite_module modules/mod_rewrite.so

Resources