Skip to content
Open
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
27 changes: 11 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,35 @@ env:
&&
github.ref == 'refs/heads/master'
}}
OUTPUT: _html

jobs:
build:
name: Build lektor website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"

- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: npm
cache-dependency-path: webpack/package-lock.json

- name: Install Lektor
run: |
python -m pip install --upgrade pip setuptools
python -m pip install lektor
- uses: pdm-project/setup-pdm@v4
with:
cache: true

- name: Install Lektor
run: pdm install
- name: Build lektor website
run: lektor build -f webpack -O '${{ env.OUTPUT }}'
run: pdm run build

- name: Check for broken internal links
uses: wjdp/htmltest-action@master
with:
path: ${{ env.OUTPUT }}
config: .htmltest.yml
skip_external: true
log_level: 1
run: pdm run check-links

- name: Deploy lektor website
if: env.DEPLOY == 'true'
run: lektor deploy -O '${{ env.OUTPUT }}' ghpages-https
run: pdm run deploy
env:
LEKTOR_DEPLOY_USERNAME: lektor
LEKTOR_DEPLOY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
18 changes: 8 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
.DS_Store
*.pyc
*.egg-info
.cache
.tox
assets/static/*
!assets/static/favicon.png
packages/*/build
packages/*/dist
webpack/node_modules
*~
*#
.DS_Store
__pycache__/
*.egg-info
/assets/static/*
!/assets/static/favicon.png
/webpack/node_modules
/.pdm-python
/_htdocs/
35 changes: 26 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
# Lektor Website

This is the repository for the Lektor website at
[getlektor.com](https://www.getlektor.com/).
This is the repository for the Lektor website at [getlektor.com].

We currently use [PDM] to manage dependencies and scripts.

To run:

```
$ lektor server
First [install PDM], and [node.js/npm][install nodejs].

Next, install python dependencies

```sh
$ pdm install
```

If you also want to update the webpack files, you need `npm` installed
and then run it like this:
Run the Lektor dev server

```sh
$ pdm run server
```
$ lektor server -f webpack

or just build the site to `./_htdocs/`

```sh
$ pdm run build
```

## Notes

Changes made here get deployed automatically by [this workflow](https://github.com/lektor/lektor-website/blob/master/.github/workflows/deploy.yml).
Changes made here get deployed automatically by [this workflow][deploy.yml].

Building lektor-website requires the latest stable release of [Lektor].

Building lektor-website requires the latest stable release of [Lektor](https://pypi.org/project/Lektor/).
[getlektor.com]: https://www.getlektor.com/
[PDM]: https://pdm-project.org/
[install PDM]: https://pdm-project.org/en/latest/#installation
[install nodejs]: https://nodejs.org/en/download/
[Lektor]: https://pypi.org/project/Lektor/
[deploy.yml]: https://github.com/lektor/lektor-website/blob/master/.github/workflows/deploy.yml
11 changes: 0 additions & 11 deletions Website.lektorproject
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,3 @@ enabled = yes
name = Github pages on repo
target = ghpages+https://lektor/lektor-website?cname=www.getlektor.com
default = not


[packages]
lektor-webpack-support = 0.3
lektor-disqus-comments = 0.1
lektor-markdown-header-anchors = 0.1
lektor-markdown-highlighter = 0.3.2
lektor-markdown-admonition = 0.1
lektor-atom = 0.4.0
lektor-tags = 0.3
lektor-slugify = 0.4
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
882 changes: 882 additions & 0 deletions pdm.lock

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[project]
name = "lektor-website"
description = "The lektor website (getlektor.com)"
authors = [
{name = "Armin Ronacher", email = "armin.ronacher@active-4.com"},
]
readme = "README.md"
license = {text = "CC0-1.0"}
requires-python = ">=3.8"
dependencies = [
"lektor~=3.3.10",
"lektor-webpack-support~=0.3.0",
"lektor-disqus-comments~=0.1.0",
"lektor-markdown-header-anchors~=0.1.0",
"lektor-markdown-highlighter~=0.3.2",
"lektor-markdown-admonition~=0.1.0",
"lektor-atom~=0.4.0",
"lektor-tags~=0.3.0",
"lektor-slugify~=0.4.0",
]

[tool.pdm]
distribution = false

[tool.pdm.dev-dependencies]
dev = [
"-e file:///${PROJECT_ROOT}/local-plugins/blog-archive#egg=lektor-blog-archive",
"-e file:///${PROJECT_ROOT}/local-plugins/jinja-globals#egg=lektor-jinja-globals",
"-e file:///${PROJECT_ROOT}/local-plugins/markdown-link-classes#egg=lektor-markdown-link-classes",
"-e file:///${PROJECT_ROOT}/local-plugins/project-data#egg=lektor-project-data",
]

[tool.pdm.scripts]
_.env = {LEKTOR_OUTPUT_PATH = "_htdocs"}
build = "lektor build -f webpack"
server = "lektor server -f webpack"
deploy = "lektor deploy ghpages-https"

check-links = "npx --yes @untitaker/hyperlink@~0.1.32 --check-anchors _htdocs"
37 changes: 0 additions & 37 deletions tox.ini

This file was deleted.