Skip to content

Commit

Permalink
Start using PURL for meta data and minor improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
i2000s committed Nov 26, 2016
1 parent 3d3a064 commit 112236f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
5 changes: 3 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title : The NoteBlog of Xiaodong Qi
tagline: Exploring Quantum World
title : A Notebook of Xiaodong Qi's
tagline: Exploring the Quantum World
author :
name : Xiaodong Qi
givenName: Xiaodong
Expand All @@ -19,6 +19,7 @@ author :
- name: ICIQ
- name: JuliaCN
url: https://www.qixiaodong.tk
purl: https://purl.org/qxd # This is the PURL domain registered on PURL.org for this site. If a PURL is not registered, please put the url value here or edite the /_include/metadate.html file with site.purl replaced with site.url.
baseurl: /en
disqus:
sitename: qxd # This is the shortname of the disqus site id to display disqus comments below posts.
Expand Down
9 changes: 9 additions & 0 deletions _drafts/customize-domain-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ Some of the benefits of sticking to permanent links and more details on keeping
Notice that permalink can only provide a relative link to the current repo file structure and is hard to redirect to a higher level URL from the new repo.
For the same reason, when a page is cloned to a subrepo from the head repo, the permalink of the page--if defined in YAML--shouldn't be changed yet will be automatically put in the new folder of the virtual whole website.

Permanent link registration:
===========================
To prevent some trouble caused by lose/change of domain name, I am using a PURL, or permanent universal resource link, to associate with my current domain name.
I registered a user ID on [purl.org](http://purl.org) and then created a domain name `/qxd` for my site.
In the domain name setting of `/qxd`, I selected `partial` or partial redirection as the type of PURL and put the `https://qixiaodong.tk` as the target address.
This way, if my site's domain name got changed, I can just update the PURL for the site for people to find my new website.
Notice that, the partial redirection function will ensure every page under the registered domain name can be visited using the `purl.org/qxd` domain name plus the subdomain or page address related to the site address.
If you use the `301` or `302` or other types, your registered domain name cannot recognize the association of subdomain names on your website.

Centralize information from sub-repos:
======================================
Once the website is branched out with separated repos (sub-repos, in our case), it would be nice to collect some key information on the front page.
Expand Down
7 changes: 4 additions & 3 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<head prefix="dc: http://purl.org/dc/terms/ og: http://ogp.me/ns#"> <!-- namespaces used in metadata.html -->
<!--<meta charset="utf-8">-->
<title>{{ page.title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv = "X-UA-Compatible" content = "IE = edge">
<!-- <meta http-equiv = "X-UA-Compatible" content = "IE = edge"> -->
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<!--[if lt IE 9]>
<script src = "https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src = "https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
Expand Down
8 changes: 4 additions & 4 deletions _includes/metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@
<meta property="dc:date" content="{{ page.date }}" />
<meta property="dc:format" content="text/html" />
<meta property="dc:language" content="en" />
<meta property="dc:identifier" content="{{ site.url }}{{ site.baseurl }}{{ page.url }}" />
<meta property="dc:identifier" content="{{ site.purl }}{{ site.baseurl }}{{ page.url }}" />
<meta property="dc:rights" content="CC-BY" />
<meta property="dc:source" content="{{ site.title }}" />
<meta property="dc:subject" content="Physics" />
<meta property="dc:type" content="website" />
<meta name="dc.language" content="en">
<!-- RDFa Metadata (in OpenGraph) -->
<meta property="og:title" content="{{ page.title }}" />
<meta property="og:author" content="{{site.url}}{{ site.baseurl }}/index.html" /> <!-- Should be Liquid? URI? -->
<meta property="og:author" content="{{site.purl}}{{ site.baseurl }}/index.html" /> <!-- Should be Liquid? URI? -->
<meta property="https://ogp.me/ns/profile#first_name" content="{{ site.author.givenName }}"/>
<meta property="https://ogp.me/ns/profile#last_name" content="{{ site.author.familyName }}"/>
<meta property="https://ogp.me/ns/article#published_time" content="{{ page.date }}" />
<meta property="og:site_name" content="{{ site.title }}" /> <!-- Same as dc:source? -->
<meta property="og:url" content="{{site.url}}{{ site.baseurl }}{{ page.url }}" />
<meta property="og:url" content="{{site.purl}}{{ site.baseurl }}{{ page.url }}" />
<meta property="og:type" content="website" />
<!-- Google Scholar Metadata -->
<meta name="citation_author" content="{{ site.author.name }}"/>
Expand All @@ -52,6 +52,6 @@
<meta name="twitter:site" content="@{{site.author.twitter}}" />
<meta name="twitter:title" content="{{ page.title }}" />
<meta name="twitter:description" content="{{ page.description }}" />
<meta name="twitter:image" content="{{ site.url }}{{ site.baseurl }}/assets/img/qi2016.jpg" />
<meta name="twitter:image" content="{{ site.purl }}{{ site.baseurl }}/assets/img/qi2016.jpg" />
<!-- Baidu website verification code -->
<meta name="baidu-site-verification" content="{{site.baiduid}}" />

0 comments on commit 112236f

Please sign in to comment.