Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Several changes: Oriol, metadata and personal link#1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
OriolAbril merged 3 commits intomasterfromoriol_picture
Aug 16, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,6 +44,36 @@ Uses Jinja2 templating.
They are pulled from GitHub by just loading
whatever URL to our main profile page is.

### Metadata
Most forums and social networks nowadays can use fancy card views with a
title, a description and an image, which serves as a link preview. For the
card preview to work, the `<head>` section must include some metadata fields.

The most important fields have been configured for all pages with some
defaults and they can be overwritten from more specific templates. See
`templates/layout.html` for info on how to set the metadata and the defaults
used.

`og_title`, `og_description` and `og_image` block can be used to modify the default title
description and image in the card respectively. Here is one example from the
teammates template:

```html
<!-- layout sets the metadata defaults and blocks to modify it -->
{% extends "layout.html" %}
<!-- Use og_title to modify the default "PyMC Labs" as title -->
<!-- Note that this only affects the card title, not the title shown by the browser -->
{% block og_title %}{{ this.name }} - PyMC Labs{% endblock %}
<!-- Use og_title to modify the default "Bespoke Bayesian Modeling" as description -->
{% block og_description %}{{ this.blurb|string }}{% endblock %}
```

See more on possible metadata fields [here](https://ogp.me/). Moreover,
Twitter is extremely picky and in addition to being the most restrictive in
general, also requires an extra line to choose between the `summary` or
`summary_large_image` card types. For now all pages use `summary` format, but
this could be modified or left to configure for each page if desired.

### Other stuff to edit?

Consult:
Expand Down
14 changes: 13 additions & 1 deletioncontent/team/oriol-abril-pla/contents.lr
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
name: Oriol Abril Pla
---
picture: https://avatars3.githubusercontent.com/u/23738400?s=400&u=e12583539a9f95064bc8559c0669a2f00906bb41&v=4
picture: https://github.com/OriolAbril/calaix_de_sastre/raw/master/oriol-abril-pla.png
---
github_url: https://github.com/OriolAbril
---
location: Barcelona, Spain
---
blurb: Trying to develop and apply new methodology for a robust and reproducible statistical analysis workflow.
---
twitter_url: https://twitter.com/OriolAbril
---
linkedin_url: https://www.linkedin.com/in/oriol-abril-pla-1b9123180/
---
personal_url: https://oriolabril.github.io/oriol_unraveled/
---
specializations: Bayesian statistics, Model comparison
4 changes: 4 additions & 0 deletionsmodels/index.ini
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,5 +14,9 @@ type = string
label = Mission
type = markdown

[fields.description]
label = The company in one sentence
type = markdown

; [fields.flow]
; type = flow
6 changes: 5 additions & 1 deletionmodels/teammate.ini
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,6 +21,10 @@ type = url
label = Linkedin URL
type = url

[fields.personal_url]
label = Personal URL
type = url

[fields.specializations]
label = Specializations (comma-separated)
type = string
Expand All@@ -31,4 +35,4 @@ type = string

[fields.blurb]
label = Blurb (140 characters)
type =markdown
type =string
7 changes: 7 additions & 0 deletionstemplates/layout.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,6 +18,13 @@
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">

<title>PyMC Labs</title>
<meta name="twitter:card" content="summary">
<meta property="og:url" content="{{ this|url(external=true) }}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{% block og_title%}PyMC Labs{% endblock %}" />
<meta property="og:description" content="{% block og_description%}Bespoke Bayesian Modeling{% endblock %}" />
<meta property="og:image" content="{% block og_image%}https://raw.githubusercontent.com/pymc-devs/pymcon/gh-pages/assets/contact.png{% endblock %}" />

</head>

<body>
Expand Down
16 changes: 16 additions & 0 deletionstemplates/macros/teammate.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,6 +25,12 @@ <h4 class="card-title text-center">{{ teammate.name }}</h4>
<i class="fab fa-linkedin"></i>
</a>
{% endif %}

{% if teammate.personal_url %}
<a href="{{ teammate.personal_url }}">
<i class="fas fa-globe"></i>
</a>
{% endif %}
</div>
</div>
</div>
Expand All@@ -40,6 +46,10 @@ <h4 class="card-title text-center">{{ teammate.name }}</h4>
<div class="card-body">
<h4 class="card-title text-center">{{ teammate.name }}</h4>

{%if teammate.blurb %}
<p>{{ teammate.blurb }}</p>
{% endif %}

{%if teammate.specializations %}
<h5>Specializations</h5>
<p>{{ teammate.specializations }}</p>
Expand DownExpand Up@@ -68,6 +78,12 @@ <h5>Location</h5>
<i class="fab fa-linkedin"></i>
</a>
{% endif %}

{% if teammate.personal_url %}
<a href="{{ teammate.personal_url }}">
<i class="fas fa-globe"></i>
</a>
{% endif %}
</div>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletiontemplates/team.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
{% extends "layout.html" %}
{% from "macros/teammate.html" import render_teammate_card %}
{% block og_title %}Our Team - PyMC Labs{% endblock %}
{% block og_description %}Meet the team of statistical consultants at PyMC Labs.{% endblock %}
{% block body %}
<style>
.img-round {
Expand All@@ -13,7 +15,7 @@
</style>
<div class="row">
{% for teammate in this.children %}
{{ render_teammate_card(teammate)}}
{{ render_teammate_card(teammate)}}
{% endfor %}
</div>
{% endblock %}
3 changes: 3 additions & 0 deletionstemplates/teammate.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
{% extends "layout.html" %}
{% from "macros/teammate.html" import render_teammate_page %}
{% block og_title %}{{ this.name }} - PyMC Labs{% endblock %}
{% block og_description %}{{ this.blurb|string }}{% endblock %}
{% block og_image %}{{ this.picture }}{% endblock %}
{% block body %}
{{ render_teammate_page(this)}}

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp