whylinuxisbetter
whylinuxisbetter copied to clipboard
Why PHP?
Since the pages are pretty much static (not dynamic) pages, I see no reason why to use PHP instead of plain HTML.
I agree, this was a while ago and I used PHP to include a common template for all pages, I would probably do things differently now.
Pull requests welcome ;-)
Or maybe Jekyll, etc?
Hi Elias,
This site was made many years ago :-) It's open source, contributions welcome!
Cheers, Manu
On Mon, Feb 6, 2017 at 10:17 AM, Elias Ojala [email protected] wrote:
Or maybe Jekyll, etc?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lmanul/whylinuxisbetter/issues/23#issuecomment-277766481, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT6v-xYrUgOCQW4l7UJCZHAHoImlvffks5rZ2OtgaJpZM4H0k9X .
@lmanul I would love to help out. Would there be a preferred framework to rebuild this in?
@jrock2004 Good question! I don't have a strong preference and am open to suggestions. :-) If you really want to work on this, maybe it's best to list what your potential choices are before starting to spend too much time so that we make sure it will actually work (I do have some constraints in terms of hosting, but still pretty flexible)?
Thanks so much for offering your help!
@lmanul sure, here are my thoughts
- EmberJS
- Laravel
Both can still support multi lang. No db backend for any of these unless you really want it.
I think this site should be a single page app. Should also be responsive
Either of these sound fine to me! They both seem fairly popular. Maybe a very slight preference for EmberJS but if you're volunteering to do the conversion you should really pick what you prefer. :-)
Thanks again for offering your help.
Well I don't want to build something that you are not familiar with. So for now I will build it in Ember. Do I need to have all languages you currently support before doing PR
@jrock2004 I suggest something like gettext to translation system in place of "copy php file and make changes".
I think if you're able to build the core framework with, say, English plus another language just to demonstrate how multi-lang will work that would be perfect, then I can do the rest of the work of porting other languages over?
Thanks again.
@theel0ja Yeah that was a bad choice on my part :-) In my defense it was a long time ago.
I think this site should be a single page app.
Why though? I think it would make the job much easier if we did away with dynamic web pages and used something like Jekyll.
I've made some of the Jekyll site (other languages + reasons to be added). ~~For some reason, the blocks look pretty weird if the title of the posts are too long (probably due to float: left; and text in columns obstructing the columns below it). Anyone know a fix?~~ Edit: Fixed it by adding clearfixes whenever they were needed (credit to Dygestor for solution)
Screenshots of the Jekyll site below:

I've put the (incomplete) Jekyll site up on GitHub. The source is here, and the live site can be found here, albeit with modified code from the master branch.
@iamunknown2 That looks nice! Can you add an example of one other language (other than English) for a few pages to see how that would work? Thanks a lot for contributing!
@iamunknown2 That looks nice! Can you add an example of one other language (other than English) for a few pages to see how that would work? Thanks a lot for contributing!
Thanks!
I've updated both the master branch and the gh-pages branch (which is what the live site is running on) to include Chinese (since that's the only other language I know well-ish). The Chinese page is here (I'll add a dropdown menu later which allows you to select the language, just change the /cn/ in the URL to /en/ if you want English).
To add a new language...
- Add a new item to
collectionsin_config.ymle.gchineseand set itsoutputtotrueand itspermalinkto/(shortname for language)/:titlee.g/cn/:title - Copy a currently existing collection directory e.g
_englishto_(full name of language you set in _config.yml)e.g_chinese - Change the title and post content of the new language/collection directory.
- Clone an existing
home_(language shortname).htmllayout in the_layoutsfolder and change the language name e.g copyhome_en.htmltohome_cn.html. - Replace all the instances of the first full language name (e.g
english) to the new full language name (e.gchinese) - Finally, add a directory with the shortname for the new language to the root Jekyll directory e.g
/cn/containingindex.md:
---
# You don't need to edit this file, it's empty on purpose.
# Edit theme's home layout instead if you wanna make some changes
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: home_(shortname for language)
---
Update on the Jekyll site: With @Theel0ja's help through stating issues and creating PRs, the Jekyll site...
- Is responsive now
- Has a language selection dropdown in the navigation bar
Another update - the system for creating new languages is simpler now. Just add a new entry in _config.yml, add a homepage similar to the existing ones (but change the language to the English name of the language e.g chinese), and add your posts to the _(English name of language here) folder.
Thanks again for the suggestions! I don't believe there's any PHP left now :-) Closing this. Please feel free to send more patches!
See: http://whylinuxisbetter.net/en/warez/
<?php
table_parser (“Yes”, “No”, “Commercial”, “Open source”, “Exists on Windows?”);
left there
Oops, totally right, I missed that.