Skip to content
Draft
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
8 changes: 0 additions & 8 deletions .dockerignore

This file was deleted.

8 changes: 1 addition & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,5 @@ jobs:
persist-credentials: false
- uses: ./.github/actions/install-node-package
with:
node-version: 22
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- run: sudo gem install bundler -v 2.1.4
- run: npm run install-jekyll
node-version: 24
- run: BUILD=1 npm run build-site
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ tmp*
/node_modules
docs/_site
docs/static/css
docs/.jekyll-cache
npm-debug.log
npm-debug.log.*
*~
Expand Down
15 changes: 1 addition & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,7 @@ Now when you visit https://github.com/myfork/pouchdb there should be a button th
Building PouchDB Documentation
--------------------------------------

The source for the website http://pouchdb.com is stored inside the `docs` directory of the PouchDB repository, you can make changes and submit pull requests as with any other patch. To build and view the website locally you will need to have the Ruby development package installed.
On Ubuntu this is done with:

$ sudo apt install -y ruby-dev

You then neet to install [jekyll](http://jekyllrb.com/) and a few other gems. Jekyll is installed using [bundler](http://bundler.io/) so you need to install that first.
On Ubuntu you will need root permissions to do this so prefix the ```gem``` command with ```sudo```

$ [sudo] gem install bundler
$ npm run install-jekyll
The source for the website http://pouchdb.com is stored inside the `docs` directory of the PouchDB repository, you can make changes and submit pull requests as with any other patch.

If you haven't already done so, you'll also need to run `npm install` to pull in packages for the dev server:

Expand All @@ -118,10 +109,6 @@ Now you can build the site and start the dev server with:

You should now find the documentation at http://127.0.0.1:4000

You can also build and run the documentation with docker:

$ npm run dev-site-with-docker

Writing a PouchDB Blog Post
--------------------------------------

Expand Down
23 changes: 7 additions & 16 deletions bin/build-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ const POUCHDB_LESS = resolvePath('docs/src/less/pouchdb/pouchdb.less');

process.chdir('docs');

async function checkJekyll() {
try {
await exec('bundle check');
} catch (err) {
throw new Error('Jekyll is not installed. You need to do: npm run install-jekyll');
}
}

async function buildCSS() {
fs.mkdirSync(__dirname + '/../docs/static/css', { recursive:true });
const cmd = [ resolvePath('node_modules/less/bin/lessc'), POUCHDB_LESS ].join(' ');
Expand All @@ -34,9 +26,9 @@ async function buildCSS() {
console.log('Updated:', POUCHDB_CSS);
}

async function buildJekyll() {
await exec('bundle exec jekyll build');
console.log('=> Rebuilt jekyll');
async function buildEleventy() {
await exec('npx @11ty/eleventy');
console.log('=> Rebuilt eleventy');

highlightEs6();
console.log('=> Highlighted ES6');
Expand Down Expand Up @@ -83,9 +75,8 @@ function onError(err) {

function buildEverything() {
return Promise.resolve()
.then(checkJekyll)
.then(buildCSS)
.then(buildJekyll)
.then(buildEleventy)
.catch(onError);
}

Expand All @@ -100,14 +91,14 @@ if (!process.env.BUILD) {
// Simpler ways of blacklisting certain paths here would be very welcome.
fs.readdirSync('.')
.forEach(path => {
if (path === '_site' || path.startsWith('Gemfile')) {
if (path === '_site') {
return;
}

if (fs.statSync(path).isDirectory()) {
watchGlob(`${path}/**`, buildJekyll);
watchGlob(`${path}/**`, buildEleventy);
} else {
watchGlob(path, buildJekyll);
watchGlob(path, buildEleventy);
}
});

Expand Down
32 changes: 0 additions & 32 deletions docs-dev.Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions docs/Gemfile

This file was deleted.

69 changes: 0 additions & 69 deletions docs/Gemfile.lock

This file was deleted.

15 changes: 0 additions & 15 deletions docs/_config.yml

This file was deleted.

65 changes: 65 additions & 0 deletions docs/_data/authors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[
{
"name": "Nick Colley",
"twitter": "nickcolley",
"github": "nickcolley",
"www": "http://nickcolley.co.uk",
"gravatar": "d83613912d1a2511a784b99c703bdcf6"
},
{
"name": "Nolan Lawson",
"twitter": "nolanlawson",
"github": "nolanlawson",
"www": "http://nolanlawson.com",
"gravatar": "c436dec61b906e27c963518d0ef1d972"
},
{
"name": "Dale Harvey",
"twitter": "daleharvey",
"github": "daleharvey",
"www": "http://arandomurl.com",
"gravatar": "030451d8cfc268d666bae9a7fe8d10ec"
},
{
"name": "Calvin Metcalf",
"twitter": "CWMma",
"github": "calvinmetcalf",
"www": "http://calvinmetcalf.com/",
"gravatar": "e8153037a068f1c32e546f82729a64a5"
},
{
"name": "Giovanni Ornaghi",
"twitter": "sphaso",
"github": "sphaso",
"www": "https://it.linkedin.com/in/giovanniornaghi",
"gravatar": "da853b1ad9ebe5e1c3ab5b340bb63b70"
},
{
"name": "Garren Smith",
"twitter": "garrensmith",
"github": "garrensmith",
"www": "http://www.redcometlabs.com",
"gravatar": "15fb22e15587c7c36e0aeb5bf3579b07"
},
{
"name": "Will Holley",
"twitter": "wilhol",
"github": "willholley",
"www": "https://github.com/willholley/",
"gravatar": "059d287498c864868b910fb0db7c469b"
},
{
"name": "Gareth Bowen",
"twitter": "garethjtbowen",
"github": "garethbowen",
"www": "https://bowenwebdesign.co.nz",
"gravatar": "eda4874d50a06c7a6b231ba3dd29c7c0"
},
{
"name": "Alba Herrerías",
"twitter": "alba_dev",
"github": "AlbaHerrerias",
"www": "https://www.albaherrerias.dev",
"gravatar": "da81e745b26ae8ca53fc77538599510f"
}
]
53 changes: 0 additions & 53 deletions docs/_data/authors.yml

This file was deleted.

10 changes: 10 additions & 0 deletions docs/_data/site.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "PouchDB",
"description": "PouchDB, the JavaScript Database that Syncs!",
"url": "http://pouchdb.com",
"baseurl": "",
"version": "9.0.0",
"github": {
"repository_url": "https://github.com/pouchdb/pouchdb"
}
}
10 changes: 5 additions & 5 deletions docs/_includes/guides_nav.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% assign guides = (site.guides | sort: 'index') %}
{% assign guides = collections.guides | sort: 'index' %}
{% for guide in guides %}
{% assign title = guide.title %}
{% if guide.nav %}
{% assign title = guide.nav %}
{% assign title = guide.data.title %}
{% if guide.data.nav %}
{% assign title = guide.data.nav %}
{% endif %}
{% include nav_item.html path=guide.url text=title %}
{% include nav_item.html path=guide.data.url text=title %}
{% endfor %}
Loading
Loading