Skip to content
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
52 changes: 52 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Documentation website

on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: pages-${{ github.event_name == 'pull_request' && github.ref || 'production' }}
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
- name: Install dependencies
run: npm ci
- name: Build website and check Markdown links
run: npm run docs:build
- name: Configure Pages
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
uses: actions/configure-pages@v5
- name: Upload Pages artifact
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v3
with:
path: docs-site/.vitepress/dist

deploy:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ pnpm-debug.log*

# python
**/__pycache__

# VitePress cache
docs-site/.vitepress/cache/
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,25 @@ npm test
npm run lint
```

## Documentation website

The public VitePress site lives in `docs-site/`; `docs/` remains internal project documentation and the source of shared screenshots. Use Node.js 22.18+ (Node 22 is also used in CI) and the root npm lockfile:

```bash
npm ci
npm run docs:dev
npm run docs:build
npm run docs:preview
```

Open the URL printed by VitePress, including `/Read-Only-View/`. The build checks Markdown links and writes `docs-site/.vitepress/dist/`. Preview that production build to check images and navigation under the repository base path. VitePress configuration and theme files are separate from the Obsidian runtime lint configuration; validate them with the site build.

Reuse images from `docs/images/` with relative Markdown image links; Vite includes them in the site's output without maintaining duplicate source copies. Give each page a unique frontmatter title and description. Canonical URLs and Open Graph tags are generated from page metadata; the homepage also includes factual SoftwareApplication JSON-LD. There is no standalone favicon asset in the current repository, so the site does not invent one.

`.github/workflows/pages.yml` builds pull requests and deploys pushes to `master` through the official Pages artifact/deploy actions. In GitHub **Settings → Pages → Build and deployment → Source**, select **GitHub Actions**. Merge the site changes into `master` (or run **Documentation website** manually on `master`). The resulting URL is <https://mrkazzila.github.io/Read-Only-View/>. Existing plugin CI and release workflows are independent.

The site emits `sitemap.xml` and `robots.txt`. Because this is a project site, its robots file lives at `/Read-Only-View/robots.txt`; crawlers only use robots directives at the origin root. If you maintain `mrkazzila.github.io`, add the sitemap URL to its root robots file, or submit the sitemap directly in your search-engine webmaster tools.

## Development workflow

### 1) Run in Obsidian
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Keep Markdown notes in Obsidian Reading view, either across the whole vault or o

Privacy: Read Only View makes no network requests, and all rule matching stays local. When you import an absolute system path, the plugin stores only its portable path inside the vault, not the full local path.

Documentation: https://mrkazzila.github.io/Read-Only-View/

## What it does

Read Only View keeps matching `.md` notes in Reading view to help prevent accidental edits.
Expand Down
Loading
Loading