Menu icon Foundation

Coder

My Posts

  • 4
    Replies
  • How to add robots.txt file

    By Matthew Wall

    robots.txt

    I searched the forum and I'm surprised I'm the first to ask this. Does anyone have an idea about how to get a robots.txt file to compile in foundation 6.2? I've tried adding it to the root folder and also inside the pages folder, both are ignored when us... (continued)

    Last Reply by Rafi Benkual over 3 years ago


My Comments

Matthew Wall commented on Will's post over 3 years

I may have had this problem too, it looks really familiar, I had to run:
$npm install -g gulp
I believed that solved the problem, normally gulp should install with node.js but sometimes it fails I guess. Try that.

Matthew Wall commented on Trevor Lavigne's post over 3 years

I'm not sure what you would use it for but try this:
.reveal-overlay {
@include breakpoint(medium) {
overflow-y: hidden !important;
}
}
body.is-reveal-open {
@include breakpoint(medium) {
overflow-y: visible !important;
}
}
This is actually the CSS I had to use to get reveal to not shift content to the right when opening a modal. The main downside it has for me is that it adds the scroll bar and allows you to scroll the content behind the modal, which is actually what you are looking for.

Matthew Wall commented on Matthew Wall's post over 3 years

 Thanks Rafi, you replied just as I was writing up my response! I will try your way as I'm sure that's better than the way I came up with.

Matthew Wall commented on Matthew Wall's post over 3 years

I may have solved this, I'm not sure if it's the right way to do it though, but it seems to work.
In gulpfile.babel.js I changed some code:
gulp.task('build',
gulp.series(clean, gulp.parallel(pages, sass, javascript, images, copy, robots), styleGuide));
I added robots after copy.
Then I added a new function right below the copy function:
function robots () {
return gulp.src('robots.txt')
.pipe(gulp.dest(PATHS.dist));
}
This goes into your root folder and copys robots.txt into the dist folder upon running foundation build.
I tried to add the function into copy so I didn't need to add anything to the series but couldn't figure it out. I assume the way I've done it is not the most ideal way.
If you're google searching for this problem, you don't want to search anything to do with foundation, you want to search help with gulp commands such as copy or dest. That is the reason I couldn't find anything on this.

Matthew Wall commented on Alex Humphries's post over 3 years

It is loading correctly for me. Perhaps it's a cache issue? I tested on Firefox and Chrome and I can see the signup form no problem with the submit button. I tested on a few resolutions as well.

Matthew Wall commented on Jonas's post over 3 years

Has anyone successfully used this to redirect a page yet?
.htaccess has been copied the root dist folder correctly and I have a single line:
Redirect 301 /google.html http://www.google.com
 
google.html shows Cannot GET /google.html
 
Doesn't seem to work!

Matthew Wall commented on Scott Koons's post over 3 years

I'm building a website with our UX/UI designer. We really have no idea what we're doing, but here's the site about 50% done: https://www.safetysync.com/ We already realized how we built it wrong because we didn't do the mobile first option.

Posts Followed






Following

    No Content

Followers

My Posts


My Comments

You commented on Will's post over 3 years

I may have had this problem too, it looks really familiar, I had to run:
$npm install -g gulp
I believed that solved the problem, normally gulp should install with node.js but sometimes it fails I guess. Try that.

You commented on Trevor Lavigne's post over 3 years

I'm not sure what you would use it for but try this:
.reveal-overlay {
@include breakpoint(medium) {
overflow-y: hidden !important;
}
}
body.is-reveal-open {
@include breakpoint(medium) {
overflow-y: visible !important;
}
}
This is actually the CSS I had to use to get reveal to not shift content to the right when opening a modal. The main downside it has for me is that it adds the scroll bar and allows you to scroll the content behind the modal, which is actually what you are looking for.

You commented on Matthew Wall's post over 3 years

 Thanks Rafi, you replied just as I was writing up my response! I will try your way as I'm sure that's better than the way I came up with.

You commented on Matthew Wall's post over 3 years

I may have solved this, I'm not sure if it's the right way to do it though, but it seems to work.
In gulpfile.babel.js I changed some code:
gulp.task('build',
gulp.series(clean, gulp.parallel(pages, sass, javascript, images, copy, robots), styleGuide));
I added robots after copy.
Then I added a new function right below the copy function:
function robots () {
return gulp.src('robots.txt')
.pipe(gulp.dest(PATHS.dist));
}
This goes into your root folder and copys robots.txt into the dist folder upon running foundation build.
I tried to add the function into copy so I didn't need to add anything to the series but couldn't figure it out. I assume the way I've done it is not the most ideal way.
If you're google searching for this problem, you don't want to search anything to do with foundation, you want to search help with gulp commands such as copy or dest. That is the reason I couldn't find anything on this.

You commented on Alex Humphries's post over 3 years

It is loading correctly for me. Perhaps it's a cache issue? I tested on Firefox and Chrome and I can see the signup form no problem with the submit button. I tested on a few resolutions as well.

You commented on Jonas's post over 3 years

Has anyone successfully used this to redirect a page yet?
.htaccess has been copied the root dist folder correctly and I have a single line:
Redirect 301 /google.html http://www.google.com
 
google.html shows Cannot GET /google.html
 
Doesn't seem to work!

You commented on Scott Koons's post over 3 years

I'm building a website with our UX/UI designer. We really have no idea what we're doing, but here's the site about 50% done: https://www.safetysync.com/ We already realized how we built it wrong because we didn't do the mobile first option.

Posts Followed



Following

  • No Content

Followers

  • No Content