Skip to content

#30 - Added social cards, links and icons #32

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
Binary file added docs/images/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/images/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#2094f3</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added docs/images/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/favicon.ico
Binary file not shown.
Binary file added docs/images/icons-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/icons-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
129 changes: 129 additions & 0 deletions docs/images/safari-pinned-tab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions docs/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"short_name": "FakerPHP",
"name": "FakerPHP / Faker",
"description": "Documentation for FakerPHP / Faker",
"icons": [
{
"src": "/images/icons-192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/images/icons-512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": "/",
"background_color": "#2e303e",
"display": "standalone",
"scope": "/",
"theme_color": "#2094f3",
"shortcuts": []
}
5 changes: 5 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,24 @@ edit_uri: https://github.com/FakerPHP/fakerphp.github.io/edit/main/docs/

theme:
name: material
custom_dir: overrides
font:
text: 'Nunito'
code: 'Fira Code'
palette:
scheme: preference
primary: blue
accent: blue
favicon: images/favicon.ico
logo: images/logo.svg
icon:
repo: fontawesome/brands/github
language: en
features:
- navigation.instant

extra:
manifest: manifest.webmanifest
social:
- icon: fontawesome/brands/github
link: https://github.com/FakerPHP/Faker
Expand Down Expand Up @@ -119,6 +123,7 @@ nav:

markdown_extensions:
- admonition: { }
- meta: { }
- toc:
permalink: '#'
- pymdownx.details: { }
Expand Down
27 changes: 27 additions & 0 deletions overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{% extends "base.html" %}

{% block extrahead %}
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
<link rel="mask-icon" href="/images/safari-pinned-tab.svg" color="#2094f3">
<meta name="msapplication-TileColor" content="#2094f3">
<meta name="theme-color" content="#2094f3">

{% set title = config.site_name %}
{% if page and page.meta and page.meta.title %}
{% set title = title ~ " - " ~ page.meta.title %}
{% elif page and page.title and not page.is_homepage %}
{% set title = title ~ " - " ~ page.title | striptags %}
{% endif %}

<meta property="og:title" content="{{ title }}">
<meta property="og:type" content="website" />
<meta property="og:description" content="{{ config.site_description }}">
<meta property="og:url" content="{{ page.canonical_url }}">
<meta property="og:image" content="https://github.com/FakerPHP/Artwork/raw/main/src/socialcard.png">
<meta name="twitter:title" content="{{ title }}"/>
<meta name="twitter:description" content="{{ config.site_description }}"/>
<meta name="twitter:image" content="https://github.com/FakerPHP/Artwork/raw/main/src/socialcard.png"/>
<meta name="twitter:card" content="summary_large_image"/>
{% endblock %}