How to maintain the page folder structure in pelican? - python-2.7

I've copied several folders inside the path content/pages. After running the pelican content command, I get the html files converted under the output folder where all the html files are copied under output/pages as a whole.
For ex:
If I have the folder structure:
content
- pages
- hello
- hello.html
- world
- world.html
I get the output as:
output
- pages
- hello.html
- world.html
I need to retain the original folder structure in the output folder.
The USE_FOLDER_AS_CATEGORY = True option didn't work. Apparently, it works only for Articles not for pages.
Is there any other way to build the folder structure?

I believe the following plugin was designed for the exact use case you described: https://github.com/akhayyat/pelican-page-hierarchy

Related

filesyncprovider creates folders for documents with same name as document

I am building a sync app with a customprovider and a filesyncprovider. I based my provider on this example:
https://code.msdn.microsoft.com/File-Sync-with-Simple-c497bf87
Now I want to extend to a hierarchical folderstructure. So in the EnumerateItems method of the custom syncprovider I return all files and folders just like I did before with only the files in the directory. Now on the filesyncprovider side, this results in a creation of folders with the name of the file and the file being placed in this folder. E.g.
Folder1\textfile.txt\textfile.txt
I have no idea, what I am doing wrong and I find it hard to know the part of the MS filesyncprovider where I could debug to see, what's happening.
My question is, what am I doing wrong and how can I correct it, so that the correct output would be
Folder1\textfile.txt?
Best regards,
Tobias
// Must return the relative path without the filename
public string RelativeDirectoryPath
{
get
{
return _relativeFilePath;
}
Read first - then ask: I returned the path to the file instead of the path to the folder... comment above even warns not to do that...

What kind of files I can use in GitHub Pages?

I put yaml file on GitHub Pages, but I don't find that yaml file. I'll change file's extension (to txt), and I want to know what kind of files I can use? Any white list or document exist?
This is my trial and errors.
OK
txt - http://tachikoma.io/i18n-step.txt
html - http://tachikoma.io/index.html
js - http://tachikoma.io/js/init.js
css - http://tachikoma.io/css/prism.css
json - http://tachikoma.io/locales/en/translation.json
NG(404)
yml - http://tachikoma.io/example/bundler/.tachikoma.yml
pot - http://tachikoma.io/_build/translation.pot
repository: https://github.com/tachikomaio/maguro.tachikoma.io
Edited: 2014-11-12
GitHub pages does not show a file which name starts with period e.g. .example.yml.
This is due to the fact that GH pages tries to manage your site as a Jekyll site. Then ignoring some file name patterns.
If you want all your files to be copied just add an empty file named .nojekyll at the root of your site.

7z exclude top level few folders

I would like to compress the folder having the following structure using 7zip or.. using any other zip archive utility available for windows that can use the command line argument in windows and achieve what I want to accomplish.. Here is my folder structure:
/images
/cache
/skin/common/images
/skin/skin1/images
/extensions/extension1/images
What I want to do is, I just want to exclude the top level "images" and "cache" folders from the root folder (The very first two entries in my listing above).
I have tried using the xr!images or xr!/images but.. xr!images removes all images folder. xr!/images just doesn't work.
Can someone please point me to the right direction?
Thanks
Use -x!images instead of -xr!images.

How can I rename the template directory/folder - Joomla 1.5

I want to rename NOT inner folder(rhuk_milkyway оr others). But exactly folder "templates".
I think it one of the ways to protect site from regular virus attaks.
I changed:
1). folder name
2). paths in file index.php in that folder
What else must I do?
I don't think that renaming templates folder would do any good. You can still see path of template css, js and images in html source.
Lets say you rename your templates folder to secret_folder, but when viewing html source you will see /secret_folder/rhuk_milkyway/css/style.css instead of /templates/rhuk_milkyway/css/style.css.
If you're afraid of regular virus attacks - get right folder permissions, and it should do the trick.

Rubymotion organize resources in subfolders

When I use subfolders in ./resources directory I can't get access to them.
What is the correct way to organise properly the resources?
Make sure you reference the subfolder in your code. If your image is ./resources/subfolder/imagename.png, do this:
image = UIImage.imageNamed("subfolder/imagename")
That works fine for me.
The accepted answer didn't work for me for an OSX app. What works:
# Rakefile
Motion::Project::App.setup do |app|
app.resources_dirs << ['resources/icons']
end
Accessing files
image = UIImage.imageNamed("imagename") # icons subfolder not needed