Comments (2)
@diev thank you for pointing this out. I have been meaning to update the guide in other areas and now I suppose these new GH pages features force my hand. I'll get to it!
from jmcglone.github.io.
I am currently investigating the dual+ language possibilities of this way, when no Front Matter for .md files present, just by proper file names: a native language page.md
and page-en.md
for English (and i.e. page-fr.md
for French if somewhere). With an exception (but otherwise a nice looking feature as for native language sites) of index.md
and en.md
for the root entries (i.e. for my case it gives domain.ru
and domain.ru/en
as result).
I know your way of using **/page/index.html, but the new GH aproach uses a smart feature to automaticaly replace root //site/page.md
to //site/page
(and //site/page-en
for my case) for readers! The only disadvantage I see is to get 404.md
instead //site/page/
(of your way). But this makes the site structure very simple for a writer (for his/her 4+ pages as in your guide).
I very like your site for its zen simplicity, but the world has more languages than the English one :)
Below is a working sample of my code in /_layouts/default.html
:
<!DOCTYPE html>
{% if page.url == "/" or page.url == "/index.html" or page.url == "/en.html" %}
{% assign home = true %}
{% endif %}
{% if page.url contains "/en.html" or page.url contains "-en.html" %}
{% assign en = true %}
<html lang="en">
{% else %}
<html lang="ru">
{% endif %}
<head>
...
<body>
...
{% if en %}
<span class="credits left">Project by <a href="/en" title="Home Page">Dmitrii Evdokimov</a></span>
{% else %}
<span class="credits left">Project by <a href="/" title="Сайт">Дмитрий Евдокимов</a></span>
{% endif %}
...
Another point for your attention is a possibility to create more subsites in one GH account if the first one (per user) is located in the user.github.io
repo as yours and others are in different repos in their docs/
magic (in new way) folders:
{% if site.github.is_user_page %}
{{ content }}
{% elsif site.github.is_project_page %}
<h1>{{ site.title | default: site.github.repository_name }}</h1>
<p>{{ site.description | default: site.github.project_tagline }}</p>
{{ content }}
{% else %}
...
{% endif %}
Good luck to your guide! I recommend it to all my friends :)
from jmcglone.github.io.
Related Issues (7)
- Unable to reproduce the website using your layout HOT 1
- Your theme is listed in jekyll-themes.com HOT 1
- Update fonts
- Update GH instructions and screenshots in tutorial to match current GH UI
- Problems with github pages guide css file
- What do you mean in step 10 of your guide for setting up your own website? 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 jmcglone.github.io.