├── .env.development ├── .env.local.example ├── .env.production ├── .gitignore ├── README.md ├── components └── wp-page.js ├── jsconfig.json ├── lib ├── api.js ├── constants.js ├── service.js └── utils.js ├── package.json ├── pages ├── [slug].js ├── _app.js ├── _document.js ├── archives │ └── [id].js └── index.js ├── public ├── bitnami │ └── banner.js ├── icons │ ├── cropped-icon-puple-256-180x180.png │ ├── cropped-icon-puple-256-192x192.png │ ├── cropped-icon-puple-256-32x32.png │ ├── cropped-logo-agency-180x180.png │ ├── cropped-logo-agency-192x192.png │ └── cropped-logo-agency-32x32.png ├── neve │ ├── img │ │ ├── card-01.jpg │ │ ├── card-02.jpg │ │ ├── card-03.jpg │ │ ├── card-04.jpg │ │ ├── card-05.jpg │ │ ├── card-06.jpg │ │ ├── hero.jpg │ │ ├── icon-01.svg │ │ ├── icon-02.svg │ │ ├── icon-03.svg │ │ ├── image-asset-930x563.jpeg │ │ ├── neve-web-design-bg-09.jpg │ │ ├── neve-web-design-bg-10.jpg │ │ ├── neve-web-design-bg-12.jpg │ │ ├── neve-web-design-studio-02-circle.jpg │ │ ├── neve-web-design-studio-02.jpg │ │ ├── neve-web-design-studio-03-circle.jpg │ │ ├── neve-web-design-studio-03.jpg │ │ ├── neve-web-design-studio-04-circle.jpg │ │ ├── neve-web-design-studio-04.jpg │ │ ├── neve-web-design-studio-05.jpg │ │ ├── neve-web-design-studio-06.jpg │ │ ├── neve-web-design-studio-07.jpg │ │ ├── neve-web-design-studio-10.jpg │ │ ├── neve-web-design-studio-11.jpg │ │ ├── ninjia-930x620.jpg │ │ ├── team-01.jpg │ │ ├── team-02.jpg │ │ └── team-03.jpg │ ├── js │ │ ├── frontend.js │ │ └── global.js │ └── style.min.css ├── wp-css │ ├── bb-plugin │ │ ├── 56-layout.css │ │ ├── 67-layout.css │ │ ├── 884-layout.css │ │ └── 888-layout.css │ └── block-library │ │ └── style.min.css └── wp-js │ ├── bb-plugin │ └── layout.js │ ├── comment-reply.min.js │ ├── jquery │ ├── jquery-migrate.min.js │ └── jquery.min.js │ ├── otter-blocks │ └── animate.js │ ├── wp-embed.min.js │ ├── wp-emoji-release.min.js │ └── wpzoom │ └── jquery.magnific-popup.min.js ├── styles └── index.css └── yarn.lock /.env.development: -------------------------------------------------------------------------------- 1 | USE_ABS_PATH=true -------------------------------------------------------------------------------- /.env.local.example: -------------------------------------------------------------------------------- 1 | WORDPRESS_URL=https://www.wp4speed.com -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | USE_ABS_PATH=false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env.local 29 | .env.development.local 30 | .env.test.local 31 | .env.production.local 32 | 33 | # vercel 34 | .vercel 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Static Wordpress Neve theme 2 | 3 | @2021/03/18 4 | 5 | The fastest way to export your Wordpress(v5.7& Neve theme v2.10.2) site as a static site 6 | 7 | ## Demo 8 | 9 | - [next site](https://next-static-neve.vercel.app/) 10 | - [wp site](https://www.wp4speed.com) 11 | 12 | ## Features 13 | 14 | - Pages and Posts staticalization 15 | - Images and Styles Grabing to local project 16 | - Configurable Wordpress site URL 17 | 18 | ## Limitations 19 | 20 | - few javascripts included currently 21 | 22 | ## TODOs 23 | 24 | - add more js 25 | - more test 26 | - ... 27 | 28 | ## How to use 29 | 30 | - Create a WordPress(v5.7+) site 31 | - Install Neve theme(v2.10.2+) 32 | - Setting Wordpress `Permalink Settings` with `Numeric` format !! 33 | - Install WPGraphql plugin 34 | - Clone this repo and install dependecies 35 | - Create .env.local by copy .env.local.example 36 | - Replace WORDPRESS_URL value with your own wordpress url 37 | - Run `yarn dev` to start buiding you static wordpress site 38 | - Visit `http://localhost:3000` 39 | 40 | ``` 41 | % cd ~/web/next-projects 42 | % git clone https://github.com/lwz7512/next-static-neve.git my-static-wpsite 43 | % cd my-static-wpsite 44 | % yarn 45 | % cp .env.local.example .env.local 46 | % yarn dev 47 | ``` 48 | 49 | ## Deploy your own 50 | 51 | - push your local project to github 52 | - create a [vercel](https://vercel.com/) account 53 | - connect this repo from github to your vercel project 54 | - add environment varialble WORDPRESS_URL in your vercel project 55 | - start deploy 56 | 57 | ## Dependencies 58 | 59 | - wordpress 60 | - neve 61 | - wpgraphql 62 | - got 63 | - cheerio -------------------------------------------------------------------------------- /components/wp-page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * extracted from each page as a common component 3 | * @2021/03/23 4 | * 5 | * add layoutCSS for Wordpress v5.7 beaver builder plugin 6 | * @2021/03/28 7 | */ 8 | import Head from 'next/head' 9 | 10 | export default function WPPage({ 11 | title, subtile, inlineStyle, layoutCSS, 12 | icon32, icon192, iconApple, 13 | header, main, footer 14 | }) { 15 | return ( 16 |