Comments (11)
Not sure if that is what @zenorocha intended as well but am looking for a way to prevent the redirect and render the actual contents within the index.html pages ...
from docpad-plugin-cleanurls.
@thesec not sure what you're use case is, but the reason why this isn't done, is that it would destroy SEO though, as you would have a bunch of files with the same content...
from docpad-plugin-cleanurls.
I think what @zenorocha was after is the ability to not create these files at all. @zenorocha can you pease elaborate?
from docpad-plugin-cleanurls.
Without knowing the use case that is a very flat answer, especially adding in such a wide field such as SEO ...
That said, the use case is that I am adding prefixes to the docs that are used to determine their navigation order but that I do not want to show up in URLs and am not linking to (for SEO reasons if you will ...).
from docpad-plugin-cleanurls.
On a layout basis, allow cleanurls: false
?
from docpad-plugin-cleanurls.
This is now possible with v2.7.0. Set the following in your docpad configuration file:
environments:
static:
plugins:
cleanurls:
static: false
If you'd like to turn off clean urls completely (not just the redirect files) for the static env, use this:
environments:
static:
plugins:
cleanurls:
enabled: false
Happy to re-open if still an issue.
from docpad-plugin-cleanurls.
@RobLoach cleanurls: false
meta-data is a great idea as well. Let's add that. I'll create an issue now.
from docpad-plugin-cleanurls.
@balupton
I'm currently using DocPad with cleanurls plugin to generate a static website with SEO friendly, semantic urls such as parent/child
(achieved by the file: parent/child/index.html
).
However I have no need for the parent/child.html
redirect file that is created by cleanurls at: parent/child.html
and I don't want to resort to manually deleting the file each time..
is there a config option:
plugins:
cleanurls:
redirectFile: false
Which will generate to parent/child/index.html
but not create the parent/child.html
file?
As I understand it that is what this issue is about however the proposed solution:
environments:
static:
plugins:
cleanurls:
static: false
Seems to remove the cleanurls functionality completely?
from docpad-plugin-cleanurls.
@balupton
I'm experiencing the same issues as @iSpyCreativity and probably also @zenorocha initially.
I want to use DocPad only to generate static files, not to act as a server and perform redirects. Therefore i'm using static: true
or else cleanurls won't change anything.
I'm using datefromfilename, dateurls and cleanurls to generate blog posts from src/render/posts/2014-11-16-foo-bar.html.md
to out/2014/03/foo-bar/index.html
This works great so far but docpad and/or cleanurls also write all those redirect files, which are never used/linked and imho not needed in this usecase.
out/posts/2014-11-16-foo-bar/index.html
out/posts/foo-bar/index.html
out/posts/foo-bar.html
I created a fork of cleanurls, introducing a new plugin option staticRedirectFile
, which is true by default and only affects when static
is also true. When set to false, all those redirection files will not be written or removed.
https://github.com/simbo/docpad-plugin-cleanurls/tree/no-redirection-files
from docpad-plugin-cleanurls.
I'm no longer interested in programming, someone else will need to take this.
from docpad-plugin-cleanurls.
Ok...
Maybe you can reopen the issue so others take notice. Thanks.
from docpad-plugin-cleanurls.
Related Issues (11)
- Not compatible with docpad-plugin-paged HOT 6
- TypeError: Object -3 has no method 'bind' HOT 1
- getURL support
- Publish new release HOT 1
- Add `cleanurls: false` possibility via document metadata for disabling cleanurls
- For the static environment output redirect documents HOT 1
- Support for trailing slash (or not) 301 redirection
- Remove numerics from file name in the URL
- Generate custom url output within coffee configuration
- hard-coded static env name HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docpad-plugin-cleanurls.