Skip to content

Commit

Permalink
fix relative links to resources using base tag
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradHoeffner committed May 23, 2023
1 parent c79b9d1 commit f94d173
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rickview"
version = "0.1.1"
version = "0.1.2"
edition = "2021"
license = "MIT"
keywords = ["rdf", "semantic-web", "linked-data"]
Expand Down
1 change: 1 addition & 0 deletions data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<title>{title}</title>
<base href="{base}/">
<link rel="stylesheet" href="rickview.css" type="text/css" />
<link rel="stylesheet" href="roboto.css" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />
Expand Down
1 change: 1 addition & 0 deletions data/resource.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<title>{title}</title>
<base href="{base}/">
<link rel="stylesheet" href="rickview.css" type="text/css" />
<link rel="stylesheet" href="roboto.css" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />
Expand Down
1 change: 1 addition & 0 deletions src/rdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ pub fn resource(subject: Iri<&str>) -> Resource {
let inverses = if config().show_inverse { convert(connections(&ConnectionType::Inverse, &source)) } else { Vec::new() };
Resource {
uri: piri.full,
base: config().base.clone(),
duration: format!("{:?}", start.elapsed()),
title,
github_issue_url: config().github.as_ref().map(|g| format!("{g}/issues/new?title={suffix}")),
Expand Down
1 change: 1 addition & 0 deletions src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub struct Property {
#[derive(Serialize)]
pub struct Resource {
pub uri: String,
pub base: String,
//pub suffix: String,
pub title: String,
pub main_type: Option<String>,
Expand Down

0 comments on commit f94d173

Please sign in to comment.