Skip to content
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

doc: Bring in new website #1154

Merged
merged 1 commit into from
Oct 17, 2023
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
49 changes: 36 additions & 13 deletions .github/workflows/docs.yml → .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
name: Documentation
name: Documentation & Website

on: [push, pull_request]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
docs:
build:
runs-on: ubuntu-20.04
container:
image: ubuntu:22.04
Expand Down Expand Up @@ -54,18 +63,32 @@ jobs:
meson setup builddir -Ddocbook-docs=enabled
meson compile -C builddir

- name: Build website
uses: actions/jekyll-build-pages@v1
with:
source: ./doc/website
destination: ./_site

- name: Prepare docs
working-directory: builddir/doc
run: |
mkdir published-docs
mv portal-docs.html ./published-docs/index.html
mv redirect.html ./published-docs/portal-docs.html
mv docbook.css ./published-docs
mkdir ../../_site/docs/
mv portal-docs.html ../../_site/docs/index.html
mv redirect.html ../../_site/docs/portal-docs.html
mv docbook.css ../../_site/docs/

- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./builddir/doc/published-docs/
destination_dir: ./
- name: Upload artifact
uses: actions/upload-pages-artifact@v2

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
13 changes: 13 additions & 0 deletions doc/website/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
layout: default
permalink: /404.html
---

![404]({{site.baseurl}}/assets/404.png){:.full.pixels}

# Document Not Found

The requested page could not be found. If you feel this is not normal, then you create an issue on the Gitlab.

[Go Back](<javascript:window.history.go(-1);>){: .inline-button} [File an issue]({{site.issuesurl}})
{: .dialog-buttons}
33 changes: 33 additions & 0 deletions doc/website/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
source "https://rubygems.org"

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.1.0"

# This is the default theme for new Jekyll sites. You may change this to anything you like.

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
# gem 'jekyll-feed', '~> 0.13'
# gem 'jekyll-sitemap', '~> 1.4'
# gem 'jekyll-compose', '~> 0.12.0'
# gem 'jekyll-postfiles', '~> 3.1'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
# gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]

# Performance-booster for watching directories on Windows
# gem "wdm", "~> 0.1.0" if Gem.win_platform?

gem "webrick", "~> 1.8"
69 changes: 69 additions & 0 deletions doc/website/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.9)
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.15.4)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jekyll (4.1.1)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.4.0)
pathutil (~> 0.9)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 1.8)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.7.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.26.1)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.8.0)
webrick (1.8.1)

PLATFORMS
x86_64-linux

DEPENDENCIES
jekyll (~> 4.1.0)
webrick (~> 1.8)

BUNDLED WITH
2.2.7
121 changes: 121 additions & 0 deletions doc/website/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
Creative Commons Legal Code

CC0 1.0 Universal

CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.

Statement of Purpose

The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").

Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.

For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.

1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:

i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.

2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.

3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.

4. Limitations and Disclaimers.

a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
24 changes: 24 additions & 0 deletions doc/website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# XDG Desktop Portal Website

This is the website for the [XDG Desktop Portal project](https://github.com/flatpak/xdg-desktop-portal).

## Setup

The process of setting up the site locally consists of:

- Install ruby [gem bundler](https://bundler.io/). On [Fedora](https://getfedora.org/)/in the [Toolbx](https://containertoolbx.org) you do:

```
toolbox enter
sudo dnf install rubygem-bundler
cd xdg-desktop-portal/doc/website
bundle install
```


- Test the site locally:
```
bundle exec jekyll s
```

- `git commit` your changes and create a merge request. After review, the merged changes get automaticaly deployed to the site.
14 changes: 14 additions & 0 deletions doc/website/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Site settings
title: XDG Desktop Portal
baseurl: "/xdg-desktop-portal" # the subpath of your site, e.g. /blog/
# usually empty. necessary for building absolute URIs
# for metadata header
url: "https://flatpak.github.io" # the base hostname & protocol for your site
sourceurl: "https://github.com/flatpak/xdg-desktop-portal" # "edit this website" link in the footer
description: ""
issuesurl: "https://github.com/flatpak/xdg-desktop-portal/issues" # issue tracker for website
permalink: /:title/
primary-color: "#26a269" #used in ios theme. further color customization in style.css

# Build settings
markdown: kramdown
5 changes: 5 additions & 0 deletions doc/website/_includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<footer class="site-footer">
<p>&copy; {{ site.title }}, 2023</p>

<p><a href="{{ site.sourceurl }}">Website source</a></p>
</footer>
28 changes: 28 additions & 0 deletions doc/website/_includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="{{ site.primary-color }}"><!-- primary color -->

<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>

<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}" />
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />

<link rel="stylesheet" href="{{ "/style.css" | prepend: site.baseurl }}" />

<link rel="icon" type="image/png" href="{{ "/favicon.png" | prepend: site.baseurl }}" />
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/apple-touch-icon.png" | prepend: site.baseurl }}" />

<!-- Twitter -->
<meta property="twitter:title" content="{{site.title}}" />
<meta property="twitter:image" content="{{ "/assets/card.png" | prepend: site.baseurl | prepend: site.url }}" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:description" content="{{site.description}}" />

<!-- Open Graph -->
<meta property="og:title" content="{{ site.title }}" />
<meta property="og:url" content="{{ site.url }}" />
<meta property="og:description" content="{{ site.description }}" />
<meta property="og:image" content="{{ "/assets/card.png" | prepend: site.baseurl | prepend: site.url }}" />
</head>
3 changes: 3 additions & 0 deletions doc/website/_includes/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<header class="site-header">
<h1 id="logo"><a href="{{ "/" | prepend: site.baseurl }}">{{ site.title }}</a></h1>
</header>
Loading
Loading