Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

When you click in another language, you are called to sign in #161

Closed
gusbemacbe opened this issue Mar 18, 2020 · 0 comments
Closed

When you click in another language, you are called to sign in #161

gusbemacbe opened this issue Mar 18, 2020 · 0 comments

Comments

@gusbemacbe
Copy link

gusbemacbe commented Mar 18, 2020

Hello,

I use GitLab.

Repository: https://gitlab.com/gusbemacbe/dicas-para-alunos-da-dankicode
Site: https://gusbemacbe.gitlab.io/dicas-para-alunos-da-dankicode/

When you click in the Portugal flag, then click in the Brazilian site you are called to sign in. I do not know why. But you can check the repository or these code sources here.

Small code in the file index.md:

{% if site.lang == "pt_PT" %}
  **Idiomas:** <a href="index.html" alt="Português brasileiro" name="Português brasileiro" title="Português brasileiro">{% t global.pt_br %}</a>
{% elsif site.lang == "pt_BR" %}
  **Idiomas:** <a href="pt_PT/index.html" alt="Português europeu" name="Português europeu" title="Português europeu">{% t global.pt_pt %}</a>
{% endif %}

And it also causes to call you to sign in:

{% if site.lang == "pt_PT" %}
  {% capture link1 %}{{ site.baseurl_root }}{{ page.url}}{% endcapture %}
**Idiomas:** <a href="{{ link1 }}" alt="Português brasileiro" name="Português brasileiro" title="Português brasileiro">{% t global.pt_br %}</a>
{% elsif site.lang == "pt_BR" %}
  {% capture link2 %}{{ site.baseurl_root }}/pt_PT{{ page.url  }}{% endcapture %}
**Idiomas:** <a href="{{ link2 }}" alt="Português europeu" name="Português europeu" title="Português europeu">{% t global.pt_pt %}</a>
{% endif %}

Observe that I used tl in another page captura-de-tela.md, but it causes you to be called to sign:

---
namespace: captura
permalink: /captura-de-tela.html
permalink_pt_BR: /captura-de-tela.html
permalink_pt_PT: /captura-de-ecrã.html
---

{% if site.lang == "pt_PT" %}
  **Idiomas:** <a href="{% tl captura pt_BR %}" alt="Português brasileiro" name="Português brasileiro" title="Português brasileiro">{% t global.pt_br %}</a>
{% elsif site.lang == "pt_BR" %}
  **Idiomas:** <a href="{% tl captura pt_PT %}" alt="Português europeu" name="Português europeu" title="Português europeu">{% t global.pt_pt %}</a>
{% endif %}

In the .gitlab-ci.yml:

image: ruby:2.7

variables:
  JEKYLL_ENV: production
  LC_ALL: C.UTF-8

before_script:
  - gem install bundler
  - bundle install

pages:
  stage: deploy
  script:
  - bundle exec jekyll build -d public
  artifacts:
    paths:
    - public
  only:
  - master

And _config.yml:

defaultLang: pt_BR
languages: ["pt_BR", "pt_PT"]
languageNames:
  pt_BR: Português brasileiro
  pt_PT: Português europeu

plugins:
  - html-proofer
  - jekyll-assets
  - jekyll-coffeescript
  - jekyll-feed
  - jekyll-multiple-languages-plugin
  - jekyll-relative-links
  - jekyll-seo-tag
  - jekyll-sitemap
  - rouge
  - sassc
relative_links:
  enabled: true
  collections: true
include:
  - contributing.md
  - readme.md
  - license.md
  - copying.md
  - code_of_conduct.md
  - contributing.md
  - issue_template.md
  - pull_request_template.md

kramdown:
    input:              GFM
    auto_ids:           true
    hard_wrap:          false
    toc_levels:         1..6
    toc_panel:          true
    syntax_highlighter: rouge

    syntax_highlighter_opts:
        css_class: 'highlight'
        # line_numbers: true # má ideia, spans não precisam lineos e herdariam esta opção
        # default_lang: text # experimente esta última
        span:
            line_numbers: false
            disable: true
        block:
            line_numbers: false
            start_line: 1
        # inline_theme: monokai.sublime # na verdade funciona bem, além de ficheiros diferentes sem fundo

markdown: kramdown
sass:
  line_comments: false
  sourcemap: never
  style: expanded

exclude: 
  - "scripts"
  - "templates"

include: 
  - ".htacess"
permalink: /:year/:month/:day/:title/

assets:
  source_maps: false
  destination: "/assets"
  compression: false
  gzip: false
  defaults:
    integrity:
      {css, imagens, js}: false
  caching:
    enabled: false
    path: ".jekyll-cache/assets"
    type: file
  cdn:
    baseurl: false
    destination: false
    url: null
  sources:
    - assets/css
    - assets/imagens
    - assets/js
  source_maps: false
@gusbemacbe gusbemacbe changed the title When you lick in another language, you are called to sign in When you click in another language, you are called to sign in Mar 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant