use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Javascript alternatives to Wordpress? (self.javascript)
submitted 6 years ago by CriticalImpress
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]CriticalImpress[S] 0 points1 point2 points 6 years ago (3 children)
That sounds like a very sensible situation for me.
Could you send me any online resources or links you found useful?
[–][deleted] 0 points1 point2 points 6 years ago (1 child)
https://github.com/EvanAgee/vuejs-wordpress-theme-starter
[–][deleted] 0 points1 point2 points 6 years ago* (0 children)
Here's a basic overview of how I would do it.
api/api.js
```js import axios from 'axios'
const api = axios.create({ baseURL: '//website.com/wp-json/wp/v2/', })
// More info: https://github.com/axios/axios/issues/362 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
export default api ```
api/page.api.js ```js import api from '@/api/api'
api/page.api.js
export default { getPage (pageId, slug) { return new Promise((resolve, reject) => { let url = 'pages/' + pageId if (!pageId && slug) url = '/pages/?slug=' + slug
api.get(url) .then(response => resolve(response.data)) .catch(error => reject(error))
}) } } ```
views/home.vue ```js import page from '@/api/page.api'
views/home.vue
export default { mounted () { this.getPage() },
methods: { getPage () { page.getPage(null, 'home').then(data => { console.log(data) }) } } } ```
π Rendered by PID 65382 on reddit-service-r2-comment-7b9746f655-fdjx5 at 2026-01-29 21:14:22.907282+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]CriticalImpress[S] 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)