I'm new to Jekyll and Ruby. I am using it for writing a blog in Polish, which uses non-ASCII characters.
I'd like to use UTF characters in category names - for example, "Świat". Sadly, this leads to the blog post being put in a directory also called "Świat" (with the non-ascii 'Ś' in the name), and the server I am using apparently cannot cope with non-ASCII characters in the URL (I thought non-ascii is not really allowed in URL anyway).
All Polish characters are 'downgradable' to a regular Latin character for the permalink (e.g. 'Ś'->'S'), which seems like the most desirable option here. Is that possible to do automatically somehow? I guess one option would be to manually specify the permalink in the front matter for each post, but that seems cumbersome.
I am using Jekyll 3.2.1, and a template called 'centrarium' in case that matters.
Apologies if that's a noob question, I tried googling around but couldn't really find anything.
Edit :
There is no reason for your server to mess with file or folder names containing accented characters. "Świat" is a valid string for any file system.
And Jekyll's url are well encoded, so, using accented chars in url is fine out of the box.
I've tested it here, just by adding "Świat" as a category to a post. And it works just fine.
Do you have something visible in a repository ?
# End edit
Old answer :
This can be done with a plugin.
But this implies that you can't use github-pages to generate your site. You will have to generate locally and push to your publishing branch (usually gh-pages), or use some Continuous Integration service like Travis.
Related
So I'm trying to compress some documents I made when I get the following error message:
I have no idea what the character is, as it just looks like a blank space. I have removed the blank spaces from my documents and it still won't let me zip it. Online answers seem to refer to needing the change the language setting on my computer, but I haven't written any foreign languages. Any help would be appreciated.
Go to Users directory and make a new directory called 'Analytics',
Then, move you 'Account_Over_Time_Analysis' to this folder and try to comporess again.
If it fails again, please try 7zip incase your using something else.
Such an error could be caused from different language dir-name, a name with spaces or a name with escape chars.
To fix this you could hunt around for the correct language pack, or just install 7-Zip and use that to zip the files instead
I want to create a workaround for the URL protocol file: in Chrome, as it's security doesn't allow you to open certain files or locations. This would be for a small app of mine that I designed.
I searched around, and while I've found a lot of potentially good answers (such as this answer), I don't fully understand what each line should do, and whether it would actually work in my application.
The end-result that I want for this is to have a protocol like ih-link: that would allow me to open up links in Windows Explorer or elsewhere, similar to how you can do so in say, Outlook or Microsoft Word (if you create local or network shortcuts to a folder or file, it'll open it up without issue). Attempting this in Google Chrome gives varied results, either a browser-generated directory, or an error ususally.
I'd like to know, assuming the answer I linked to would work for me...
Is "URL Protocol"="" where I'd define the name of the protocol, so I'd use "URL Protocol"="ih-link", or something like that? I remember reading something about leaving that blank, so would I replace IntranetFileLauncher with whatever protocol name I want (in this case, it'd be ih-link?)
The next part that references explorer.exe seems to just reference the icon.
After that, what do the following two lines do?
[HKEY_CLASSES_ROOT\IntranetFileLauncher\shell]
[HKEY_CLASSES_ROOT\IntranetFileLauncher\shell\open]
The last lines of that script appear to just have it strip the protocol from the URL and pass the file path to explorer.. am I correct on this? I take it I would need to format the path as I would do for windows (using \ instead of /)?
I'm afraid to experiment without knowing more, mainly because I know that many things with the registry can be very dicey, so any clarification on this would be helpful.
Reading the actual documentation is better than trying to guess what some random code sample does.
URL Protocol is just a marker, it does not need a value. The default value (#) is where the name of your protocol is stored.
Yes, that entry (incorrectly) specifies the icon.
Those two lines are pointless. They create two empty keys but only the ...\shell\open\command line is required to properly build that registry path.
Yes, you might have to change / to \, add: call set url=%url:/=\% to the command.
Using cmd.exe to parse untrusted input is not ideal, it would be better to write a custom application.
I've discovered that when using Squirrel for Windows installation framework, the program's Publisher name, as seen in the Programs and Features of Windows, is specified by the Authors field of the Package Metadata in the .nuspec file.
However, when I specify a company name that includes a comma, e.g. Company, Inc., the Publisher is displayed as just Company, truncating the rest.
Is there a way to specify a company name that includes a comma?
I don't think so. squirrel sources just get the first author from ZipPackage.Authors out of the nupkg
https://github.com/Squirrel/Squirrel.Windows/blob/0d1250aa6f0c25fe22e92add78af327d1277d97d/src/Squirrel/UpdateManager.InstallHelpers.cs#L82
And from what I can tell from the sources when it is creating the manifest from sources like an assembly it just dumps it as a simple comma separated list without attempting to quote or escape commas. And some simple attempts to quote the string or escape the comma failed as well.
Since I believe the underlying tools that squirrel uses do accept commas in that string (Company Name), it could be made to work by having an encoding for a comma that gets reversed and/or an override property for company name that isn't a list like authors, but that would require a change to squirrel for windows.
You could post an issue on github and see if Paul has a comment and/or help with a pull request for the issue.
I'm using Maven to generate an archetype. I'm able to get the archetype to generate fine and the project template it generates works as expected. The only problem is in my shell scripts. Anything commented out in the script gets stripped leaving behind only commands. I've searched high and low and all I've been able to find was another user facing a similar issue with java comments. https://stackoverflow.com/questions/18797333/maven-archetype-generation-is-stripping-java-comments That question remains unanswered, so I figure I'll ask again. Does anyone know why Maven archetypes strip comments or how to prevent this from happening?
Using the #set command itself to set a #hash variable equal to "#" worked, allowing me to maintain shell comments in scripts generated by the archetype. This can get relatively ugly when using 80 # symbols in a row in a header, but that's another matter...
I also had a similar problem with hashes. On page http://johnjianfang.blogspot.com/2009/03/escape-properties-in-maven-archetypes.html I found answer.
Something like this works fine in my case:
#set($hash = '#')
${hash}
Output:
#
Maven uses Apache Velocity to perform substitutions/replacements when copying your archetype's template files to the project locations. The '#' character is used to begin directives, e.g. #set, in Velocity. My guess is that Velocity doesn't recognize your comment as a valid directive and silently deletes it during the replacement process.
Though I haven't verified this works - I would try escaping the comments with using a backslash (\) as defined in Velocity's user manual to solve the issue.
I am a plone Newbie and I needed to change a translated word in the .po file, the translation is in Arabic. When I changes the word to the right word and restarted the zope. My plone site is no more reading the Arabic translations from this file and displays question marks instead.
When I searched I found that I must do some synchronization with the .pot file (translation catalog) but I think this is not the actual problem. Any clue?
You may have saved the file with the wrong encoding. Try saving the file as UTF-8.
I seems that you edit the file with a normal text editor. That can corrupt the files charset. To avoid this, you can use a free translation program such as poedit. Thoose programs normally take care of the charset. Use google with "translate .po YOURPLATTFORM". There are tons of free tools.
With this tools you can import .pot files also and (re)generate .po files from them.
You just have to restart plone, when you're done, editing the file.
If you have a good editor, you can try guessing the charset and correct it manually. But this often leads to the described problem and holds the risk that you may forgot to safe with the correct charset in a later edit process.