Skip to content

Commit aadb0c2

Browse files
authored
Move to src (#8)
* Move to src * Fix URLs
1 parent 1cae564 commit aadb0c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+117
-62
lines changed

.eslintrc.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/build.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: 'Pages'
2+
3+
on:
4+
push:
5+
branches: ['master']
6+
repository_dispatch:
7+
types:
8+
- webhook
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: 'pages'
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build:
22+
name: 'Build'
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 5
25+
26+
steps:
27+
- name: 'Checkout'
28+
uses: actions/checkout@v4
29+
30+
- name: 'Configure Pages'
31+
uses: actions/configure-pages@v5
32+
33+
- name: 'Jekyll Build Pages'
34+
uses: actions/jekyll-build-pages@v1
35+
with:
36+
source: './src'
37+
38+
- name: 'Upload Pages Artifact'
39+
uses: actions/upload-pages-artifact@v2
40+
with:
41+
path: _site/
42+
43+
deploy:
44+
name: 'Deploy'
45+
runs-on: ubuntu-latest
46+
timeout-minutes: 5
47+
needs: build
48+
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
53+
steps:
54+
- name: 'Deploy Pages'
55+
id: deployment
56+
uses: actions/deploy-pages@v2
57+
with:
58+
artifact_name: github-pages

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.idea/
22
*.iml
33
.vscode/
4-
.jekyll-cache/
5-
_site/
4+
**/.jekyll-cache/
5+
**/_site/

README.md

Lines changed: 7 additions & 0 deletions

genshots.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const baseDir = './screenshots'
1+
const baseDir = './src/screenshots'
22

33
const fs = require('fs')
44
const files = []
@@ -7,7 +7,7 @@ fs.readdirSync(baseDir).forEach((file) => {
77
})
88
console.log(files)
99

10-
const file = fs.createWriteStream('./js/vars.js')
10+
const file = fs.createWriteStream('./src/js/vars.js')
1111
file.on('error', function (err) {
1212
console.error('err', err)
1313
})

_config.yml renamed to src/_config.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
timezone: America/Los_Angeles
22
encoding: utf-8
33

4+
url: https://django-files.github.io
5+
46
author: Shane/Ralph
57
site_name: Django Files
6-
site_url: https://django-files.github.io/
8+
79
github_url: https://github.com/django-files/django-files
10+
github_name: django-files/web-extension
811

912
extension_github: https://github.com/django-files/web-extension
13+
1014
chrome_url: https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej
11-
firefox_url: https://addons.mozilla.org/en-US/firefox/addon/django-files/
1215
chrome_id: abpbiefojfkekhkjnpakpekkpeibnjej
16+
17+
firefox_url: https://addons.mozilla.org/en-US/firefox/addon/django-files/
1318
firefox_id: django-files
14-
github_name: django-files/web-extension

_layouts/default.html renamed to src/_layouts/default.html

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,45 +18,41 @@
1818
<meta property="og:title" content="{{ site.site_name }} - {{ page.title }}">
1919
<meta property="og:description" content="{{ site.site_name }} - {{ page.description }}">
2020
<meta property="og:type" content="website">
21-
<meta property="og:url" content="{{ site.site_url }}">
22-
<meta property="og:image" content="{{ site.site_url }}/media/logo.png">
21+
<meta property="og:url" content="{{ "/" | absolute_url }}">
22+
<meta property="og:image" content="{{ "/media/logo.png" | absolute_url }}">
2323

2424
{% if page.dark != true %}
25-
<script type="text/javascript" src="/js/theme.js"></script>
25+
<script type="text/javascript" src="{{ "/js/theme.js" | relative_url }}"></script>
2626
{% endif %}
2727

28-
<link rel="icon" href="/favicon.ico" sizes="any">
28+
<link rel="icon" href="{{ "/favicon.ico" | relative_url }}" sizes="any">
29+
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/apple-touch-icon.png" | relative_url }}">
30+
2931
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
3032
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
31-
<link rel="stylesheet" href="/css/main.css">
32-
33-
{% if page.title == 'Screen Shots' %}
34-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.css" />
35-
<link rel="stylesheet" href="/css/screenshots.css">
36-
{% endif %}
37-
33+
<link rel="stylesheet" href="{{ "/css/main.css" | relative_url }}">
3834
</head>
3935
<body class="d-flex flex-column h-100">
4036

4137
<header>
4238
<nav class="navbar navbar-expand-sm">
4339
<div class="container-fluid">
44-
<a class="navbar-brand" href="/">
45-
<img src="/images/logo.png" width="30" height="30" alt="logo"></a>
40+
<a class="navbar-brand" href="{{ "/" | relative_url }}">
41+
<img src="{{ "/images/logo.png" | relative_url }}" width="30" height="30" alt="logo"></a>
4642
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
4743
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
4844
aria-expanded="false" aria-label="Toggle navigation">
4945
<span class="navbar-toggler-icon"></span>
5046
</button>
5147
<div class="collapse navbar-collapse" id="navbarSupportedContent">
5248
<ul class="navbar-nav me-auto mb-2 mb-sm-0">
53-
<li class="nav-item"><a class="nav-link {% if page.title == 'Home' %}active{% endif %}" href="/">
49+
<li class="nav-item"><a class="nav-link {% if page.title == 'Home' %}active{% endif %}" href="{{ "/" | relative_url }}">
5450
Home</a></li>
55-
<li class="nav-item"><a class="nav-link {% if page.title == 'Docs' %}active{% endif %}" href="/docs/">
51+
<li class="nav-item"><a class="nav-link {% if page.title == 'Docs' %}active{% endif %}" href="{{ "/docs" | relative_url }}">
5652
Docs</a></li>
57-
<li class="nav-item"><a class="nav-link {% if page.title == 'Web Extension' %}active{% endif %}" href="/extension/">
53+
<li class="nav-item"><a class="nav-link {% if page.title == 'Web Extension' %}active{% endif %}" href="{{ "/extension" | relative_url }}">
5854
Web Extension</a></li>
59-
<li class="nav-item"><a class="nav-link" href="/screenshots/" target="_blank">
55+
<li class="nav-item"><a class="nav-link" href="{{ "/screenshots" | relative_url }}" target="_blank">
6056
Screen Shots <i class="fa-solid fa-arrow-up-right-from-square"></i></a></li>
6157
<li class="nav-item"><a class="nav-link" href="{{ site.github_url }}" target="_blank" rel="noopener">
6258
GitHub <i class="fa-solid fa-arrow-up-right-from-square"></i></a></li>
@@ -80,13 +76,21 @@
8076
</div>
8177
<div class="col-12 col-md-8 text-md-end">
8278
<ul class="list-inline">
83-
<li class="list-inline-item"><a class="link-body-emphasis text-decoration-none {% if page.title == 'Home' %}fw-bold{% endif %}" href="/">Home</a></li>
79+
<li class="list-inline-item">
80+
<a class="link-body-emphasis text-decoration-none {% if page.title == 'Home' %}fw-bold{% endif %}" href="{{ "/" | relative_url }}">
81+
Home</a></li>
8482
<li class="list-inline-item">|</li>
85-
<li class="list-inline-item"><a class="link-body-emphasis text-decoration-none {% if page.title == 'Docs' %}fw-bold{% endif %}" href="/docs/">Docs</a></li>
83+
<li class="list-inline-item">
84+
<a class="link-body-emphasis text-decoration-none {% if page.title == 'Docs' %}fw-bold{% endif %}" href="{{ "/docs" | relative_url }}">
85+
Docs</a></li>
8686
<li class="list-inline-item">|</li>
87-
<li class="list-inline-item"><a class="link-body-emphasis text-decoration-none {% if page.title == 'Web Extension' %}fw-bold{% endif %}" href="/docs/">Extension</a></li>
87+
<li class="list-inline-item">
88+
<a class="link-body-emphasis text-decoration-none {% if page.title == 'Web Extension' %}fw-bold{% endif %}" href="{{ "/extension" | relative_url }}">
89+
Extension</a></li>
8890
<li class="list-inline-item">|</li>
89-
<li class="list-inline-item"><a class="link-body-emphasis text-decoration-none" href="/screenshots/" target="_blank">Screen Shots <i class="fa-solid fa-arrow-up-right-from-square"></i></a></li>
91+
<li class="list-inline-item">
92+
<a class="link-body-emphasis text-decoration-none" href="{{ "/screenshots" | relative_url }}" target="_blank">
93+
Screen Shots <i class="fa-solid fa-arrow-up-right-from-square"></i></a></li>
9094
</ul>
9195
</div>
9296
</div>
@@ -109,7 +113,7 @@
109113

110114
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
111115
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.11/clipboard.min.js" integrity="sha512-7O5pXpc0oCRrxk8RUfDYFgn0nO1t+jLuIOQdOMRp4APB7uZ4vSjspzp5y6YDtDs4VzUSTbWzBFZ/LKJhnyFOKw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
112-
<script type="text/javascript" src="/js/main.js"></script>
116+
<script type="text/javascript" src="{{ "/js/main.js" | relative_url }}"></script>
113117

114118
</body>
115119
</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs.html renamed to src/docs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
permalink: /docs/
2+
permalink: /docs
33
layout: default
44
title: Docs
55
description: Brief Documentation for Django Files, a feature Packed Self-Hosted Django/Docker File Manager for Sharing Files.

extension.html renamed to src/extension.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
permalink: /extension/
2+
permalink: /extension
33
layout: default
44
title: Web Extension
55
description: Django Files Chrome Web Extension and Firefox Browser Addon.
@@ -18,8 +18,6 @@ <h1>{{ site.site_name }} - {{ page.title }}</h1>
1818
<img src="https://img.shields.io/amo/v/{{ site.firefox_id }}?label=firefox&logo=firefox" alt="Mozilla Add-on Version" style="max-width: 100%;"></a>
1919
<a href="{{ site.extension_github }}/releases/latest" rel="nofollow" target="_blank">
2020
<img src="https://img.shields.io/github/v/release/{{ site.github_name }}?logo=github" alt="GitHub Release Version" style="max-width: 100%;"></a>
21-
<a href="{{ site.extension_github }}/blob/master/manifest.json" rel="nofollow" target="_blank">
22-
<img src="https://img.shields.io/github/manifest-json/v/{{ site.github_name }}?filename=manifest.json&logo=json&label=manifest" alt="Manifest Version" style="max-width: 100%;"></a>
2321
</div>
2422

2523
<p class="lead" data-nosnippet><a href="#configure">Configure</a> | <a href="#setup">Setup</a> | <a href="#usage">Usage</a></p>
@@ -55,7 +53,7 @@ <h1>{{ site.site_name }} - {{ page.title }}</h1>
5553
</ul>
5654

5755
<div class="mb-2">
58-
<img src="/images/extension/popup.jpg" class="img-thumbnail" alt="Chrome Pin Extension" width="380">
56+
<img src="{{ "/images/extension/popup.jpg" | relative_url }}" class="img-thumbnail" alt="Chrome Pin Extension" width="380">
5957
</div>
6058

6159
<h2>Install</h2>
@@ -84,8 +82,8 @@ <h2 id="configure">Configure</h2>
8482
</ul>
8583

8684
<div class="mb-2">
87-
<img src="/images/extension/pin-chrome.jpg" class="img-thumbnail" alt="Chrome Pin Extension" width="350">
88-
<img src="/images/extension/pin-firefox.jpg" class="img-thumbnail" alt="Chrome Pin Extension" width="320">
85+
<img src="{{ "/images/extension/pin-chrome.jpg" | relative_url }}" class="img-thumbnail" alt="Chrome Pin Extension" width="350">
86+
<img src="{{ "/images/extension/pin-firefox.jpg" | relative_url }}" class="img-thumbnail" alt="Chrome Pin Extension" width="320">
8987
</div>
9088

9189
<h2 id="setup">Setup</h2>
@@ -98,7 +96,7 @@ <h2 id="setup">Setup</h2>
9896
<li>Click Add Auth from Current Site</li>
9997
</ul>
10098
<div class="mb-2">
101-
<img src="/images/extension/setup.jpg" class="img-thumbnail" alt="Chrome Pin Extension" width="350">
99+
<img src="{{ "/images/extension/setup.jpg" | relative_url }}" class="img-thumbnail" alt="Chrome Pin Extension" width="350">
102100
</div>
103101
<p>
104102
The addon should now be configured to work with your Django Files instance.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

screenshots.html renamed to src/screenshots.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
permalink: /screenshots/
2+
permalink: /screenshots
33
title: Screen Shots
44
description: Screen Shots of Django Files, a feature Packed Self-Hosted Django/Docker File Manager for Sharing Files.
55
---
@@ -20,13 +20,14 @@
2020
<meta property="og:title" content="{{ site.site_name }} - {{ page.title }}">
2121
<meta property="og:description" content="{{ site.site_name }} - {{ page.description }}">
2222
<meta property="og:type" content="website">
23-
<meta property="og:url" content="{{ site.site_url }}{{ page.dir }}">
24-
<meta property="og:image" content="{{ site.site_url }}/media/logo.png">
23+
<meta property="og:url" content="{{ "/" | absolute_url }}">
24+
<meta property="og:image" content="{{ "/media/logo.png" | absolute_url }}">
2525

26-
<link rel="icon" href="favicon.ico" sizes="any">
27-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.css" />
28-
<link rel="stylesheet" href="/css/screenshots.css">
26+
<link rel="icon" href="{{ "/favicon.ico" | relative_url }}" sizes="any">
27+
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/apple-touch-icon.png" | relative_url }}">
2928

29+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.css" />
30+
<link rel="stylesheet" href="{{ "/css/screenshots.css" | relative_url }}">
3031
</head>
3132
<body>
3233

@@ -45,8 +46,8 @@
4546
</div>
4647

4748
<script src="https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.js"></script>
48-
<script type="text/javascript" src="/js/vars.js"></script>
49-
<script type="text/javascript" src="/js/screenshots.js"></script>
49+
<script type="text/javascript" src="{{ "/js/vars.js" | relative_url }}"></script>
50+
<script type="text/javascript" src="{{ "/js/screenshots.js" | relative_url }}"></script>
5051

5152
</body>
5253
</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)